Package org.basex.util.ft
Class StopWords
java.lang.Object
org.basex.util.ft.StopWords
Stop words for full-text requests.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
StopWords
public StopWords()Default constructor. -
StopWords
Constructor, reading stopword list from disk. And creating database stopword file.- Parameters:
data- data referencefile- stopwords file (can be empty string)- Throws:
IOException- I/O exception
-
-
Method Details
-
compile
Compiles the stop word list.- Parameters:
data- data reference
-
read
Reads a stop words file.- Parameters:
file- file referenceexclude- exclude stop words- Throws:
IOException- I/O exception
-
contains
public boolean contains(byte[] token) Checks if the specified stopword exists.- Parameters:
token- token to be looked up- Returns:
- result of check
-
remove
public void remove(byte[] token) Removes the specified stopword.- Parameters:
token- token to be removed
-
add
public void add(byte[] token) Adds the specified stopword.- Parameters:
token- token to be added
-