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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
ignoreLabel(CharSequence label)
boolean
ignoreWord(CharSequence word)
-
-
-
Constructor Detail
-
LexicalDataImpl
public LexicalDataImpl(ResourceLookup loader, String stopwordsResource, String stoplabelsResource) throws IOException
- Throws:
IOException
-
-
Method Detail
-
ignoreWord
public boolean ignoreWord(CharSequence word)
- Specified by:
ignoreWord
in interfaceLexicalData
- Returns:
- Return true if the provided term should be ignored in processing.
-
ignoreLabel
public boolean ignoreLabel(CharSequence label)
- Specified by:
ignoreLabel
in interfaceLexicalData
- Returns:
- Return true if the label candidate should be ignored in processing.
-
-