AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp

文章目录

  • 下载文件夹 + 解压
  • 创建 / 配置环境
  • 更改配置文件
  • 剩下的

  • 论文: One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Complex Pipeline
  • github 链接

下载文件夹 + 解压

AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第1张图片

  • 然后在本地解压一下

创建 / 配置环境

  • github 没限制你使用什么环境,但是我建议使用 conda 来创建一个虚拟环境(我用的 python版本是 3.6
conda create -n spring python=3.6
conda activate sprint
cd spring
pip install -r requirements.txt
pip install -e .

更改配置文件

AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第2张图片

  • 更改这三个路径,它文件中本来的写法是:
    AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第3张图片

  • 但很显然你没有这个 DATA 文件夹,这也就是数据集文件夹,你可以去网上下载数据集,我这里用的是 AMR2.0 (LDC2017T10) ,我在这里提供了下载链接,大家可以随意下载
    提取码: b3rv

  • 下载之后,把文件名改成你喜欢的样子(我改成的是 AMR2),然后直接放到文件目录下面,并且把 config.yaml 中的 DATA 改成数据集的名称即可,因为后面的路径都是对的
    AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第4张图片

  • 然后正常运行,发现报如下错误:
    AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第5张图片
    AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第6张图片

  • 发现原来是作者输出 evaluation 结果的时候的这个路径不存在,我们在这里给 data 文件中创建一个 tmp 的路径即可
    AMR 论文复现之:One SPRING to Rule Them Both: Symmetric AMR Semantic Parsing and Generation without a Comp_第7张图片

剩下的

  • 剩下的没问题了,按照步骤执行即可

你可能感兴趣的:(论文阅读与代码复现,spring,python,java)