class_docstr: Suggests corrections based on the content of a field in a reader.
  
  Ranks suggestions by the edit distance, then by highest to lowest
  frequency.
class_docstr_tok: ["Suggests","corrections","based","on","the","content","of","a","field","in","a","reader",".","Ranks","suggestions","by","the","edit","distance",",","then","by","highest","to","lowest","frequency","."]
code: def _suggestions(self, text, maxdist, prefix):
      reader = self.reader
      freq = reader.frequency
  
      fieldname = self.fieldname
      fieldobj = reader.schema[fieldname]
      sugfield = fieldobj.spelling_fieldname(fieldname)
  
      for sug in reader.terms_within(
          sugfield, text, maxdist, prefix=prefix
      ):
          # Higher scores are better, so negate the distance and frequency
          f = freq(fieldname, sug) or 1
          score = 0 - (maxdist + (1.0 / f * 0.5))
          yield (score, sug)
  
imports: from bisect import bisect_left
  from heapq import heappush, heapreplace
  from whoosh import highlight
  from whoosh.compat import iteritems, xrange
label_desc: Use image node_id 2 for calling the ReaderCorrector obj's underlying member method code with example usage: obj._suggestions(text, maxdist, prefix) without return types