Python Package for a machine translation evaluation metric named LEPOR.
Requirement: Python 3
Install pip package
pip install lepor
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)
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.
If you have more questions or ideas for collaboration contact the author Ikram Ul Haq.
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