This is the program in java which is an interface to stanford postagger. I have attached a copy of it. I am using netbeans 6.7.1 . I have placed the model file which is "left3words-wsj-0-18.tagger" in the bin folder of jdk and also placed the stanford-postagger.jar in that folder.
I have included the the stanford project in the src folder of netbeans projects so I could import files easily.But when I run this program, it gives following errors or exceptions:
Enter sentence(s) to be tagged:
large cats eat small rats.
Exception in thread "main" java.lang.ExceptionInInitializerError at testing.PosTagger.tag(PosTagger.java:18) at testing.PosTagger.main(PosTagger.java:125) Caused by: java.lang.RuntimeException: Uncompilable source code - type parameter edu.stanford.nlp.ling.TaggedWord is not within its bound at edu.stanford.nlp.tagger.maxent.MaxentTagger.<clini t>(MaxentTagger.java:189) ... 2 more Java Result: 1 BUILD SUCCESSFUL (total time: 24 seconds)
How do I remove these errors to run it successfully?