项目作者: katsugeneration

项目描述 :
Neural Dialogue Generation Benchmarks implemented TensorFlow 2.0
高级语言: Python
项目地址: git://github.com/katsugeneration/tf2-ndg-benchmarks.git
创建时间: 2019-11-10T13:03:18Z
项目社区:https://github.com/katsugeneration/tf2-ndg-benchmarks

开源协议:MIT License

下载


tf2-ndg-benchmarks

Neural Dialogue Generation Benchmarks implemented TensorFlow 2.0


Documentation Status

Usage

Run under the command for setup.

  1. poetry install

Run under python code for using metrics.

  1. from tf2-ndg-benchmarks import metrics
  2. reference = 'It is a guide to action that ensures that the military will forever heed Party commands'
  3. hypothesis = 'It is a guide to action which ensures that the military always obeys the commands of the party'
  4. bleu = metrics.bleu.Bleu()
  5. score = bleu.sentence_score(reference, hypothesis)