类 SnowballStemmer
java.lang.Object
weka.core.stemmers.SnowballStemmer
- 所有已实现的接口:
Serializable
,OptionHandler
,RevisionHandler
,Stemmer
A wrapper class for the Snowball stemmers. Only available if the Snowball classes are in the classpath.
If the class discovery is not dynamic, i.e., the property 'UseDynamic' in the props file 'weka/gui/GenericPropertiesCreator.props' is 'false', then the property 'org.tartarus.snowball.SnowballProgram' in the 'weka/gui/GenericObjectEditor.props' file has to be uncommented as well. If necessary you have to discover and fill in the snowball stemmers manually. You can use the 'weka.core.ClassDiscovery' for this:
java weka.core.ClassDiscovery org.tartarus.snowball.SnowballProgram org.tartarus.snowball.ext
For more information visit these web sites:
http://weka.wikispaces.com/Stemmers
http://snowball.tartarus.org/
Valid options are:
If the class discovery is not dynamic, i.e., the property 'UseDynamic' in the props file 'weka/gui/GenericPropertiesCreator.props' is 'false', then the property 'org.tartarus.snowball.SnowballProgram' in the 'weka/gui/GenericObjectEditor.props' file has to be uncommented as well. If necessary you have to discover and fill in the snowball stemmers manually. You can use the 'weka.core.ClassDiscovery' for this:
java weka.core.ClassDiscovery org.tartarus.snowball.SnowballProgram org.tartarus.snowball.ext
For more information visit these web sites:
http://weka.wikispaces.com/Stemmers
http://snowball.tartarus.org/
Valid options are:
-S <name> The name of the snowball stemmer (default 'porter'). available stemmers: danish, dutch, english, finnish, french, german, italian, norwegian, porter, portuguese, russian, spanish, swedish
- 版本:
- $Revision: 5836 $
- 作者:
- FracPete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明initializes the stemmer ("porter").SnowballStemmer
(String name) initializes the stemmer with the given stemmer. -
方法概要
修饰符和类型方法说明String[]
Gets the current settings of the classifier.Returns the revision string.returns the name of the current stemmer, null if none is set.Returns a string describing the stemmer.static boolean
returns whether Snowball is present or not, i.e.Returns an enumeration describing the available options.static Enumeration
returns an enumeration over all currently stored stemmer names.static void
Runs the stemmer with the given options.void
setOptions
(String[] options) Parses the options.void
setStemmer
(String name) sets the stemmer with the given name, e.g., "porter".Returns the word in its stemmed form.Returns the tip text for this property.toString()
returns a string representation of the stemmer.
-
字段详细资料
-
构造器详细资料
-
SnowballStemmer
public SnowballStemmer()initializes the stemmer ("porter"). -
SnowballStemmer
initializes the stemmer with the given stemmer.- 参数:
name
- the name of the stemmer
-
-
方法详细资料
-
globalInfo
Returns a string describing the stemmer.- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses the options. Valid options are:-S <name> The name of the snowball stemmer (default 'porter'). available stemmers: danish, dutch, english, finnish, french, german, italian, norwegian, porter, portuguese, russian, spanish, swedish
- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the options to parse- 抛出:
Exception
- if parsing fails
-
getOptions
Gets the current settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
isPresent
public static boolean isPresent()returns whether Snowball is present or not, i.e. whether the classes are in the classpath or not- 返回:
- whether Snowball is available
-
listStemmers
returns an enumeration over all currently stored stemmer names.- 返回:
- all available stemmers
-
getStemmer
returns the name of the current stemmer, null if none is set.- 返回:
- the name of the stemmer
-
setStemmer
sets the stemmer with the given name, e.g., "porter".- 参数:
name
- the name of the stemmer, e.g., "porter"
-
stemmerTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
stem
Returns the word in its stemmed form. -
toString
returns a string representation of the stemmer. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
Runs the stemmer with the given options.- 参数:
args
- the options
-