Skip to content

Instantly share code, notes, and snippets.

@donglixp
Last active May 10, 2022 04:39
Show Gist options
  • Save donglixp/d7eea02d57ba2e099746f8463c2f6597 to your computer and use it in GitHub Desktop.
Save donglixp/d7eea02d57ba2e099746f8463c2f6597 to your computer and use it in GitHub Desktop.
Setup ROUGE-1.5.5
# install XML::DOM plugin, instructions https://web.archive.org/web/20171107220839/www.summarizerman.com/post/42675198985/figuring-out-rouge
cpan App::cpanminus
cpanm XML::DOM
# test fails with XLM::Parser missing error, install it
sudo apt-get install libexpat1-dev
cpanm XML::Parser
cd /mnt/data/
git clone https://github.com/andersjo/pyrouge.git
pip uninstall pyrouge
cd $(mktemp -d)
git clone https://github.com/bheinzerling/pyrouge
cd pyrouge
pip install -e .
pyrouge_set_rouge_path /mnt/data/pyrouge/tools/ROUGE-1.5.5
# Test fails with wordnet related error, fix it
# Instructions https://web.archive.org/web/20180812011301/http://kavita-ganesan.com/rouge-howto/#IamHavingWordNetExceptions
cd /mnt/data/pyrouge/tools/ROUGE-1.5.5/data/
rm WordNet-2.0.exc.db
cd WordNet-2.0-Exceptions/
./buildExeptionDB.pl . exc WordNet-2.0.exc.db
cd ..
ln -s WordNet-2.0-Exceptions/WordNet-2.0.exc.db WordNet-2.0.exc.db
@haozheji
Copy link

haozheji commented May 9, 2022

What's the purpose of installing one pyrouge (line 9) and then uninstall (line 11) and then install another pyrouge (line 15)?

@donglixp
Copy link
Author

What's the purpose of installing one pyrouge (line 9) and then uninstall (line 11) and then install another pyrouge (line 15)?

They are different packages: Rouge155 and pyrouge

@donglixp
Copy link
Author

What's the purpose of installing one pyrouge (line 9) and then uninstall (line 11) and then install another pyrouge (line 15)?

The pulled repo in L9 will be used in L16 and L20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment