class_docstr: Ngram base implemented through ScorerInterface.
class_docstr_tok: ["Ngram","base","implemented","through","ScorerInterface","."]
docstr: Initialize tmp state.
docstr_tok: ["Initialize","tmp","state","."]
code: def init_state(self, x):
      """Initialize tmp state."""
      state = kenlm.State()
      self.lm.NullContextWrite(state)
      return state
  
file_path: espnet/espnet/nets/scorers/ngram.py
imports: from abc import ABC
  import kenlm
  import torch
  from espnet.nets.scorer_interface import BatchScorerInterface, PartialScorerInterface
label_desc: Use image node_id 2 for calling the Ngrambase obj's underlying member method code with example usage: obj.init_state(x) and returns: state