marf
Class MARF.NLP

java.lang.Object
  extended bymarf.MARF.NLP
Enclosing class:
MARF

public static class MARF.NLP
extends java.lang.Object

Class NLP is more related to the Natural Language Processing part of MARF.

Since:
0.3.0.2
Author:
Serguei Mokhov

Field Summary
static int CASE_SENSITIVE
          Indicates to use case-sesitive processing of text.
static int CHARACTER_MODE
          Work in character n-gram mode.
static int CLASSIFY
          Action to perform a classification task.
static int INTERACTIVE
          Use interactive mode.
static int PARSE_ENDS_OF_SENTENCE
          When parsing text, also parse typical ends of sentences.
static int PARSE_NUMBERS
          When parsing text, also parse numbers as tokens.
static int PARSE_QUOTED_STRINGS
          When parsing text, also parse quoted literals.
static int RAW_ZIPFS_LAW_DUMP
          Perform a raw dump of Zipf's Law data.
static int STEMMING
          Indicates to use stemming module.
static int TRAIN
          Action to train a classifier.
static int WORD_MODE
          Similarly to CHARACTER_MODE work in word mode for n-grams.
static int ZIPFS_LAW_CHEAT
          When classifying, cheat with Zipf's Law implementation.
 
Constructor Summary
MARF.NLP()
           
 
Method Summary
static java.lang.String getLanguage()
          Retrieves current language being processed.
static int getNgramModel()
          Retrieves current n-gram modeld.
static int getSmoothingMethod()
          Retrieves current smoothing method.
static void setLanguage(java.lang.String pstrLanguages)
          Sets current processed language.
static void setNgramModel(int piNgramModel)
          Sets current n-gram model.
static void setSmoothingMethod(int piSmoothingMethod)
          Sets current smoothing method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEMMING

public static final int STEMMING
Indicates to use stemming module.

See Also:
Constant Field Values

CASE_SENSITIVE

public static final int CASE_SENSITIVE
Indicates to use case-sesitive processing of text.

See Also:
Constant Field Values

PARSE_NUMBERS

public static final int PARSE_NUMBERS
When parsing text, also parse numbers as tokens.

See Also:
Constant Field Values

PARSE_QUOTED_STRINGS

public static final int PARSE_QUOTED_STRINGS
When parsing text, also parse quoted literals.

See Also:
Constant Field Values

PARSE_ENDS_OF_SENTENCE

public static final int PARSE_ENDS_OF_SENTENCE
When parsing text, also parse typical ends of sentences.

See Also:
Constant Field Values

RAW_ZIPFS_LAW_DUMP

public static final int RAW_ZIPFS_LAW_DUMP
Perform a raw dump of Zipf's Law data.

See Also:
Constant Field Values

CHARACTER_MODE

public static final int CHARACTER_MODE
Work in character n-gram mode.

See Also:
Constant Field Values

TRAIN

public static final int TRAIN
Action to train a classifier.

See Also:
Constant Field Values

CLASSIFY

public static final int CLASSIFY
Action to perform a classification task.

See Also:
Constant Field Values

INTERACTIVE

public static final int INTERACTIVE
Use interactive mode.

See Also:
Constant Field Values

ZIPFS_LAW_CHEAT

public static final int ZIPFS_LAW_CHEAT
When classifying, cheat with Zipf's Law implementation.

See Also:
Constant Field Values

WORD_MODE

public static final int WORD_MODE
Similarly to CHARACTER_MODE work in word mode for n-grams.

See Also:
CHARACTER_MODE, Constant Field Values
Constructor Detail

MARF.NLP

public MARF.NLP()
Method Detail

getSmoothingMethod

public static final int getSmoothingMethod()
Retrieves current smoothing method.

Returns:
inner smoothing method

setSmoothingMethod

public static void setSmoothingMethod(int piSmoothingMethod)
                               throws NLPException
Sets current smoothing method.

Parameters:
piSmoothingMethod - new smoothing method to use
Throws:
NLPException - if the parameter is outside the valid range
See Also:
EStatisticalEstimators#MIN_STATS_ESTIMATOR, EStatisticalEstimators#MAX_STATS_ESTIMATOR

getNgramModel

public static final int getNgramModel()
Retrieves current n-gram modeld.

Returns:
inner n-gram model

setNgramModel

public static final void setNgramModel(int piNgramModel)
                                throws NLPException
Sets current n-gram model.

Parameters:
piNgramModel - new n-gram model to use
Throws:
NLPException - if the parameter is outside the valid range
See Also:
ENgramModels#MIN_NGRAM_MODEL, ENgramModels#MAX_NGRAM_MODEL

getLanguage

public static java.lang.String getLanguage()
Retrieves current language being processed.

Returns:
inner smoothing method

setLanguage

public static void setLanguage(java.lang.String pstrLanguages)
                        throws NLPException
Sets current processed language.

Parameters:
pstrLanguages - new language value
Throws:
NLPException - if the parameter is null or empty


SourceForge Logo