I am trying to run the Charniak parser provided in stanford-corenlp-1.3.5.jar
. The package for the record is edu.stanford.nlp.parser.charniak
and the class CharniakParser
.
So I will give a code example of how I am trying to use it just for completeness:
CharniakParser cp = new CharniakParser();
PTBTokenizer<HasWord> ptbt = new PTBTokenizer(new FileReader("sample1.txt"), new WordTokenFactory(), "");
List<Word> tokens = new ArrayList<Word>();
for (Word token; ptbt.hasNext(); ) {
token = (Word) ptbt.next();
tokens.add(token);
}
Tree t = cp.getBarseParse(tokens);
On the last line there when running this code , I get
cannot run program "/u/nlp/packages/bllip-parser/reranking-parser.sh" ... The system cannot find the specified file
The problem is the human cannot find the specified file either. I do not see that included in the distribution and I cannot find a dependency that I might need to download with that name. A Google search reveals that the only place a 'reranking-parser.sh' exists is in the actual source code for Stanford's version of Charniak parser (I am trying hard to be clear because I know Stanford did not originally create the Charniak parser, it is from Brown).
So, does anyone have experience with this parser? What is missing? I like my chances better on SO, so I ask here.