class_docstr: Scores the target for a given source sentence.
code: def __init__(
      self,
      tgt_dict,
      softmax_batch=None,
      compute_alignment=False,
      eos=None,
      symbols_to_strip_from_output=None,
  ):
      self.pad = tgt_dict.pad()
      self.eos = tgt_dict.eos() if eos is None else eos
      self.softmax_batch = softmax_batch or sys.maxsize
      assert self.softmax_batch > 0
      self.compute_alignment = compute_alignment
      self.symbols_to_strip_from_output = (
          symbols_to_strip_from_output.union({self.eos})
          if symbols_to_strip_from_output is not None
          else {self.eos}
      )
  
imports: import sys
  import torch
  from fairseq import utils
label_desc: Use image node_id 1 to create a new SequenceScorer object from inherited base classes: object with example: obj = SequenceScorer(tgt_dict, softmax_batch, compute_alignment, eos, symbols_to_strip_from_output)