class_docstr: Length bonus in beam search.
docstr: Initialize class.
  
  Args:
      n_vocab (int): The number of tokens in vocabulary for beam search
docstr_tok: ["Initialize","class",".","Args",":","n_vocab","(","int",")",":","The","number","of","tokens","in","vocabulary","for","beam","search"]
code: def __init__(self, n_vocab: int):
      """Initialize class.
  
      Args:
          n_vocab (int): The number of tokens in vocabulary for beam search
  
      """
      self.n = n_vocab
  
imports: from typing import Any, List, Tuple
  import torch
  from espnet.nets.scorer_interface import BatchScorerInterface
label_desc: Use image node_id 1 to create a new LengthBonus object from inherited base classes: BatchScorerInterface with example: obj = LengthBonus(n_vocab)