Menu

Parser OutOfMemoryError Exception

Anonymous
2004-07-19
2004-07-19
  • Anonymous

    Anonymous - 2004-07-19

    Hi,

    I tried the parser in the OpenNLP tools package. However I always got the following exception when running "java opennlp.tools.parser.EnglishTreebankParser datadir":

    Exception in thread "main" java.lang.OutOfMemoryError

    The directory "datadir" contains all the models or files that I downloaded from OpenNLP CVS:

    build.bin.gz: ~9M
    check.bin.gz: ~3M
    chunk.bin.gz: ~4M
    tag.bin.gz: ~4M
    tagdict
    head_rules

    It seems the first four models are quite big. I am using Java 1.4.2_05.

    Any help is appreiciated!
    Xingbo

     
    • Thomas Morton

      Thomas Morton - 2004-07-19

      Hi,
         There parser needs 300MB of memory to run normally.  You can tell java this by providing a heap size option ala:

      java -mx300M

      I'm pretty sure this option is in the examples in the README.  Hope this helps...Tom

       
    • Anonymous

      Anonymous - 2004-07-19

      Thanks Tom.

      When I added this option I was able to run the parser. However, I didn't see such an example in the README. If this is true, probably you can consider adding one...

      Xingbo

       

Log in to post a comment.