bheinzerling / pyrouge

A Python wrapper for the ROUGE summarization evaluation package
MIT License
250 stars 71 forks source link

UnicodeDecodeError #22

Open fhojati opened 6 years ago

fhojati commented 6 years ago

i'v been trying to run my code although i run this correctly :python3 -m pyrouge.test and it is answer me correct when i run this : from pyrouge import Rouge155

r = Rouge155() r.system_dir = 'sys-summs' r.model_dir = 'ref-summs' r.system_filename_pattern = 'summ.(\d+).txt' r.model_filename_pattern = 'summ.[A-Z].#ID#.txt'

output = r.convert_and_evaluate() print(output) output_dict = r.output_to_dict(output)

i get this errorUnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte

my txt format is utf8 i converts them to utf8 but again i get this error

Shi-Linqing-Jason commented 5 years ago

I have the this problem, too. And I still cannot solve it.

Shi-Linqing-Jason commented 5 years ago

I have solved this problem. My device is a mac. There will be a file called '.DS_Store' in each folder, which results in the mistake.

AyeshaSarwar commented 4 years ago

I am running the same code on python 2.7, Windows 10 I have no hidden files and all the encoding is in UTF-8 Still getting this error UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte