opennlp.tools.util
Class TrainingParameters

java.lang.Object
  extended by opennlp.tools.util.TrainingParameters

public class TrainingParameters
extends Object


Field Summary
static String ALGORITHM_PARAM
           
static String CUTOFF_PARAM
           
static String ITERATIONS_PARAM
           
 
Constructor Summary
TrainingParameters()
           
TrainingParameters(InputStream in)
           
 
Method Summary
 String algorithm()
          Retrieves the training algorithm name.
 String algorithm(String namespace)
          Retrieves the training algorithm name for a given name space.
static TrainingParameters defaultParams()
           
 TrainingParameters getParameters(String namespace)
           
 Map<String,String> getSettings()
          Retrieves all parameters without a name space.
 Map<String,String> getSettings(String namespace)
          Retrieves a map with the training parameters which have the passed name space.
 void put(String key, String value)
           
 void put(String namespace, String key, String value)
           
 void serialize(OutputStream out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

TrainingParameters

public TrainingParameters()

TrainingParameters

public TrainingParameters(InputStream in)
                   throws IOException
Throws:
IOException
Method Detail

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.