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 booleanignoreLabel(CharSequence label)booleanignoreWord(CharSequence word)
-
Constructor Details
-
LexicalDataImpl
-
LexicalDataImpl
public LexicalDataImpl(ResourceLookup loader, String stopwordsResource, String stoplabelsResource) throws IOException- Throws:
IOException
-
-
Method Details
-
ignoreWord
- Specified by:
ignoreWordin interfaceLexicalData- Returns:
- Return true if the provided term should be ignored in processing.
-
ignoreLabel
- Specified by:
ignoreLabelin interfaceLexicalData- Returns:
- Return true if the label candidate should be ignored in processing.
-