Constructor CapitalizationFilter
CapitalizationFilter(TokenStream)
Creates a CapitalizationFilter with the default parameters using the culture from the current thread.
Declaration
public CapitalizationFilter(TokenStream in)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | in |
CapitalizationFilter(TokenStream, CultureInfo)
Creates a CapitalizationFilter with the default parameters and the specified culture
.
Declaration
public CapitalizationFilter(TokenStream in, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | in | input tokenstream |
System.Globalization.CultureInfo | culture | The culture to use for the casing operation. If null, the culture of the current thread will be used. |
CapitalizationFilter(TokenStream, Boolean, CharArraySet, Boolean, ICollection<Char[]>, Int32, Int32, Int32)
Creates a CapitalizationFilter with the specified parameters using the culture from the current thread.
Declaration
public CapitalizationFilter(TokenStream in, bool onlyFirstWord, CharArraySet keep, bool forceFirstLetter, ICollection<char[]> okPrefix, int minWordLength, int maxWordCount, int maxTokenLength)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | in | input tokenstream |
System.Boolean | onlyFirstWord | should each word be capitalized or all of the words? |
CharArraySet | keep | a keep word list. Each word that should be kept separated by whitespace. |
System.Boolean | forceFirstLetter | Force the first letter to be capitalized even if it is in the keep list. |
System.Collections.Generic.ICollection<System.Char[]> | okPrefix | do not change word capitalization if a word begins with something in this list. |
System.Int32 | minWordLength | how long the word needs to be to get capitalization applied. If the minWordLength is 3, "and" > "And" but "or" stays "or". |
System.Int32 | maxWordCount | if the token contains more then maxWordCount words, the capitalization is assumed to be correct. |
System.Int32 | maxTokenLength | The maximum length for an individual token. Tokens that exceed this length will not have the capitalization operation performed. |
CapitalizationFilter(TokenStream, Boolean, CharArraySet, Boolean, ICollection<Char[]>, Int32, Int32, Int32, CultureInfo)
Creates a CapitalizationFilter with the specified parameters and the specified culture
.
Declaration
public CapitalizationFilter(TokenStream in, bool onlyFirstWord, CharArraySet keep, bool forceFirstLetter, ICollection<char[]> okPrefix, int minWordLength, int maxWordCount, int maxTokenLength, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
TokenStream | in | input tokenstream |
System.Boolean | onlyFirstWord | should each word be capitalized or all of the words? |
CharArraySet | keep | a keep word list. Each word that should be kept separated by whitespace. |
System.Boolean | forceFirstLetter | Force the first letter to be capitalized even if it is in the keep list. |
System.Collections.Generic.ICollection<System.Char[]> | okPrefix | do not change word capitalization if a word begins with something in this list. |
System.Int32 | minWordLength | how long the word needs to be to get capitalization applied. If the minWordLength is 3, "and" > "And" but "or" stays "or". |
System.Int32 | maxWordCount | if the token contains more then maxWordCount words, the capitalization is assumed to be correct. |
System.Int32 | maxTokenLength | The maximum length for an individual token. Tokens that exceed this length will not have the capitalization operation performed. |
System.Globalization.CultureInfo | culture | The culture to use for the casing operation. If null, the culture of the current thread will be used. |