Metric

Metric

class lightning_asr.metric.ErrorRate(vocab)[source]

Provides inteface of error rate calcuation.

Note

Do not use this class directly, use one of the sub classes.

class lightning_asr.metric.WordErrorRate(vocab)[source]

Provides word error rate calcuation.

metric(s1, s2)[source]

Computes the Unit Error Rate, defined as the edit distance between the two provided sentences after tokenizing to words.

Parameters
  • s1 (string) – space-separated sentence

  • s2 (string) – space-separated sentence