class_docstr: Test class for `TranslationEditRate` metric.
class_docstr_tok: ["Test","class","for","`","TranslationEditRate","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_ter_score_functional(
      self,
      preds,
      targets,
      normalize,
      no_punctuation,
      asian_support,
      lowercase,
  ):
      """Test functional implementation of metric."""
      metric_args = {
          "normalize": normalize,
          "no_punctuation": no_punctuation,
          "asian_support": asian_support,
          "lowercase": lowercase,
      }
      nltk_metric = partial(
          _sacrebleu_ter_fn,
          normalized=normalize,
          no_punct=no_punctuation,
          asian_support=asian_support,
          case_sensitive=not lowercase,
      )
  
      self.run_functional_metric_test(
          preds,
          targets,
          metric_functional=translation_edit_rate,
          reference_metric=nltk_metric,
          metric_args=metric_args,
      )
  
imports: from functools import partial
  from typing import Sequence
  import pytest
  from torch import Tensor, tensor
  from torchmetrics.functional.text.ter import translation_edit_rate
  from torchmetrics.text.ter import TranslationEditRate
  from torchmetrics.utilities.imports import _SACREBLEU_AVAILABLE
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_multiple_references, _inputs_single_sentence_multiple_references
label_desc: Use image node_id 2 for calling the TestTER obj's underlying member method code with example usage: obj.test_ter_score_functional(preds, targets, normalize, no_punctuation, asian_support, lowercase) without return types