FileNotFoundError: [Errno 2] No such file or directory: ‘yourpath/.pyrouge/settings.ini’
解决方法
git clone https://github.com/andersjo/pyrouge.git
pyrouge_set_rouge_path /your/absolute/path/to/pyrouge/tools/ROUGE-1.5.5
Exception: Cannot set data directory because the path /absolute/path/to/ROUGE-1.5.5/directory/data does not exist.
解决方法
git clone https://github.com/andersjo/pyrouge.git
pyrouge_set_rouge_path /your/absolute/path/to/pyrouge/tools/ROUGE-1.5.5
Can’t locate XML/Parser.pm in @INC
Can't locate XML/Parser.pm in @inc (you may need to install the XML::Parser module) (@inc contains: ROUGE-1.5.5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ROUGE-1.5.5/XML/DOM.pm line 41.
BEGIN failed--compilation aborted at ROUGE-1.5.5/XML/DOM.pm line 70.
Compilation failed in require at ROUGE-1.5.5/ROUGE-1.5.5.pl line 177.
BEGIN failed--compilation aborted at ROUGE-1.5.5/ROUGE-1.5.5.pl line 177.
Traceback (most recent call last):
........
解决方法
sudo apt-get install libxml-parser-perl
Cannot open exception db file for reading: yourpath/rouge/tools/ROUGE-1.5.5/data/WordNet-2.0.exc.db
cd data/WordNet-2.0-Exceptions/
rm WordNet-2.0.exc.db # only if exist
./buildExeptionDB.pl . exc WordNet-2.0.exc.db
cd ../
rm WordNet-2.0.exc.db # only if exist
ln -s WordNet-2.0-Exceptions/WordNet-2.0.exc.db WordNet-2.0.exc.db
参考资料:
- https://stackoverflow.com/questions/45894212/installing-pyrouge-gets-error-in-ubuntu
- https://github.com/masters-info-nantes/ter-resume-auto/blob/master/README.md
- https://blog.csdn.net/w5688414/article/details/103799320
- https://pypi.org/project/pyrouge/0.1.0/
- https://github.com/bheinzerling/pyrouge/issues/27
- https://ireneli.eu/2018/01/11/working-with-rouge-1-5-5-evaluation-metric-in-python/
- https://github.com/masters-info-nantes/ter-resume-auto/blob/master/README.md