deeppavlov / expected_bleu

Differentiable lower bound for BLEU score.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WARNING

Latest version is here expected_bleu (some bugs were fixed, pytorch 0.4 version)

Differentiable lower bound for expected BLEU score

This is our implementation of lower bound for expected BLEU score. For details, see the corresponding NIPS'17 workshop paper

We are using

Our code inspired on this tensorflow.NMT BLEU script

  • multiBLEU_results.ipynb - results of batched version of our LB on the same but batched version of toy task.

  • modules

    • modules/expectedMultiBleu.py - contains implementation of batched lower bound version from the paper.
    • modules/expectedBLEU.py - contains implementation of lower bound from paper(no batches)
    • modules/matrixBLEU.py - implements computation of BLEU in matrix form (for degenerate distribution it coincides with BLEU)
    • modules/utils.py - support functions

BLEU4

About

Differentiable lower bound for BLEU score.


Languages

Language:Jupyter Notebook 83.7%Language:Python 16.3%