Giter Site home page Giter Site logo

rougescore's Introduction

rougescore

This is a Python re-implementation of the ROUGE evaluation package.

ROUGE is a suite of evaluation metrics for automatic text summarization. In ROUGE, a "peer" summary produced by a machine summarization system is compared against one or more hand-written "model" summaries and then assigned a score from 0 to 1. This score is the F-measure of recall vs. precision, and the evaluator can adjust a parameter α to control whether this score favors recall (does the peer summary contain all of the information in the model summaries?) or precision (does the peer summary contain only information in the model summaries?). When α ≈ 0, this score favors recall; when α ≈ 1, it favors precision. In the DUC conferences, α was set to 0, and a hard length limit was imposed on generated summaries. The original ROUGE implementation uses α = 0.5 by default.

This package is meant to serve as a faithful replacement for parts of the original Perl implementation of ROUGE, providing pure Python implementations of ROUGE-N and ROUGE-L. The standard Perl script requires that all inputs be passed through files on disk, which makes it cumbersome to fit into a Python workflow and limits performance. In many cases it is more convenient to be able to call a Python function which operates on native Python data types. This version also does not perform any pre-processing of words or characters, admitting lists of arbitrary objects that support equality and hashing.

This package deliberately does not implement stemming or stopword removal. It is up to you to pre-process the peer and model summaries as you see fit before comparing them.

One difference in the implementation of ROUGE-L from the original is that separation of the peer and model summaries into "units" (i.e. sentences) is not supported. That is, peer and model summaries are always treated as single, continuous strings of tokens, whereas the original ROUGE script allows the user to split them into sub-units, which affects the matching of common sub-sequences.

Installation

To install this package (possibly in a virtualenv), run:

git clone https://github.com/bdusell/rougescore.git
cd rougescore
python setup.py install

or simply

pip install git+git://github.com/bdusell/rougescore.git

rougescore's People

Contributors

bdusell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rougescore's Issues

rougescore & persian

In the name of Allah
Hello,
Does rougescore support persian language?
Thank you

rougescore & folder

In the name of GOD.
Hello,
Peers and models are in folder. How does rougescore work with folder.
Thank you

Several reference in rougescore

In the Name of God.
hello

I write followed code for usinge rougescore:
`import rougescore

summary = "I am a teacher."
reference = "I 'm a teacher."

result = rougescore.rouge_1(summary, reference,0)

print(result)`

How can I have four reference?
thank you

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.