C# 클래스 Lucene.Net.Analysis.Shingle.ShingleFilter

A ShingleFilter constructs shingles (token n-grams) from a token stream. In other words, it creates combinations of tokens as a single token.

For example, the sentence "please divide this sentence into shingles" might be tokenized into shingles "please divide", "divide this", "this sentence", "sentence into", and "into shingles".

This filter handles position increments > 1 by inserting filler tokens (tokens with termtext "_"). It does not handle a position increment of 0.

상속: Lucene.Net.Analysis.TokenFilter
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
End ( ) : void
IncrementToken ( ) : bool
Reset ( ) : void
ShingleFilter ( TokenStream input ) : System

Construct a ShingleFilter with default shingle size: 2.

ShingleFilter ( TokenStream input, int maxShingleSize ) : System

Constructs a ShingleFilter with the specified shingle size from the TokenStream input

ShingleFilter ( TokenStream input, int minShingleSize, int maxShingleSize ) : System

Constructs a ShingleFilter with the specified shingle size from the TokenStream input

ShingleFilter ( TokenStream input, string tokenType ) : System

Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2

비공개 메소드들

메소드 설명
GetNextToken ( InputWindowToken target ) : InputWindowToken

Get the next token from the input stream.

If the next token has positionIncrement > 1, positionIncrement - 1 #fillerTokens are inserted first.

ShiftInputWindow ( ) : void

Fills #inputWindow with input stream tokens, if available, shifting to the right if the window was previously full.

Resets #gramSize to its minimum value.

메소드 상세

End() 공개 메소드

public End ( ) : void
리턴 void

IncrementToken() 공개 메소드

public IncrementToken ( ) : bool
리턴 bool

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

ShingleFilter() 공개 메소드

Construct a ShingleFilter with default shingle size: 2.
public ShingleFilter ( TokenStream input ) : System
input Lucene.Net.Analysis.TokenStream input stream
리턴 System

ShingleFilter() 공개 메소드

Constructs a ShingleFilter with the specified shingle size from the TokenStream input
public ShingleFilter ( TokenStream input, int maxShingleSize ) : System
input Lucene.Net.Analysis.TokenStream input stream
maxShingleSize int maximum shingle size produced by the filter.
리턴 System

ShingleFilter() 공개 메소드

Constructs a ShingleFilter with the specified shingle size from the TokenStream input
public ShingleFilter ( TokenStream input, int minShingleSize, int maxShingleSize ) : System
input Lucene.Net.Analysis.TokenStream input stream
minShingleSize int minimum shingle size produced by the filter.
maxShingleSize int maximum shingle size produced by the filter.
리턴 System

ShingleFilter() 공개 메소드

Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2
public ShingleFilter ( TokenStream input, string tokenType ) : System
input Lucene.Net.Analysis.TokenStream input stream
tokenType string token type for shingle tokens
리턴 System