FranxYao / dgm_latent_bow

Implementation of NeurIPS 19 paper: Paraphrase Generation with Latent Bag of Words

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

which rouge version

tech-engin opened this issue · comments

i attempt to install different rouge versions:0.2.0 0.2.1 0.3.1 0.3.2 ,all this versions meet this error:

Traceback (most recent call last):
File "main.py", line 125, in
main()
File "main.py", line 118, in main
controller = Controller(config)
File "/home/techengin/Documents/dgm_latent_bow/src/controller.py", line 199, in init
self.rouge_evaluator = rouge.Rouge(metrics=['rouge-n', 'rouge-l'], max_n=2)
TypeError: init() got an unexpected keyword argument 'max_n'
I found rouge.Rouge only have args: metrics and stats, not have max_n

hope you build requirements.txt

how did you solve this issue?

you can install this version of rouge
pip install py-rouge
This worked for me

Yep this one is good: https://pypi.org/project/py-rouge/
Thank you nathias for directing, and sorry for the late reply.

Also I just find out there is a google implementation:
https://github.com/google-research/google-research/tree/master/rouge
which is supposed to replicate the original Rouge 155 perl results. Try this out!