Class SynonymMap.Parser
java.lang.Object
org.apache.lucene.analysis.synonym.SynonymMap.Builder
org.apache.lucene.analysis.synonym.SynonymMap.Parser
- Direct Known Subclasses:
SolrSynonymParser
,WordnetSynonymParser
- Enclosing class:
SynonymMap
Abstraction for parsing synonym files.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyze
(String text, CharsRefBuilder reuse) Sugar: analyzes the text with the analyzer and separates bySynonymMap.WORD_SEPARATOR
.abstract void
Parse the given input, adding synonyms to the inheritedSynonymMap.Builder
.Methods inherited from class org.apache.lucene.analysis.synonym.SynonymMap.Builder
add, build, join
-
Constructor Details
-
Parser
-
-
Method Details
-
parse
Parse the given input, adding synonyms to the inheritedSynonymMap.Builder
.- Parameters:
in
- The input to parse- Throws:
IOException
ParseException
-
analyze
Sugar: analyzes the text with the analyzer and separates bySynonymMap.WORD_SEPARATOR
. reuse and its chars must not be null.- Throws:
IOException
-