Skip to content

Common metrics for dialogue system evaluations

Notifications You must be signed in to change notification settings

csnlp/nlp_metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLP 对话领域的常用自动评价指标

BLEU

关于BLEU的讲解:BLEU 关于BLEU的代码:BLEU 相关依赖: nltk 使用方法:

import bleu

from bleu import cal_bleu

# sentence: a str separated by space; e.g. "Hello World."
# references: a list of sentences: e.g. ["Hello Me", "Good World"]
# weights: a list of number which be summed together is 1; [0.1, 0.2, 0.3, 0.4]. This is for BLEU-4
  The weight for unigram, bigram, 3-gram, 4-gram is [0.1, 0.2, 0.3, 0.4]

BLEU-SCORE = cal_bleu(sentence, references, weights)

ROUGE

DISTINCT

distinct is firstly proposed by Jiwei Li et.al in paper for the diversity evaluation of generated responses.

About

Common metrics for dialogue system evaluations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published