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.
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
Here are concrete steps to obtain the latest version of the Charniak parser and build it:
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/
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
Build the parser:
shell% make PARSE
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.
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/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.