class_docstr: TER scorer class.
code: def compute_score(self, preds, texts_refs):
      if len(preds) > 0:
          score = corpus_ter(preds, [texts_refs]).score
      else:
          score = 0
      return score
  
imports: from .scorer import Scorer
  from onmt.scorers import register_scorer
  from sacrebleu import corpus_ter
label_desc: Use image node_id 2 for calling the TerScorer obj's underlying member method code with example usage: obj.compute_score(preds, texts_refs) and returns: score