C# 클래스 Lucene.Net.Analysis.Miscellaneous.CapitalizationFilter

A filter to apply normal capitalization rules to Tokens. It will make the first letter capital and the rest lower case.

This filter is particularly useful to build nice looking facet parameters. This filter is not appropriate if you intend to use a prefix query.

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

공개 프로퍼티들

프로퍼티 타입 설명
DEFAULT_MAX_TOKEN_LENGTH int
DEFAULT_MAX_WORD_COUNT int

공개 메소드들

메소드 설명
CapitalizationFilter ( TokenStream @in ) : System

Creates a CapitalizationFilter with the default parameters.

Calls {@link #CapitalizationFilter(TokenStream, boolean, CharArraySet, boolean, Collection, int, int, int) CapitalizationFilter(in, true, null, true, null, 0, DEFAULT_MAX_WORD_COUNT, DEFAULT_MAX_TOKEN_LENGTH)}

CapitalizationFilter ( TokenStream @in, bool onlyFirstWord, CharArraySet keep, bool forceFirstLetter, ICollection okPrefix, int minWordLength, int maxWordCount, int maxTokenLength ) : System

Creates a CapitalizationFilter with the specified parameters.

IncrementToken ( ) : bool

비공개 메소드들

메소드 설명
ProcessWord ( char buffer, int offset, int length, int wordCount ) : void

메소드 상세

CapitalizationFilter() 공개 메소드

Creates a CapitalizationFilter with the default parameters.

Calls {@link #CapitalizationFilter(TokenStream, boolean, CharArraySet, boolean, Collection, int, int, int) CapitalizationFilter(in, true, null, true, null, 0, DEFAULT_MAX_WORD_COUNT, DEFAULT_MAX_TOKEN_LENGTH)}

public CapitalizationFilter ( TokenStream @in ) : System
@in TokenStream
리턴 System

CapitalizationFilter() 공개 메소드

Creates a CapitalizationFilter with the specified parameters.
public CapitalizationFilter ( TokenStream @in, bool onlyFirstWord, CharArraySet keep, bool forceFirstLetter, ICollection okPrefix, int minWordLength, int maxWordCount, int maxTokenLength ) : System
@in TokenStream
onlyFirstWord bool should each word be capitalized or all of the words?
keep CharArraySet a keep word list. Each word that should be kept separated by whitespace.
forceFirstLetter bool Force the first letter to be capitalized even if it is in the keep list.
okPrefix ICollection do not change word capitalization if a word begins with something in this list.
minWordLength int how long the word needs to be to get capitalization applied. If the /// minWordLength is 3, "and" > "And" but "or" stays "or".
maxWordCount int if the token contains more then maxWordCount words, the capitalization is /// assumed to be correct.
maxTokenLength int ???
리턴 System

IncrementToken() 공개 메소드

public IncrementToken ( ) : bool
리턴 bool

프로퍼티 상세

DEFAULT_MAX_TOKEN_LENGTH 공개적으로 정적으로 프로퍼티

public static int DEFAULT_MAX_TOKEN_LENGTH
리턴 int

DEFAULT_MAX_WORD_COUNT 공개적으로 정적으로 프로퍼티

public static int DEFAULT_MAX_WORD_COUNT
리턴 int