Package smile.nlp.dictionary
Enum Class EnglishDictionary
- All Implemented Interfaces:
Serializable
,Comparable<EnglishDictionary>
,Constable
,Dictionary
A concise dictionary of common terms in English.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
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 EnglishDictionary
Returns the enum constant of this class with the specified name.static EnglishDictionary[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONCISE
A concise dictionary of common terms in English.
-
-
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:
s
- 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.
-