Package smile.nlp.dictionary
Enum Class EnglishStopWords
- All Implemented Interfaces:
Serializable
,Comparable<EnglishStopWords>
,Constable
,Dictionary
,StopWords
Several sets of English stop words.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA very long list of stop words.Default stop words list.The stop words list used by Google.The stop words list used by MySQL FullText feature. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this dictionary contains the specified word.iterator()
Returns an iterator over the words in this dictionary.int
size()
Returns the number of words in this dictionary.static EnglishStopWords
Returns the enum constant of this class with the specified name.static EnglishStopWords[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Default stop words list. -
COMPREHENSIVE
A very long list of stop words. -
GOOGLE
The stop words list used by Google. -
MYSQL
The stop words list used by MySQL FullText feature.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
contains
Description copied from interface:Dictionary
Returns true if this dictionary contains the specified word.- Specified by:
contains
in interfaceDictionary
- Parameters:
word
- the query word.- Returns:
- true if this dictionary contains the specified word.
-
size
public int size()Description copied from interface:Dictionary
Returns the number of words in this dictionary.- Specified by:
size
in interfaceDictionary
- Returns:
- the number of words in this dictionary.
-
iterator
Description copied from interface:Dictionary
Returns an iterator over the words in this dictionary.- Specified by:
iterator
in interfaceDictionary
- Returns:
- the iterator.
-