All Projects → pcyin → PyRouge

pcyin / PyRouge

Licence: other
A python library to compute rouge score for summarization

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PyRouge

DynamicEntitySummarization-DynES
Dynamic Entity Summarization (DynES)
Stars: ✭ 21 (-61.11%)
Mutual labels:  summarization
code summarization public
source code for 'Improving automatic source code summarization via deep reinforcement learning'
Stars: ✭ 71 (+31.48%)
Mutual labels:  summarization
PlanSum
[AAAI2021] Unsupervised Opinion Summarization with Content Planning
Stars: ✭ 25 (-53.7%)
Mutual labels:  summarization
TR-TPBS
A Dataset for Thai Text Summarization with over 310K articles.
Stars: ✭ 25 (-53.7%)
Mutual labels:  summarization
seq3
Source code for the NAACL 2019 paper "SEQ^3: Differentiable Sequence-to-Sequence-to-Sequence Autoencoder for Unsupervised Abstractive Sentence Compression"
Stars: ✭ 121 (+124.07%)
Mutual labels:  summarization
verseagility
Ramp up your custom natural language processing (NLP) task, allowing you to bring your own data, use your preferred frameworks and bring models into production.
Stars: ✭ 23 (-57.41%)
Mutual labels:  summarization
TitleStylist
Source code for our "TitleStylist" paper at ACL 2020
Stars: ✭ 72 (+33.33%)
Mutual labels:  summarization
fawkes
🚀🚀 Fetch, parse, categorize, summarize user reviews 🚀🚀
Stars: ✭ 83 (+53.7%)
Mutual labels:  summarization
FewSum
Few-shot learning framework for opinion summarization published at EMNLP 2020.
Stars: ✭ 29 (-46.3%)
Mutual labels:  summarization
data-summ-cnn dailymail
non-anonymized cnn/dailymail dataset for text summarization
Stars: ✭ 12 (-77.78%)
Mutual labels:  summarization
frame
Notetaking Electron app that can answer your questions and makes summaries for you
Stars: ✭ 88 (+62.96%)
Mutual labels:  summarization
struct infused summ
(COLING'18) The source code for the paper "Structure-Infused Copy Mechanisms for Abstractive Summarization".
Stars: ✭ 29 (-46.3%)
Mutual labels:  summarization
DocSum
A tool to automatically summarize documents abstractively using the BART or PreSumm Machine Learning Model.
Stars: ✭ 58 (+7.41%)
Mutual labels:  summarization
hf-experiments
Experiments with Hugging Face 🔬 🤗
Stars: ✭ 37 (-31.48%)
Mutual labels:  summarization
rouge
A Javascript implementation of the Recall-Oriented Understudy for Gisting Evaluation (ROUGE) evaluation metric for summaries.
Stars: ✭ 36 (-33.33%)
Mutual labels:  summarization
teanaps
자연어 처리와 텍스트 분석을 위한 오픈소스 파이썬 라이브러리 입니다.
Stars: ✭ 91 (+68.52%)
Mutual labels:  summarization
nlp-akash
Natural Language Processing notes and implementations.
Stars: ✭ 66 (+22.22%)
Mutual labels:  summarization
gazeta
Gazeta: Dataset for automatic summarization of Russian news / Газета: набор данных для автоматического реферирования на русском языке
Stars: ✭ 25 (-53.7%)
Mutual labels:  summarization
Entity2Topic
[NAACL2018] Entity Commonsense Representation for Neural Abstractive Summarization
Stars: ✭ 20 (-62.96%)
Mutual labels:  summarization
HSSC
Code for "A Hierarchical End-to-End Model for Jointly Improving Text Summarization and Sentiment Classification" (IJCAI 2018)
Stars: ✭ 23 (-57.41%)
Mutual labels:  summarization

PyRouge

A Python implementation of the rouge summarization metric. Support both Rouge-l and Rouge-2 metrics.

How to use it

  • Check out following test code.
from PyRouge.pyrouge import Rouge

r = Rouge()

system_generated_summary = "The Kyrgyz President pushed through the law requiring the use of ink during the upcoming Parliamentary and Presidential elections In an effort to live up to its reputation in the 1990s as an island of democracy. The use of ink is one part of a general effort to show commitment towards more open elections. improper use of this type of ink can cause additional problems as the elections in Afghanistan showed. The use of ink and readers by itself is not a panacea for election ills."

manual_summmary = "The use of invisible ink and ultraviolet readers in the elections of the Kyrgyz Republic which is a small, mountainous state of the former Soviet republic, causing both worries and guarded optimism among different sectors of the population. Though the actual technology behind the ink is not complicated, the presence of ultraviolet light (of the kind used to verify money) causes the ink to glow with a neon yellow light. But, this use of the new technology has caused a lot of problems. "

[precision, recall, f_score] = r.rouge_l([system_generated_summary], [manual_summmary])

print("Precision is :"+str(precision)+"\nRecall is :"+str(recall)+"\nF Score is :"+str(f_score))
  • Which gives the following output
Precision is :0.446058091286
Recall is :0.439672801636
F Score is :0.442843380487
  • Also you can check that if both the summaries are same, you get a score of 1.

  • Note that you can also use it with numbers as follows.

from PyRouge.pyrouge import Rouge
r = Rouge()
print(r.rouge_l([[1, 7, 6, 7, 5], [0, 2, 8, 3, 5]], [[1, 2, 3, 4, 5], [3, 9, 5]]))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].