今天爱分享给大家带来pyrouge No such file or directory: ‘yourpath/.pyrouge/settings.ini’【解决办法】,希望能够帮助到大家。
最初安装pyrouge:
pip install pyrouge
出现了下面的错误:
FileNotFoundError: [Errno 2] No such file or directory: 'yourpath/.pyrouge/settings.ini'
解决方法
git clone https://github.com/andersjo/pyrouge.git pyrouge_set_rouge_path /home/eric/Documents/text_summarization/pyrouge/tools/ROUGE-1.5.5
自己找到pyrouge的tools目录下的ROUGE-1.5.5就行了
WordNet-2.0.exc.db
还可能出现下面的问题:
Cannot open exception db file for reading: yourpath/rouge/tools/ROUGE-1.5.5/data/WordNet-2.0.exc.db
pyrouge/tools/ROUGE-1.5.5/data rm WordNet-2.0.exc.db ./WordNet-2.0-Exceptions/buildExeptionDB.pl ./WordNet-2.0-Exceptions ./smart_common_words.txt ./WordNet-2.0.exc.db