public abstract class StopWordDictionary extends DictionaryBase implements Iterable<String>
Learn more
ErrorOccurred
Modifier | Constructor and Description |
---|---|
protected |
StopWordDictionary(String filePath,
boolean saveOnChange)
Initializes a new instance of the
StopWordDictionary class. |
Modifier and Type | Method and Description |
---|---|
abstract void |
addRange(Iterable<String> words)
Adds the specified collection of words to this instance of the
StopWordDictionary . |
abstract void |
addRange(String[] words)
Adds the specified collection of words to this instance of the
StopWordDictionary . |
abstract void |
clear()
Removes all words from a
StopWordDictionary object. |
abstract boolean |
contains(String word)
Determines whether a
StopWordDictionary object contains the specified word. |
abstract int |
getCount()
Gets the number of stop words contained in the
StopWordDictionary . |
abstract Iterator<String> |
iterator()
Returns an iterator that iterates through the collection.
|
abstract void |
removeRange(Iterable<String> words)
Removes the specified collection of words from this instance of the
StopWordDictionary . |
abstract void |
removeRange(String[] words)
Removes the specified collection of words from this instance of the
StopWordDictionary . |
copyFrom, export, exportDictionary, getFilePath, getFilePathStatic, getStandardFileName, getStandardFileNameStatic, import_, importDictionary, load, loadDefault, loadInternalStatic, merge, mergeInternalStatic, notifyChanged, save, setFilePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected StopWordDictionary(String filePath, boolean saveOnChange)
Initializes a new instance of the StopWordDictionary
class.
filePath
- The file name.saveOnChange
- The save on change flag.public abstract int getCount()
Gets the number of stop words contained in the StopWordDictionary
.
public abstract void addRange(Iterable<String> words)
Adds the specified collection of words to this instance of the StopWordDictionary
.
words
- The collection of words to add to the dictionary.public abstract void addRange(String[] words)
Adds the specified collection of words to this instance of the StopWordDictionary
.
words
- The collection of words to add to the dictionary.public abstract void removeRange(Iterable<String> words)
Removes the specified collection of words from this instance of the StopWordDictionary
.
words
- The collection of words to remove.public abstract void removeRange(String[] words)
Removes the specified collection of words from this instance of the StopWordDictionary
.
words
- The collection of words to remove.public abstract boolean contains(String word)
Determines whether a StopWordDictionary
object contains the specified word.
word
- The word to locate in the StopWordDictionary
object.true
if the StopWordDictionary
object contains the specified word; otherwise, false
.public abstract void clear()
Removes all words from a StopWordDictionary
object.