code: def __init__(
      self,
      wordlm,
      word_dict,
      subword_dict,
      oov_penalty=0.0001,
      open_vocab=True,
  ):
      super(LookAheadWordLM, self).__init__()
      self.wordlm = wordlm
      self.word_eos = word_dict["<eos>"]
      self.word_unk = word_dict["<unk>"]
      self.xp_word_eos = self.xp.full(1, self.word_eos, "i")
      self.xp_word_unk = self.xp.full(1, self.word_unk, "i")
      self.space = subword_dict["<space>"]
      self.eos = subword_dict["<eos>"]
      self.lexroot = make_lexical_tree(
          word_dict, subword_dict, self.word_unk
      )
      self.oov_penalty = oov_penalty
      self.open_vocab = open_vocab
      self.subword_dict_size = len(subword_dict)
      self.normalized = True
  
file_path: espnet/espnet/lm/chainer_backend/extlm.py
imports: import math
  import chainer
  import chainer.functions
  from espnet.lm.lm_utils import make_lexical_tree
label_desc: Use image node_id 1 to create a new LookAheadWordLM object from inherited base classes: chainer with example: obj = LookAheadWordLM(wordlm, word_dict, subword_dict, oov_penalty, open_vocab)