Menu

how to use SRILMNgramModel ?

Help
2014-06-01
2014-06-02
  • Kamel Nebhi

    Kamel Nebhi - 2014-06-01

    Hi,

    I'm trying to use the SRILMNgramModel class but i have a Java error when i run this class : java.lang.UnsatisfiedLinkError: no srilmbridge in java.library.path

    How can i load the srilmbridge library properly ?
    I saw a makefile in the srilmbridge directory but it doesn't compile ? Do i have to compile the entire code before ? and how to ?

    Please help me- ;-)

    best

     
  • Michael White

    Michael White - 2014-06-01

    Yes, the idea is to run make in src/srilmbridge. I'm not a C++ person, and neither is Scott Martin really, so if it doesn't compile on your platform, you'll likely be on your own to resolve the compilation issues. The alternative is to use the Java n-gram classes for reasonably small models, or to use the kenlm option on linux.

     
  • Kamel Nebhi

    Kamel Nebhi - 2014-06-01

    Thanks Michael. I think i had probably forgot something. In my error message i have "javah -d . -classpath /classes \ opennlp.ccg.ngrams.SRILMNgramModel
    Error: Could not find class file for 'opennlp.ccg.ngrams.SRILMNgramModel'"
    But i could'nt find any classes directory in openccg.
    Do you think that i need to recompile my sources ? If yes, please let me know how to do.

     
  • Michael White

    Michael White - 2014-06-02

    Ah, yes, I see that it's relying on the compiled classes in ${OPENCCG_HOME}/classes, which are created when building from source. See the main README for how to do that. Basically it should be just running ccg-build in the main director, once the environment variables are all set.

    Note that we haven't been using this SRILM bridge much as we found it wasn't often worth the trouble, per my previous response.

     

Log in to post a comment.