Class EnglishPunctuations
java.lang.Object
smile.nlp.dictionary.EnglishPunctuations
- All Implemented Interfaces:
Iterable<String>, Dictionary, Punctuations
Punctuation marks in English.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this dictionary contains the specified word.static EnglishPunctuationsReturns the singleton instance.iterator()Returns an iterator over the words in this dictionary.intsize()Returns the number of words in this dictionary.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Dictionary
streamMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Punctuations
isNotPunctuation
-
Method Details
-
getInstance
Returns the singleton instance.- Returns:
- the singleton instance.
-
contains
Description copied from interface:DictionaryReturns true if this dictionary contains the specified word.- Specified by:
containsin interfaceDictionary- Parameters:
word- the query word.- Returns:
- true if this dictionary contains the specified word.
-
size
public int size()Description copied from interface:DictionaryReturns the number of words in this dictionary.- Specified by:
sizein interfaceDictionary- Returns:
- the number of words in this dictionary.
-
iterator
Description copied from interface:DictionaryReturns an iterator over the words in this dictionary.- Specified by:
iteratorin interfaceDictionary- Specified by:
iteratorin interfaceIterable<String>- Returns:
- the iterator.
-