no.sesat.search.result.handler
Class SpellingSuggestionChooser
java.lang.Object
no.sesat.search.result.handler.SpellingSuggestionChooser
- All Implemented Interfaces:
- ResultHandler
public final class SpellingSuggestionChooser
- extends Object
- implements ResultHandler
Spelling suggestions are chosen in the following way:
- Discard all suggestions with score less than minimumScore
- For each term, remove suggestions with lowest score so that the number
of suggestions is less than maxSuggestions. If the query is long the limit is maxSuggestionsForLongQueries
- Remove all suggestions whose score differs more than maxDistance from the suggestion with the highest score
- If the query is long and if two terms have suggestions, remove all suggestions unless the best suggestion
is much better than the second best
A new query is then created using the chosen suggestions.
- Version:
- $Id: SpellingSuggestionChooser.java 7225 2009-04-09 00:32:20Z ssmiweve $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpellingSuggestionChooser
public SpellingSuggestionChooser(ResultHandlerConfig config)
- Create a new SpellingSuggestionChooser.
- Parameters:
config -
handleResult
public void handleResult(ResultHandler.Context cxt,
DataModel datamodel)
-
- Specified by:
handleResult in interface ResultHandler
Copyright © 2005-2009 Schibsted ASA. All Rights Reserved.