public final class ArabicAnalyzer extends StopwordAnalyzerBase
Analyzer for Arabic.
This analyzer implements light-stemming as specified by: Light Stemming for Arabic Information Retrieval http://www.mtholyoke.edu/~lballest/Pubs/arab_stem05.pdf
The analysis package contains three primary components:
ArabicNormalizationFilter: Arabic orthographic normalization.
ArabicStemFilter: Arabic light stemming
ReusableAnalyzerBase.TokenStreamComponents| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STOPWORD_FILE
File containing default Arabic stopwords.
|
static String |
STOPWORDS_COMMENT
Deprecated.
use
WordlistLoader.getWordSet(Reader, String, Version) directly |
matchVersion, stopwords| Constructor and Description |
|---|
ArabicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words:
DEFAULT_STOPWORD_FILE. |
ArabicAnalyzer(Version matchVersion,
File stopwords)
Deprecated.
use
ArabicAnalyzer(Version, Set) instead |
ArabicAnalyzer(Version matchVersion,
Hashtable<?,?> stopwords)
Deprecated.
use
ArabicAnalyzer(Version, Set) instead |
ArabicAnalyzer(Version matchVersion,
Set<?> stopwords)
Builds an analyzer with the given stop words
|
ArabicAnalyzer(Version matchVersion,
Set<?> stopwords,
Set<?> stemExclusionSet)
Builds an analyzer with the given stop word.
|
ArabicAnalyzer(Version matchVersion,
String... stopwords)
Deprecated.
use
ArabicAnalyzer(Version, Set) instead |
| Modifier and Type | Method and Description |
|---|---|
protected ReusableAnalyzerBase.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates
ReusableAnalyzerBase.TokenStreamComponents
used to tokenize all the text in the provided Reader. |
static Set<?> |
getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetinitReader, reusableTokenStream, tokenStreamclose, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStreampublic static final String DEFAULT_STOPWORD_FILE
@Deprecated public static final String STOPWORDS_COMMENT
WordlistLoader.getWordSet(Reader, String, Version) directlypublic ArabicAnalyzer(Version matchVersion)
DEFAULT_STOPWORD_FILE.public ArabicAnalyzer(Version matchVersion, Set<?> stopwords)
matchVersion - lucene compatibility versionstopwords - a stopword setpublic ArabicAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
KeywordMarkerFilter before
ArabicStemFilter.matchVersion - lucene compatibility versionstopwords - a stopword setstemExclusionSet - a set of terms not to be stemmed@Deprecated public ArabicAnalyzer(Version matchVersion, String... stopwords)
ArabicAnalyzer(Version, Set) instead@Deprecated public ArabicAnalyzer(Version matchVersion, Hashtable<?,?> stopwords)
ArabicAnalyzer(Version, Set) instead@Deprecated public ArabicAnalyzer(Version matchVersion, File stopwords) throws IOException
ArabicAnalyzer(Version, Set) insteadSTOPWORDS_COMMENTIOExceptionpublic static Set<?> getDefaultStopSet()
protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
ReusableAnalyzerBase.TokenStreamComponents
used to tokenize all the text in the provided Reader.createComponents in class ReusableAnalyzerBasefieldName - the name of the fields content passed to the
ReusableAnalyzerBase.TokenStreamComponents sink as a readerreader - the reader passed to the Tokenizer constructorReusableAnalyzerBase.TokenStreamComponents
built from an StandardTokenizer filtered with
LowerCaseFilter, StopFilter,
ArabicNormalizationFilter, KeywordMarkerFilter
if a stem exclusion set is provided and ArabicStemFilter.