NLP

NLP#

A collection of different metrics for NLP models.

BLEU(max_order, matches_by_order, ...)

Computes the BLEU score for sequence generation.

Perplexity(aggregate_crossentropy, num_samples)

Computes perplexity for sequence generation.

RougeL(total_precision, total_recall, ...)

Computes macro-averaged ROUGE-L recall, precision, and F1-score.

RougeN(total_precision, total_recall, ...)

Computes macro-averaged ROUGE-N recall, precision, and F1-score.

WER(total, count)

Computes Word Error Rate (WER) for speech recognition or text generation tasks.