java.lang.Object
org.apache.lucene.analysis.hunspell.Suggester

public class Suggester extends Object
A generator for misspelled word corrections based on Hunspell flags. The suggestions are searched for in two main ways:
  1. Modification: trying to insert/remove/delete/swap parts of the word to get something acceptable. The performance of this part depends heavily on the contents of TRY, MAP, REP, KEY directives in the .aff file. To speed up this part, consider using withFragmentChecker(org.apache.lucene.analysis.hunspell.FragmentChecker).
  2. Enumeration: if the modification hasn't produced "good enough" suggestions, the whole dictionary is scanned and simple affixes are added onto the entries to check if that produces anything similar to the given misspelled word. This depends on the dictionary size and the affix count, and it can take noticeable amount of time. To speed this up, withSuggestibleEntryCache() can be used.