Package org.apache.lucene.analysis.th
Class ThaiAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.util.StopwordAnalyzerBase
org.apache.lucene.analysis.th.ThaiAnalyzer
- All Implemented Interfaces:
Closeable,AutoCloseable
Analyzer for Thai language. It uses BreakIterator to break words.
You must specify the required Version
compatibility when creating ThaiAnalyzer:
- As of 3.6, a set of Thai stopwords is used by default
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
Analyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents -
Field Summary
FieldsFields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY -
Constructor Summary
ConstructorsConstructorDescriptionThaiAnalyzer(Version matchVersion) Builds an analyzer with the default stop words.ThaiAnalyzer(Version matchVersion, CharArraySet stopwords) Builds an analyzer with the given stop words. -
Method Summary
Modifier and TypeMethodDescriptionstatic CharArraySetReturns an unmodifiable instance of the default stop words set.Methods inherited from class org.apache.lucene.analysis.util.StopwordAnalyzerBase
getStopwordSetMethods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, tokenStream, tokenStream
-
Field Details
-
DEFAULT_STOPWORD_FILE
File containing default Thai stopwords.- See Also:
-
-
Constructor Details
-
ThaiAnalyzer
Builds an analyzer with the default stop words.- Parameters:
matchVersion- lucene compatibility version
-
ThaiAnalyzer
Builds an analyzer with the given stop words.- Parameters:
matchVersion- lucene compatibility versionstopwords- a stopword set
-
-
Method Details
-
getDefaultStopSet
Returns an unmodifiable instance of the default stop words set.- Returns:
- default stop words set.
-