C# (CSharp) Lucene.Net.Analysis.Synonym Пространство имен

Классы

Имя Описание
FSTSynonymFilterFactory
FSTSynonymFilterFactory.AnalyzerAnonymousInnerClassHelper
SlowSynonymFilter
SlowSynonymFilterFactory
SlowSynonymMap
SolrSynonymParser 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. Example:
    i-pod, i pod => ipod
  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. This allows the same synonym file to be used in different synonym handling strategies. Example:
    ipod, i-pod, i pod
  4. Multiple synonym mapping entries are merged. Example:
    foo => foo bar
    foo => baz

    is equivalent to

    foo => foo bar, baz
@lucene.experimental
SynonymFilterFactory Factory for SynonymFilter.
 <fieldType name="text_synonym" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"  format="solr" ignoreCase="false" expand="true"  tokenizerFactory="solr.WhitespaceTokenizerFactory" [optional tokenizer factory parameters]/> </analyzer> </fieldType>

An optional param name prefix of "tokenizerFactory." may be used for any init params that the SynonymFilterFactory needs to pass to the specified TokenizerFactory. If the TokenizerFactory expects an init parameters with the same name as an init param used by the SynonymFilterFactory, the prefix is mandatory.

The optional {@code format} parameter controls how the synonyms will be parsed: It supports the short names of {@code solr} for SolrSynonymParser and {@code wordnet} for and WordnetSynonymParser, or your own {@code SynonymMap.Parser} class name. The default is {@code solr}. A custom SynonymMap.Parser is expected to have a constructor taking:

  • boolean dedup - true if duplicates should be ignored, false otherwise
  • boolean expand - true if conflation groups should be expanded, false if they are one-directional
  • Analyzer analyzer - an analyzer used for each raw synonym

SynonymMap A map of synonyms, keys and values are phrases. @lucene.experimental
SynonymMap.Builder Builds an FSTSynonymMap.

Call add() until you have added all the mappings, then call build() to get an FSTSynonymMap @lucene.experimental

SynonymMap.Builder.MapEntry
SynonymMap.Parser Abstraction for parsing synonym files. @lucene.experimental
TestMultiWordSynonyms_ @since solr 1.4
TestSlowSynonymFilter
TestSlowSynonymFilter.IterTokenStream
TestSynonymFilterFactory
TestSynonymMapFilter
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper10
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper100
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper101
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper11
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper12
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper13
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper14
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper2
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper3
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper4
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper5
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper6
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper7
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper8
TestSynonymMapFilter.AnalyzerAnonymousInnerClassHelper9
TestSynonymMapFilter.OneSyn
WordnetSynonymParser Parser for wordnet prolog format

See http://wordnet.princeton.edu/man/prologdb.5WN.html for a description of the format. @lucene.experimental