Class WordBreakSpellChecker
A spell checker whose sole function is to offer suggestions by combining multiple terms into one word and/or breaking terms into multiple words.
Inheritance
Assembly: Lucene.Net.Suggest.dll
Syntax
public class WordBreakSpellChecker : object
Constructors
Name | Description |
---|---|
WordBreakSpellChecker() | Creates a new spellchecker with default configuration values |
Fields
Name | Description |
---|---|
SEPARATOR_TERM | Term that can be used to prohibit adjacent terms from being combined |
Properties
Name | Description |
---|---|
MaxChanges | Gets or sets the maximum numbers of changes (word breaks or combinations) to make on the original term(s). Default=1. |
MaxCombineWordLength | Gets or sets the maximum length of a suggestion made by combining 1 or more original terms. Default=20. |
MaxEvaluations | Gets or sets the maximum number of word combinations to evaluate. Default=1000. A higher value might improve result quality. A lower value might improve performance. |
MinBreakWordLength | Gets or sets the minimum length to break words down to. Default=1. |
MinSuggestionFrequency | Gets or sets the minimum frequency a term must have to be included as part of a suggestion. Default=1 Not applicable when used with SUGGEST_MORE_POPULAR |
Methods
Name | Description |
---|---|
SuggestWordBreaks(Term, Int32, IndexReader, SuggestMode, WordBreakSpellChecker.BreakSuggestionSortMethod) | Generate suggestions by breaking the passed-in term into multiple words. The scores returned are equal to the number of word breaks needed so a lower score is generally preferred over a higher score. |
SuggestWordCombinations(Term[], Int32, IndexReader, SuggestMode) | Generate suggestions by combining one or more of the passed-in terms into single words. The returned CombineSuggestion contains both a SuggestWord and also an array detailing which passed-in terms were involved in creating this combination. The scores returned are equal to the number of word combinations needed, also one less than the length of the array OriginalTermIndexes. Generally, a suggestion with a lower score is preferred over a higher score. To prevent two adjacent terms from being combined (for instance, if one is mandatory and the other is prohibited), separate the two terms with SEPARATOR_TERM When suggestMode equals SUGGEST_WHEN_NOT_IN_INDEX, each suggestion will include at least one term not in the index. When suggestMode equals SUGGEST_MORE_POPULAR, each suggestion will have the same, or better frequency than the most-popular included term. |