Code Monkey home page Code Monkey logo

py-hlepor's Introduction

py-hLEPOR

py-hLEPOR is a Python Bindings to hLEPOR metric

Syntax

py-hLEPOR supports both file and sentence level. In case of sentence-level uses "\n" as a line separator.

python py-hLEPOR.py "reference_file|reference_sentences" "candidate_file|candidate_sentences"

Usage

Input example:

python hlepor/py-hLEPOR.py "Ánimo hola\nterminar la máquina" "Vamos hola\nponer fin a la máquina" > output.json

Output example (Pretty-print):

{
   "id":433,
   "reference_sentence":[
      "Ánimo hola",
      "terminar la máquina"
   ],
   "candidate_sentence":[
      "Vamos hola",
      "poner fin a la máquina"
   ],
   "length_of_sysoutput":[
      "2",
      "5"
   ],
   "length_of_reference":[
      "2",
      "3"
   ],
   "length_penalty_with_longer_or_shorter":[
      "1",
      "0.513417119032592"
   ],
   "mean_of_length_penalty_with_longer_or_shorter":[
      "0.756708559516296"
   ],
   "common_number_between_sys_and_ref":[
      "1",
      "2"
   ],
   "precision_of_sys":[
      "0.5",
      "0.4"
   ],
   "recall_of_sys":[
      "0.5",
      "0.666666666666667"
   ],
   "mean_precision_of_sys":[
      "0.45"
   ],
   "mean_recall_of_sys":[
      "0.583333333333333"
   ],
   "harmonic_of_precision_and_recall":[
      "0.5",
      "0.625"
   ],
   "mean_of_every_sentences_harmonic-mean_of_precision_and_recall":[
      "0.5625"
   ],
   "position_different_penalty":[
      "1",
      "0.973685749353145"
   ],
   "mean_position_different_penalty":[
      "0.986842874676573"
   ],
   "evaluation_value_hlepor_of_every_single_sentence":[
      "0.588235294117647",
      "0.620251452337594"
   ],
   "mean_value_hlepor_of_all_single_sentence":[
      "0.60424337322762"
   ],
   "mean_value_hlepor_anotherway_of_all_single_sentence":[
      "0.621087055947722"
   ]
}

py-hlepor's People

Contributors

kawaeee avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

poethan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.