On Sat, Apr 18, 2009 at 5:18 AM, hari939 <hari...@gmail.com> wrote: > > My project of parsing through material for a semantic search engine > requires > me to use the http://nlp.stanford.edu/software/lex-parser.shtml Stanford > NLP parser on hadoop cluster. > > To use the Stanford NLP parser, one must create a lexical parser object > using a englishPCFG.ser.gz file as a constructor's parameter. > i have tried loading the file onto the Hadoop dfs in the /user/root/ folder > and have also tried packing the file along with the jar of the java > program.
Use getResourceAsStream to read it from the jar. Use the ObjectInputStream constructor. That is, new LexicalizedParser(new ObjectInputStream(new GzipInputStream(ClassName.class.getResourceAsStream("/englishPCFG.ser.gz"))) I'm interested to know if you have found any other open source parsers in Java or at least have java bindings.