Skip to content

ulhaqi12/lepor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEPOR: A Robust Evaluation Metric for Machine Translation with Augmented Factors

Python Package for a machine translation evaluation metric named LEPOR.

Installation

Requirement: Python 3

Install pip package

pip install lepor

How to Run

Calculate the LEPOR for sentences

If you want to check only one sentence:

>>> from lepor import sentence_lepor
>>> reference = 'a bird is on a stone.'
>>> output = 'a stone on a bird.'

>>> sentence_lepor(reference, output)
0.736

If you want to check multiple hypothesis (several sentences):

>>> from lepor import corpus_lepor
>>> corpus_lepor(references, outputs)

In Case of Unexpected Outputs

Create an issue so i will be able to help you as soon as i can. If there are any suggestions or ideas for improvement, feel free to create an issue and generate PR.

Contact

If you have more questions or ideas for collaboration contact the author Ikram Ul Haq.

References

Han, A. L. F., Wong, D. F., & Chao, L. S. (2012). LEPOR: A Robust Evaluation Metric for Machine Translation with Augmented Factors (pp. 441–450). https://aclanthology.org/C12-2044

About

A state of the art Machine Translation Evaluation metric.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages