Shortcuts

torcheval.metrics.functional.word_information_lost

torcheval.metrics.functional.word_information_lost(input: str | List[str], target: str | List[str]) Tensor

单词信息丢失率是自动语音识别系统性能的一个指标。该值表示错误预测的字符百分比。值越低,ASR系统的性能越好,单词信息丢失率为0表示完美得分。

它的类版本是 torcheval.metrics.WordInformationLost

Parameters:
  • input – 作为字符串或字符串列表的转录文本,用于评分

  • target – 每个语音输入的参考,可以是字符串或字符串列表

Returns:

单词信息丢失率

示例

>>> from torcheval.metrics.functional import word_information_lost
>>> input = ["this is the prediction", "there is an other sample"]
>>> target = ["this is the reference", "there is another one"]
>>> word_information_lost(input, target)
tensor(0.6528)