0

I run the SPADE package and I referenced the Charniak Parser according to the documentation and edited spade.pl for the $CHP variable, but it did not work. It still throws an exception as follows

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.

The exception is that parseIt is not found. When I review the Charniak Parser, it has five folders: CVS, ecstuff, DATA, TRAIN and PARSE. I did not see parseIt. But I found pareIt.c in PARSE folder so I edited the path CharniakParser/PARSE/parseIt but it still has errors.

Borodin
  • 126,100
  • 9
  • 70
  • 144
Khaing
  • 1
  • 1
  • Please give a link to the page where you downloaded the parser. I cannot see it on Charniak's home page – Borodin Apr 21 '15 at 10:01
  • Please see [*Compiling Charniak's Parser*](http://stackoverflow.com/q/7287087) – Borodin Apr 21 '15 at 10:09
  • The version of the parser on Charniak's website doesn't compile easily these days. The currently maintained version is at https://github.com/BLLIP/bllip-parser. To build parseIt, you'll need to run `make PARSE` from the top-level directory. – dmcc Apr 21 '15 at 14:58
  • >> here is link for parser [link] (ftp://ftp.cs.brown.edu/pub/nlparser/) @ Borodin – Khaing Apr 23 '15 at 16:33

2 Answers2

1

The instructions that you link to say

Edit spade.pl in the bin/ directory; set the value for the $CHP variable to the directory path for Charniak's parser

So if SPADE cannot find parseIt then you have set $CHP to the wrong path.

If there is no parseIt binary but you have parseIt.c then I would guess that you have to build it. Check the documentation for the Charniak Parser

Borodin
  • 126,100
  • 9
  • 70
  • 144
  • in SPADE, the instruction is " set the value for the $CHP variable to the directory path for Charniak parser" . So, i set the value ' $CHP = "/home/Khaing/CharniakParser/";' for path of the parser. But in line 26, the code is '@args = ("$CHP/parseIt -LEn $CHP/DATA/ $argv > $argv.chp"); print STDERR "Charniak's syntactic parser in progress...\n";' In running, the error appeared like that " /home/Khaing/CharniakParser/parseIt not found" . I didn't find any information on parseIt. May i know if i need to create parseIt under this parser or not. Please! @Borodin – Khaing Apr 23 '15 at 16:55
0

Here are concrete steps to obtain the latest version of the Charniak parser and build it:

  1. Make a directory where you'll install the parser: (where /path/to is the directory you'd like to put the parser in -- maybe /home/Khaing in your case)

    shell% mkdir /path/to/bllip-parser
    shell% cd /path/to/bllip-parser/
    
  2. Download and extract the latest version of the 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. Build the parser:

    shell% make PARSE
    
  4. Confirm that parseIt was built correctly:

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

    If you run first-stage/PARSE/parseIt you should see its help menu.

  5. At this point, you can set $CHP to point inside the bllip-parser directory you made in step 1: Change $CHP in spade.pl to /path/to/bllip-parser/first-stage/PARSE/

dmcc
  • 2,519
  • 28
  • 30
  • Thanks a lot @dmcc, i did step by step to your instructions. In step 3, when i did " make PARSE", i found 2 errors . How can I fix them? i searched the errors frequently but still appear. **** ' khaing@khaing-VirtualBox:~/bllip-parser$ make PARSE
    make -C first-stage/PARSE parseIt
    make[1]: Entering directory `/home/khaing/bllip-parser/first-stage/PARSE'
    g++ -MMD -O3 -Wall -ffast-math -finline-functions -fomit-frame-pointer -fstrict-aliasing -c Bchart.C
    make[1]: g++: Command not found
    make[1]: *** [Bchart.o] Error 127 ' ***
    – Khaing May 04 '15 at 16:21
  • Looks like you don't have g++ which you'll need to compile the C++ code. You should install gcc (which includes g++). – dmcc May 04 '15 at 18:07