C# 클래스 Lucene.Net.Analysis.Synonym.SynonymMap.Builder

Builds an FSTSynonymMap.

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

파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
Add ( CharsRef input, CharsRef output, bool includeOrig ) : void

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!

Build ( ) : SynonymMap

Builds an SynonymMap and returns it.

Builder ( bool dedup ) : Lucene.Net.Analysis.Tokenattributes

If dedup is true then identical rules (same input, same output) will be added only once.

Join ( string words, CharsRef reuse ) : CharsRef

Sugar: just joins the provided terms with {@link SynonymMap#WORD_SEPARATOR}. reuse and its chars must not be null.

비공개 메소드들

메소드 설명
Add ( CharsRef input, int numInputWords, CharsRef output, int numOutputWords, bool includeOrig ) : void
CountWords ( CharsRef chars ) : int
HasHoles ( CharsRef chars ) : bool

only used for asserting!

메소드 상세

Add() 공개 메소드

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!
public Add ( CharsRef input, CharsRef output, bool includeOrig ) : void
input CharsRef input phrase
output CharsRef output phrase
includeOrig bool true if the original should be included
리턴 void

Build() 공개 메소드

Builds an SynonymMap and returns it.
public Build ( ) : SynonymMap
리턴 SynonymMap

Builder() 공개 메소드

If dedup is true then identical rules (same input, same output) will be added only once.
public Builder ( bool dedup ) : Lucene.Net.Analysis.Tokenattributes
dedup bool
리턴 Lucene.Net.Analysis.Tokenattributes

Join() 공개 정적인 메소드

Sugar: just joins the provided terms with {@link SynonymMap#WORD_SEPARATOR}. reuse and its chars must not be null.
public static Join ( string words, CharsRef reuse ) : CharsRef
words string
reuse CharsRef
리턴 CharsRef