TysonYu / Laysumm

The code repository for the paper "Dimsum @LaySumm 20: BART-based Approach for Scientific Document Summarization".
24 stars 6 forks source link

preprocess_sent_label.py此文件运行错误 #1

Open LGDEMO opened 3 years ago

LGDEMO commented 3 years ago
  你好,很高兴你能开源你的代码,我对你今年发表的《Dimsum @LaySumm 20: BART-based Approach for Scientific Document  Summarization》这篇论文很感兴趣,我现在也要生成label标签,但是运行报错,所以请教一下你,希望你得到你的帮助,谢谢!!!!

Traceback (most recent call last): File "D:/Python_WorkSpace/Laysumm/BART/preprocess_sent_label.py", line 258, in rouge = nlp.load_metric('rouge') File "D:\Anaconda3\envs\myenv\lib\site-packages\nlp\load.py", line 442, in load_metric module_path, hash = prepare_module(path, download_config=download_config, dataset=False) File "D:\Anaconda3\envs\myenv\lib\site-packages\nlp\load.py", line 303, in prepare_module f"To be able to use this {module_type}, you need to install the following dependencies" ImportError: To be able to use this metric, you need to install the following dependencies['absl', 'rouge_score', 'rouge_score'] using 'pip install # Here to have a nice missing dependency error message early on rouge_score rouge_score' for instance'

TysonYu commented 3 years ago

Hi, Thank you for your interest in our paper. From the error message. It seems you didn't install the rouge metric correctly. The rouge we use here is based on this tool: huggingface nlp. You can check this issue How to get ROUGE-2 with the ROUGE metric ? to learn how to use the metric.