0

I am trying to parse a sentence using the Stanford's lexical parser. I copied the code from How can I integrate stanford parser software in my java program?. But when I run this code, it gives me the following error:

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
  symbol:   class lexparser
  location: class edu.stanford.nlp.parser
    at edu.stanford.nlp.parser.<clinit>(parser.java:10)
/home/shivam/.cache/netbeans/8.1/executor-snippets/run.xml:53: Java returned: 1

I have integrated the Stanford's corenlp jar files with the project. I am attaching the screenshot of the jar files included in my library. enter image description here When I open the stanford-corenlp.jar file, I can see parser inside edu/stanford/nlp and also can see lexparser inside parser.

Community
  • 1
  • 1
Shivam Mitra
  • 1,040
  • 3
  • 17
  • 33
  • Get a smarter IDE: IntelliJ. It's probably Eclipse or Netbeans shenanigans: https://stackoverflow.com/questions/4386076/uncompilable-source-code-runtimeexception-in-netbeans – duffymo May 01 '16 at 23:54
  • 1
    You've copied the JAR, but is it on your build path? – LeeCambl May 02 '16 at 00:02
  • Why do you have a lowercase `parser.java` file? And why are you using the `edu.stanford.nlp` namespace in your own project? That said, none of these should cause the problem you're describing. Maybe a simple `make clean && make` -- i.e., rebuild the project? Otherwise, as @LeeCambl suggested, it might be a classpath issue. – Gabor Angeli May 02 '16 at 00:09

0 Answers0