SolrSynonymParser

class SolrSynonymParser(dedup: Boolean, expand: Boolean, analyzer: Analyzer) : SynonymMap.Parser

Parser for the Solr synonyms format.

  1. Blank lines and lines starting with '#' are comments.
  2. Explicit mappings match any token sequence on the LHS of "=>" and replace with all alternatives on the RHS. These types of mappings ignore the expand parameter in the constructor.
  3. Equivalent synonyms may be separated with commas and give no explicit mapping. In this case the mapping behavior will be taken from the expand parameter in the constructor.
  4. Multiple synonym mapping entries are merged.

Constructors

Link copied to clipboard
constructor(dedup: Boolean, expand: Boolean, analyzer: Analyzer)

Functions

Link copied to clipboard
fun add(input: CharsRef, output: CharsRef, includeOrig: Boolean)
Link copied to clipboard

Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.

Link copied to clipboard
Link copied to clipboard
open override fun parse(input: Reader)