|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectAnalyzer
SpellWritingAnalyzer
public class SpellWritingAnalyzer
Drop-in replacement for the Lucene StandardAnalyzer, which performs
all the same functions plus queues words to a spelling dictionary.
| Field Summary | |
|---|---|
static String[] |
STOP_WORDS
An array containing some common English words that are usually not useful for searching. |
private Set |
stopSet
Set of stop words to remove during analysis |
private SpellWriter |
writer
Destination for words to be added to dictionary |
| Constructor Summary | |
|---|---|
SpellWritingAnalyzer(File stopwords,
SpellWriter spellWriter)
Builds an analyzer which writes to the given spelling dictionary, using the stop words from the given file. |
|
SpellWritingAnalyzer(Reader stopwords,
SpellWriter spellWriter)
Builds an analyzer which writes to the given spelling dictionary, using the stop words from the given reader. |
|
SpellWritingAnalyzer(Set stopWords,
SpellWriter spellWriter)
Builds an analyzer which writes to the given spelling dictionary, using the given stop words. |
|
SpellWritingAnalyzer(SpellWriter spellWriter)
Builds an analyzer which writes to the given spelling dictionary, with the default stop words ( STOP_WORDS). |
|
SpellWritingAnalyzer(String[] stopWords,
SpellWriter spellWriter)
Builds an analyzer which writes to the given spelling dictionary, using the given stop words. |
|
| Method Summary | |
|---|---|
TokenStream |
tokenStream(String fieldName,
Reader reader)
Constructs a StandardTokenizer filtered by a StandardFilter, a SpellWritingFilter, a LowerCaseFilter
and a StopFilter. |
| Methods inherited from class Analyzer |
|---|
getPositionIncrementGap |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Set stopSet
private SpellWriter writer
public static final String[] STOP_WORDS
| Constructor Detail |
|---|
public SpellWritingAnalyzer(SpellWriter spellWriter)
STOP_WORDS).
public SpellWritingAnalyzer(Set stopWords,
SpellWriter spellWriter)
public SpellWritingAnalyzer(String[] stopWords,
SpellWriter spellWriter)
public SpellWritingAnalyzer(File stopwords,
SpellWriter spellWriter)
throws IOException
IOExceptionWordlistLoader.getWordSet(File)
public SpellWritingAnalyzer(Reader stopwords,
SpellWriter spellWriter)
throws IOException
IOExceptionWordlistLoader.getWordSet(Reader)| Method Detail |
|---|
public TokenStream tokenStream(String fieldName,
Reader reader)
StandardTokenizer filtered by a StandardFilter, a SpellWritingFilter, a LowerCaseFilter
and a StopFilter.
tokenStream in class Analyzer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||