public class StopList
extends java.lang.Object
Indexer.addObject(ObjectContent)
method.
getInstance()
method.
The package org.fts7.stopW contains a text file StopW.txt with a list of stop words. This words will be excluded from indexing. File StopW.txt is loaded by StopList class on class initialization.
Modifier and Type | Method and Description |
---|---|
void |
addWord(java.lang.String word)
Adds a
word to a stop list. |
void |
addWords(java.lang.String[] words)
Adds an array of
words to a stop list. |
void |
clear()
Clears a StopList.
|
static StopList |
getInstance()
Get a single instance of a StopList object.
|
boolean |
isStopWord(java.lang.String word)
Checks a
word for matching to a StopList. |
public static StopList getInstance()
public void clear()
public void addWords(java.lang.String[] words)
words
to a stop list.public void addWord(java.lang.String word)
word
to a stop list. The word
may be a regex pattern.public boolean isStopWord(java.lang.String word)
word
for matching to a StopList. This method is used by
Indexer.addObject(org.fts7.ObjectContent)
method
to exclude a word from being indexed.word
is in the StopList.