Package org.carrot2.language
Class LexicalDataImpl
java.lang.Object
org.carrot2.language.LexicalDataImpl
- All Implemented Interfaces:
LexicalData
public final class LexicalDataImpl extends Object implements LexicalData
LexicalData
implemented on top of a hash set (stopwords) and a regular expression pattern
(stoplabels).-
Constructor Summary
Constructors Constructor Description LexicalDataImpl(HashSet<String> stopwords, Pattern stoplabelPattern)
LexicalDataImpl(ResourceLookup loader, String stopwordsResource, String stoplabelsResource)
-
Method Summary
Modifier and Type Method Description boolean
ignoreLabel(CharSequence label)
boolean
ignoreWord(CharSequence word)
-
Constructor Details
-
LexicalDataImpl
-
LexicalDataImpl
public LexicalDataImpl(ResourceLookup loader, String stopwordsResource, String stoplabelsResource) throws IOException- Throws:
IOException
-
-
Method Details
-
ignoreWord
- Specified by:
ignoreWord
in interfaceLexicalData
- Returns:
- Return true if the provided term should be ignored in processing.
-
ignoreLabel
- Specified by:
ignoreLabel
in interfaceLexicalData
- Returns:
- Return true if the label candidate should be ignored in processing.
-