andersjo / pyrouge Goto Github PK
View Code? Open in Web Editor NEWAn interface to and, in time, a Python reimplementation of the ROUGE package for evaluating summarization
License: Other
An interface to and, in time, a Python reimplementation of the ROUGE package for evaluating summarization
License: Other
I met some problem on installing DB_File module. When I try to use 'ppm install DB_File', it showed that 'no missing package to install', but when I verify by ppm, it shows 0 files. Is there anyone meet the same problem?
In the README, the following example is given:
ref_texts = {'A': "Poor nations pressurise developed countries into granting trade subsidies.",
'B': "Developed countries should be pressurized. Business exemptions to poor nations.",
'C': "World's poor decide to urge developed nations for business concessions."}
summary_text = "Poor nations demand trade subsidies from developed nations."
However, when providing pyrouge with this input, lines in the created HTML files look like this:
<html>
<head>
<title>A</title>
</head>
<body>
<a name="1">[1]</a> <a href="#1" id=1>P</a>
<a name="2">[2]</a> <a href="#2" id=2>o</a>
<a name="3">[3]</a> <a href="#3" id=3>o</a>
<a name="4">[4]</a> <a href="#4" id=4>r</a>
<a name="5">[5]</a> <a href="#5" id=5> </a>
<a name="6">[6]</a> <a href="#6" id=6>n</a>
<a name="7">[7]</a> <a href="#7" id=7>a</a>
<a name="8">[8]</a> <a href="#8" id=8>t</a>
<a name="9">[9]</a> <a href="#9" id=9>i</a>
If I understand it correctly, each line should contain one sentence. Therefore, the input has to be modified accordingly (e.g. by instead providing ["Poor nations pressurise developed countries into granting trade subsidies .".split()]
).
I install pyrouge with pip install pyrouge
, but it turns out to be another python wrapper for official rouge, see https://github.com/bheinzerling/pyrouge
how to install this pyrouge, and what is the difference between these two projects?
File "/Library/Python/2.7/site-packages/pyrouge/rouge.py", line 76
print("Rouge returned a non-zero error code. Output was: ", file=sys.stderr)
^
SyntaxError: invalid syntax
Do you have any idea how to solve this problem?
I installed this by pip install git+https://github.com/andersjo/pyrouge
Thanks in advanced
how to deal with this ? please help
https://stackoverflow.com/questions/35835842/errors-installing-pyrouge
2017-11-30 21:18:25,950 [MainThread ] [INFO ] Written ROUGE configuration to /tmp/tmp830awd6_/rouge_conf.xml
2017-11-30 21:18:25,950 [MainThread ] [INFO ] Running ROUGE with command /home/lily/zl379/Projects/pointer-generator-rouge/RELEASE-1.5.5/ROUGE-1.5.5.pl -e /home/lily/zl379/Projects/pointer-generator-rouge/RELEASE-1.5.5/data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m /tmp/tmp830awd6_/rouge_conf.xml
Illegal division by zero at /home/lily/zl379/Projects/pointer-generator-rouge/RELEASE-1.5.5/ROUGE-1.5.5.pl line 2450.
Traceback (most recent call last):
File "rouge_baseline2.py", line 20, in
output = r.convert_and_evaluate()
File "/data/tools/tf1/lib/python3.5/site-packages/pyrouge-0.1.3-py3.5.egg/pyrouge/Rouge155.py", line 364, in convert_and_evaluate
rouge_output = self.evaluate(system_id, rouge_args)
File "/data/tools/tf1/lib/python3.5/site-packages/pyrouge-0.1.3-py3.5.egg/pyrouge/Rouge155.py", line 339, in evaluate
rouge_output = check_output(command).decode("UTF-8")
File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/lily/zl379/Projects/pointer-generator-rouge/RELEASE-1.5.5/ROUGE-1.5.5.pl', '-e', '/home/lily/zl379/Projects/pointer-generator-rouge/RELEASE-1.5.5/data', '-c', '95', '-2', '-1', '-U', '-r', '1000', '-n', '4', '-w', '1.2', '-a', '-m', '/tmp/tmp830awd6_/rouge_conf.xml']' returned non-zero exit status 255
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.