class_docstr: Component that chooses a candidate with the highest product of base and language model probabilities
  
  Args:
       load_path: path to the kenlm model file
       beam_size: beam size for highest probability search
  
  Attributes:
      lm: kenlm object
      beam_size: beam size for highest probability search
code: def __init__(
      self, load_path: Path, beam_size: int = 4, *args, **kwargs
  ):
      self.lm = kenlm.Model(str(expand_path(load_path)))
      self.beam_size = beam_size
  
file_path: DeepPavlov/deeppavlov/models/spelling_correction/electors/kenlm_elector.py
imports: from logging import getLogger
  from pathlib import Path
  from typing import List, Tuple
  import kenlm
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 1 to create a new KenlmElector object from inherited base classes: Component with example: obj = KenlmElector(load_path, beam_size)