opennlp.tools.util
Class TrainingParameters
java.lang.Object
opennlp.tools.util.TrainingParameters
public class TrainingParameters
- extends Object
ALGORITHM_PARAM
public static final String ALGORITHM_PARAM
- See Also:
- Constant Field Values
ITERATIONS_PARAM
public static final String ITERATIONS_PARAM
- See Also:
- Constant Field Values
CUTOFF_PARAM
public static final String CUTOFF_PARAM
- See Also:
- Constant Field Values
TrainingParameters
public TrainingParameters()
TrainingParameters
public TrainingParameters(InputStream in)
throws IOException
- Throws:
IOException
algorithm
public String algorithm(String namespace)
- Retrieves the training algorithm name for a given name space.
- Returns:
- the name or null if not set.
algorithm
public String algorithm()
- Retrieves the training algorithm name.
- Returns:
- the name or null if not set.
getSettings
public Map<String,String> getSettings(String namespace)
- Retrieves a map with the training parameters which have the passed name space.
- Parameters:
namespace
-
- Returns:
- a parameter map which can be passed to the train and validate methods.
getSettings
public Map<String,String> getSettings()
- Retrieves all parameters without a name space.
- Returns:
- the settings map
getParameters
public TrainingParameters getParameters(String namespace)
put
public void put(String namespace,
String key,
String value)
put
public void put(String key,
String value)
serialize
public void serialize(OutputStream out)
throws IOException
- Throws:
IOException
defaultParams
public static final TrainingParameters defaultParams()
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.