❓ How to get ROUGE-2 with the ROUGE metric ?
{'login': 'astariul', 'id': 43774355, 'node_id': 'MDQ6VXNlcjQzNzc0MzU1', 'avatar_url': 'https://avatars.githubusercontent.com/u/43774355?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/astariul', 'html_url': 'https://github.com/astariul', 'followers_url': 'https://api.github.com/users/astariul/followers', 'following_url': 'https://api.github.com/users/astariul/following{/other_user}', 'gists_url': 'https://api.github.com/users/astariul/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/astariul/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/astariul/subscriptions', 'organizations_url': 'https://api.github.com/users/astariul/orgs', 'repos_url': 'https://api.github.com/users/astariul/repos', 'events_url': 'https://api.github.com/users/astariul/events{/privacy}', 'received_events_url': 'https://api.github.com/users/astariul/received_events', 'type': 'User', 'site_admin': False}
[]
[]
["ROUGE-1 and ROUGE-L shouldn't return the same thing. This is weird"
 'For the rouge2 metric you can do\r\n\r\n```python\r\nrouge = nlp.load_metric(\'rouge\')\r\nwith open("pred.txt") as p, open("ref.txt") as g:\r\n    for lp, lg in zip(p, g):\r\n        rouge.add(lp, lg)\r\nscore = rouge.compute(rouge_types=["rouge2"])\r\n```\r\n\r\nNote that I just did a PR to have both `.add` and `.add_batch` for metrics, that\'s why now this is `rouge.add(lp, lg)` and not `rouge.add([lp], [lg])`'
 'Well I just tested with the official script and both rouge1 and rougeL return exactly the same thing for the input you gave, so this is actually fine ^^\r\n\r\nI hope it helped :)']
I'm trying to use ROUGE metric, but I don't know how to get the ROUGE-2 metric.

---

I compute scores with :

```python
import nlp

rouge = nlp.load_metric('rouge')
with open("pred.txt") as p, open("ref.txt") as g:
    for lp, lg in zip(p, g):
        rouge.add([lp], [lg])
score = rouge.compute()
```

then : _(print only the F-score for readability)_

```python
for k, s in score.items():
    print(k, s.mid.fmeasure)
```

It gives :

>rouge1 0.7915168355671788
rougeL 0.7915168355671788

---

**How can I get the ROUGE-2 score ?**

Also, it's seems weird that ROUGE-1 and ROUGE-L scores are the same. Did I made a mistake ?

@lhoestq 
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/216/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}