class_docstr: Partialscorer for ngram.
class_docstr_tok: ["Partialscorer","for","ngram","."]
docstr: Score interface for both full and partial scorer.
  
  Args:
      y: previous char
      next_token: next token need to be score
      state: previous state
      x: encoded feature
  
  Returns:
      tuple[torch.Tensor, List[Any]]: Tuple of
          batchfied scores for next token with shape of `(n_batch, n_vocab)`
          and next state list for ys.
docstr_tok: ["Score","interface","for","both","full","and","partial","scorer",".","Args",":","y",":","previous","char","next_token",":","next","token","need","to","be","score","state",":","previous","state","x",":","encoded","feature","Returns",":","tuple","[","torch.Tensor",",","List","[","Any","]","]",":","Tuple","of","batchfied","scores","for","next","token","with","shape","of","`","(","n_batch",",","n_vocab",")","`","and","next","state","list","for","ys","."]
code: def score_partial(self, y, next_token, state, x):
      """Score interface for both full and partial scorer.
  
      Args:
          y: previous char
          next_token: next token need to be score
          state: previous state
          x: encoded feature
  
      Returns:
          tuple[torch.Tensor, List[Any]]: Tuple of
              batchfied scores for next token with shape of `(n_batch, n_vocab)`
              and next state list for ys.
  
      """
      return self.score_partial_(y, next_token, state, x)
  
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 1 for calling the NgramPartScorer obj's underlying member method code with example usage: obj.score_partial(y, next_token, state, x) and returns: self