class_docstr: Класс для поиска близких слов
  в соответствии с расстоянием Левенштейна
class_docstr_tok: ["\u041a\u043b\u0430\u0441\u0441","\u0434\u043b\u044f","\u043f\u043e\u0438\u0441\u043a\u0430","\u0431\u043b\u0438\u0437\u043a\u0438\u0445","\u0441\u043b\u043e\u0432","\u0432","\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438","\u0441","\u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c","\u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430"]
code: def __init__(
      self,
      alphabet,
      dictionary,
      operation_costs=None,
      allow_spaces=False,
      euristics="none",
  ):
      self.alphabet = alphabet
      self.allow_spaces = allow_spaces
      if isinstance(euristics, int):
          if euristics < 0:
              raise ValueError(
                  "Euristics should be non-negative integer or None"
              )
          else:
              self.euristics = euristics if euristics != 0 else None
      elif euristics in ["none", "None", None]:
          self.euristics = None
      else:
          raise ValueError(
              "Euristics should be non-negative integer or None"
          )
      if isinstance(dictionary, Trie):
          # словарь передан уже в виде бора
          self.dictionary = dictionary
      else:
          self.dictionary = make_trie(
              alphabet,
              dictionary,
              make_cashed=True,
              precompute_symbols=self.euristics,
              allow_spaces=self.allow_spaces,
          )
      self.transducer = SegmentTransducer(
          alphabet,
          operation_costs=operation_costs,
          allow_spaces=allow_spaces,
      )
      self._precompute_euristics()
      self._define_h_function()
  
imports: import copy
  import itertools
  import numpy
  from sortedcontainers import SortedListWithKey
  from .tabled_trie import Trie, make_trie
label_desc: Use image node_id 1 to create a new LevenshteinSearcher object  with example: obj = LevenshteinSearcher(alphabet, dictionary, operation_costs, allow_spaces, euristics)