Class SuggestionStage

java.lang.Object
org.languagetool.rules.spelling.symspell.implementation.SuggestionStage

public class SuggestionStage extends Object
An intentionally opacque class used to temporarily stage dictionary data during the adding of many words. By staging the data during the building of the dictionary data, significant savings of time can be achieved, as well as a reduction in final memory usage.
  • Field Details

  • Constructor Details

    • SuggestionStage

      public SuggestionStage(int initialCapacity)
  • Method Details

    • deleteCount

      public int deleteCount()
      Gets the count of unique delete words.
    • nodeCount

      public int nodeCount()
      Gets the total count of all suggestions for all deletes.
    • clear

      public void clear()
      Clears all the data from the SuggestionStaging.
    • add

      void add(int deleteHash, String suggestion)
    • commitTo

      void commitTo(Map<Integer,String[]> permanentDeletes)