comirva.web.ie.countryoforigin
Class CountryOfOriginAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
comirva.web.ie.countryoforigin.CountryOfOriginAnalyzer
- All Implemented Interfaces:
- Closeable
public class CountryOfOriginAnalyzer
- extends org.apache.lucene.analysis.Analyzer
A lucence word analyzer tailored to the use in AGMIS.
Fields inherited from class org.apache.lucene.analysis.Analyzer |
overridesTokenStreamMethod |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_TOKEN_LENGTH
public static final int DEFAULT_MAX_TOKEN_LENGTH
- Default maximum allowed token length
- See Also:
- Constant Field Values
includeWords
public static String[] includeWords
CountryOfOriginAnalyzer
public CountryOfOriginAnalyzer()
- Builds an analyzer with no stop words.
CountryOfOriginAnalyzer
public CountryOfOriginAnalyzer(String dictionaryFile)
- Builds an analyzer with no stop words.
tokenStream
public org.apache.lucene.analysis.TokenStream tokenStream(String fieldName,
Reader reader)
- Specified by:
tokenStream
in class org.apache.lucene.analysis.Analyzer
setMaxTokenLength
public void setMaxTokenLength(int length)
- Set maximum allowed token length. If a token is seen
that exceeds this length then it is discarded. This
setting only takes effect the next time tokenStream or
reusableTokenStream is called.
getMaxTokenLength
public int getMaxTokenLength()
- See Also:
setMaxTokenLength(int)