Class SynonymMap.Builder
Builds an FSTSynonymMap.
Call Add(CharsRef, CharsRef, Boolean) until you have added all the mappings, then call Build() to get an FSTSynonymMap
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Analysis.Synonym
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class Builder
Constructors
| Improve this Doc View SourceBuilder(Boolean)
If dedup is true then identical rules (same input, same output) will be added only once.
Declaration
public Builder(bool dedup)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | dedup |
Methods
| Improve this Doc View SourceAdd(CharsRef, CharsRef, Boolean)
Add a phrase->phrase synonym mapping. Phrases are character sequences where words are separated with character zero (U+0000). Empty words (two U+0000s in a row) are not allowed in the input nor the output!
Declaration
public virtual void Add(CharsRef input, CharsRef output, bool includeOrig)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Util.CharsRef | input | input phrase |
Lucene.Net.Util.CharsRef | output | output phrase |
System.Boolean | includeOrig | true if the original should be included |
Build()
Builds an SynonymMap and returns it.
Declaration
public virtual SynonymMap Build()
Returns
Type | Description |
---|---|
SynonymMap |
Join(String[], CharsRef)
Sugar: just joins the provided terms with WORD_SEPARATOR. reuse and its chars must not be null.
Declaration
public static CharsRef Join(string[] words, CharsRef reuse)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | words | |
Lucene.Net.Util.CharsRef | reuse |
Returns
Type | Description |
---|---|
Lucene.Net.Util.CharsRef |