Menu

Sentence detector constructor and models

Help
IamLove
2010-04-19
2013-04-11
  • IamLove

    IamLove - 2010-04-19

    Hi,
    I am using the OpenNLP library in my java project for sentence detection. I have this code:

    final String fs = System.getProperty("file.separator");
    final String path = "C:" + fs + "Users" + fs + "Zdravko" + fs + "Documents" + fs + "Job" + fs + "EnglishSD.bin.gz";
    sd = new SentenceDetector(path);
    

    The code must load the model for English sentences, located in C:\Users\Zdravko\Documents\Job
    Unfortunately, upon runtime I get this exception on the constructor line:

    xception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: opennlp/maxent/DataStream
    

    Could you give me any idea why? I would be grateful for any comments.
    Thanks in advance!

     
  • IamLove

    IamLove - 2010-04-22

    I got it. The problem is that I missed the maxent and trove jar libraries.

     

Log in to post a comment.

MongoDB Logo MongoDB