public final class ArabicAnalyzer
extends org.apache.lucene.analysis.Analyzer
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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_STOPWORD_FILE
File containing default Arabic stopwords.
|
static java.lang.String |
STOPWORDS_COMMENT
The comment character in the stopwords file.
|
Constructor and Description |
---|
ArabicAnalyzer()
Deprecated.
Use
ArabicAnalyzer(Version) instead |
ArabicAnalyzer(java.io.File stopwords)
Deprecated.
Use
ArabicAnalyzer(Version, File) instead |
ArabicAnalyzer(java.util.Hashtable stopwords)
Deprecated.
Use
ArabicAnalyzer(Version, Hashtable) instead |
ArabicAnalyzer(java.lang.String[] stopwords)
Deprecated.
Use
ArabicAnalyzer(Version, String[]) instead |
ArabicAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer with the default stop words:
DEFAULT_STOPWORD_FILE . |
ArabicAnalyzer(org.apache.lucene.util.Version matchVersion,
java.io.File stopwords)
Builds an analyzer with the given stop words.
|
ArabicAnalyzer(org.apache.lucene.util.Version matchVersion,
java.util.Hashtable stopwords)
Builds an analyzer with the given stop words.
|
ArabicAnalyzer(org.apache.lucene.util.Version matchVersion,
java.lang.String[] stopwords)
Builds an analyzer with the given stop words.
|
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.analysis.TokenStream |
reusableTokenStream(java.lang.String fieldName,
java.io.Reader reader)
Returns a (possibly reused)
TokenStream which tokenizes all the text
in the provided Reader . |
org.apache.lucene.analysis.TokenStream |
tokenStream(java.lang.String fieldName,
java.io.Reader reader)
Creates a
TokenStream which tokenizes all the text in the provided Reader . |
public static final java.lang.String DEFAULT_STOPWORD_FILE
public static final java.lang.String STOPWORDS_COMMENT
public ArabicAnalyzer()
ArabicAnalyzer(Version)
insteadDEFAULT_STOPWORD_FILE
.public ArabicAnalyzer(org.apache.lucene.util.Version matchVersion)
DEFAULT_STOPWORD_FILE
.public ArabicAnalyzer(java.lang.String[] stopwords)
ArabicAnalyzer(Version, String[])
insteadpublic ArabicAnalyzer(org.apache.lucene.util.Version matchVersion, java.lang.String[] stopwords)
public ArabicAnalyzer(java.util.Hashtable stopwords)
ArabicAnalyzer(Version, Hashtable)
insteadpublic ArabicAnalyzer(org.apache.lucene.util.Version matchVersion, java.util.Hashtable stopwords)
public ArabicAnalyzer(java.io.File stopwords) throws java.io.IOException
ArabicAnalyzer(Version, File)
insteadSTOPWORDS_COMMENT
java.io.IOException
public ArabicAnalyzer(org.apache.lucene.util.Version matchVersion, java.io.File stopwords) throws java.io.IOException
STOPWORDS_COMMENT
java.io.IOException
public final org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
TokenStream
which tokenizes all the text in the provided Reader
.tokenStream
in class org.apache.lucene.analysis.Analyzer
TokenStream
built from an ArabicLetterTokenizer
filtered with
LowerCaseFilter
, StopFilter
, ArabicNormalizationFilter
and ArabicStemFilter
.public org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName, java.io.Reader reader) throws java.io.IOException
TokenStream
which tokenizes all the text
in the provided Reader
.reusableTokenStream
in class org.apache.lucene.analysis.Analyzer
TokenStream
built from an ArabicLetterTokenizer
filtered with
LowerCaseFilter
, StopFilter
, ArabicNormalizationFilter
and ArabicStemFilter
.java.io.IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.