0

我运行SPADE包并根据文档引用了 Charniak Parser 并spade.pl$CHP变量进行了编辑,但它不起作用。它仍然抛出异常如下

sh: 1: /home/khaing/Downloads/CharniakParser/parseIt: not found
system /home/khaing/Downloads/CharniakParser/parseIt -LEn /home/khaing/Downloads/CharniakParser/DATA/ /home/khaing/Documents/test.txt > /home/khaing/Documents/test.txt.chp failed: 32512 at /home/khaing/Downloads/SPADE/bin/spade.pl line 38.

例外是parseIt没有找到。当我查看 Charniak Parser 时,它有五个文件夹:CVSecstuffDATA和. 我没看到。但我在文件夹中找到,所以我编辑了路径 CharniakParser/PARSE/parseIt 但它仍然有错误。TRAINPARSEparseItpareIt.cPARSE

4

2 回答 2

1

您链接的说明

编辑 bin/ 目录下的 spade.pl;将 $CHP 变量的值设置为 Charniak 解析器的目录路径

因此,如果 SPADE 找不到parseIt,那么您设置$CHP了错误的路径。

如果没有parseIt二进制文件但你有,parseIt.c那么我猜你必须构建它。查看Charniak Parser的文档

于 2015-04-21T09:57:28.510 回答
0

以下是获取最新版本的 Charniak 解析器并构建它的具体步骤:

  1. 创建一个您将安装解析器的目录:(/path/to您要将解析器放入的目录在哪里——也许/home/Khaing在您的情况下)

    shell% mkdir /path/to/bllip-parser
    shell% cd /path/to/bllip-parser/
    
  2. 下载并解压最新版本的 Charniak Parser:

    shell% wget https://github.com/BLLIP/bllip-parser/archive/master.zip
    shell% unzip master.zip
    shell% mv bllip-parser-master/* bllip-parser-master/.* .
    shell% rmdir bllip-parser-master
    
  3. 构建解析器:

    shell% make PARSE
    
  4. 确认parseIt已正确构建:

    shell% ls first-stage/PARSE/parseIt  
    first-stage/PARSE/parseIt
    

    如果你运行first-stage/PARSE/parseIt你应该看到它的帮助菜单。

  5. 此时,您可以设置$CHP指向bllip-parser您在步骤 1 中创建的目录:更改$CHPspade.pl/path/to/bllip-parser/first-stage/PARSE/

于 2015-04-26T15:57:32.270 回答