|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.analysis.Analyzer org.apache.lucene.analysis.cz.CzechAnalyzer
public final class CzechAnalyzer
Analyzer
for Czech language.
Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.
NOTE: This class uses the same Version
dependent settings as StandardAnalyzer
.
Field Summary | |
---|---|
static String[] |
CZECH_STOP_WORDS
Deprecated. use getDefaultStopSet() instead |
Fields inherited from class org.apache.lucene.analysis.Analyzer |
---|
overridesTokenStreamMethod |
Constructor Summary | |
---|---|
CzechAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words ( CZECH_STOP_WORDS ). |
|
CzechAnalyzer(Version matchVersion,
File stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead |
|
CzechAnalyzer(Version matchVersion,
HashSet<?> stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead |
|
CzechAnalyzer(Version matchVersion,
Set<?> stopwords)
Builds an analyzer with the given stop words and stemming exclusion words |
|
CzechAnalyzer(Version matchVersion,
String... stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead |
Method Summary | |
---|---|
static Set<?> |
getDefaultStopSet()
Returns a set of default Czech-stopwords |
void |
loadStopWords(InputStream wordfile,
String encoding)
Deprecated. use WordlistLoader.getWordSet(Reader, String)
and CzechAnalyzer(Version, Set) instead |
TokenStream |
reusableTokenStream(String fieldName,
Reader reader)
Returns a (possibly reused) TokenStream which tokenizes all the text in
the provided Reader . |
TokenStream |
tokenStream(String fieldName,
Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader . |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
---|
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] CZECH_STOP_WORDS
getDefaultStopSet()
instead
Constructor Detail |
---|
public CzechAnalyzer(Version matchVersion)
CZECH_STOP_WORDS
).
public CzechAnalyzer(Version matchVersion, Set<?> stopwords)
matchVersion
- lucene compatibility versionstopwords
- a stopword setpublic CzechAnalyzer(Version matchVersion, String... stopwords)
CzechAnalyzer(Version, Set)
instead
public CzechAnalyzer(Version matchVersion, HashSet<?> stopwords)
CzechAnalyzer(Version, Set)
instead
public CzechAnalyzer(Version matchVersion, File stopwords) throws IOException
CzechAnalyzer(Version, Set)
instead
IOException
Method Detail |
---|
public static final Set<?> getDefaultStopSet()
public void loadStopWords(InputStream wordfile, String encoding)
WordlistLoader.getWordSet(Reader, String)
and CzechAnalyzer(Version, Set)
instead
wordfile
- File containing the wordlistencoding
- Encoding used (win-1250, iso-8859-2, ...), null for default system encodingpublic final TokenStream tokenStream(String fieldName, Reader reader)
TokenStream
which tokenizes all the text in the provided Reader
.
tokenStream
in class Analyzer
TokenStream
built from a StandardTokenizer
filtered with
StandardFilter
, LowerCaseFilter
, and StopFilter
public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
TokenStream
which tokenizes all the text in
the provided Reader
.
reusableTokenStream
in class Analyzer
TokenStream
built from a StandardTokenizer
filtered with
StandardFilter
, LowerCaseFilter
, and StopFilter
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |