public class PTStemmer extends Object implements weka.core.stemmers.Stemmer, weka.core.OptionHandler
-S <ORENGO|PORTER|SAVOY> The type of stemmer algorithm to use: ORENGO = Orengo PORTER = Porter SAVOY = Savoy (default: ORENGO)
-N <file> The file with the named entities to ignore (optional). File format: simple text file with one entity per line. (default: none)
-W <file> The file with the stopwords (optional). File format: simple text file with one stopword per line. (default: none)
-C <int> The size of the cache. Disable with 0. (default: 1000)
| Modifier and Type | Field and Description |
|---|---|
static int |
STEMMER_ORENGO
orengo stemmer.
|
static int |
STEMMER_PORTER
porter stemmer.
|
static int |
STEMMER_SAVOY
savoy stemmer.
|
static weka.core.Tag[] |
TAGS_STEMMERS
stemmers.
|
| Constructor and Description |
|---|
PTStemmer() |
| Modifier and Type | Method and Description |
|---|---|
String |
cacheTipText()
Returns the tip text for this property.
|
int |
getCache()
Gets the size of the cache.
|
File |
getNamedEntities()
Gets the file for the named entities.
|
String[] |
getOptions()
Gets the current settings of the classifier.
|
String |
getRevision()
Returns the revision string.
|
weka.core.SelectedTag |
getStemmer()
Gets the stemmer type to use.
|
File |
getStopwords()
Gets the file for the named entities.
|
String |
globalInfo()
Returns a string describing the stemmer.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Runs the stemmer with the given options.
|
String |
namedEntitiesTipText()
Returns the tip text for this property.
|
void |
setCache(int value)
Sets the size of the cache.
|
void |
setNamedEntities(File value)
Sets the file for the named entities.
|
void |
setOptions(String[] options)
Parses the options.
|
void |
setStemmer(weka.core.SelectedTag value)
Sets the stemmer type to use
|
void |
setStopwords(File value)
Sets the file for the stopwords.
|
String |
stem(String word)
Returns the stemmed version of the given word.
|
String |
stemmerTipText()
Returns the tip text for this property
|
String |
stopwordsTipText()
Returns the tip text for this property.
|
String |
toString()
returns a string representation of the stemmer.
|
public static final int STEMMER_ORENGO
public static final int STEMMER_PORTER
public static final int STEMMER_SAVOY
public static final weka.core.Tag[] TAGS_STEMMERS
public String globalInfo()
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerpublic void setOptions(String[] options) throws Exception
-S <ORENGO|PORTER|SAVOY> The type of stemmer algorithm to use: ORENGO = Orengo PORTER = Porter SAVOY = Savoy (default: ORENGO)
-N <file> The file with the named entities to ignore (optional). File format: simple text file with one entity per line. (default: none)
-W <file> The file with the stopwords (optional). File format: simple text file with one stopword per line. (default: none)
-C <int> The size of the cache. Disable with 0. (default: 1000)
setOptions in interface weka.core.OptionHandleroptions - the options to parseException - if parsing failspublic String[] getOptions()
getOptions in interface weka.core.OptionHandlerpublic void setStemmer(weka.core.SelectedTag value)
value - the typepublic weka.core.SelectedTag getStemmer()
public String stemmerTipText()
public void setNamedEntities(File value)
value - the file.public File getNamedEntities()
public String namedEntitiesTipText()
public void setStopwords(File value)
value - the file.public File getStopwords()
public String stopwordsTipText()
public void setCache(int value)
value - the size.public int getCache()
public String cacheTipText()
public String stem(String word)
stem in interface weka.core.stemmers.Stemmerword - a string consisting of a single wordpublic String toString()
public String getRevision()
getRevision in interface weka.core.RevisionHandlerpublic static void main(String[] args)
args - the optionsCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.