Dear Everybody
I'm a Vietnamese. This time, I'm researching tool of OpenNLP to process
Vietnamese language. I found some example code on this link
http://incubator.apache.org/opennlp/documentation/manual/opennlp.html.
But, when I parsed to get the grammar structure of the sentence, the
application show the notice as: Exception in thread "main"
java.lang.OutOfMemoryError: Java heap space
My code is very simple as follows:
=================================================================
InputStream modelInParser =
new FileInputStream(HOME_DIR +
"resources/model/en-parser-chunking.bin");
try {
ParserModel modelParser = new ParserModel(modelInParser);
Parser parser = ParserFactory.create(modelParser);
// String sentenceTest =
// "The quick brown fox jumps over the lazy dog .";
Parse topParses[] = ParserTool.parseLine(this.sentence, parser,
1);
System.out.println("******Ket thuc******");
} catch (IOException e) {
e.printStackTrace();
} finally {
if (modelInParser != null) {
try {
modelInParser.close();
} catch (IOException e) {
}
}
}
================================================================
Is there any idea to resovle this problem?
Thanks and best regards