public abstract static class SynonymMap.Parser extends SynonymMap.Builder
Constructor and Description |
---|
Parser(boolean dedup,
Analyzer analyzer) |
Modifier and Type | Method and Description |
---|---|
CharsRef |
analyze(java.lang.String text,
CharsRefBuilder reuse)
Sugar: analyzes the text with the analyzer and
separates by
SynonymMap.WORD_SEPARATOR . |
abstract void |
parse(java.io.Reader in)
Parse the given input, adding synonyms to the inherited
SynonymMap.Builder . |
add, build, join
private final Analyzer analyzer
public Parser(boolean dedup, Analyzer analyzer)
public abstract void parse(java.io.Reader in) throws java.io.IOException, java.text.ParseException
SynonymMap.Builder
.in
- The input to parsejava.io.IOException
java.text.ParseException
public CharsRef analyze(java.lang.String text, CharsRefBuilder reuse) throws java.io.IOException
SynonymMap.WORD_SEPARATOR
.
reuse and its chars must not be null.java.io.IOException