0
public static void main(String[] args)
{
String parsed_sentence = null;
        try {

            parsed_data = new FileInputStream("src/DATA/en-parser-chunking.zip");
            System.out.println("fetched from the file");
            ParserModel model = new ParserModel(parsed_data);
            System.out.println("model created");
            Parser parser = ParserFactory.create(model);
            System.out.println("parseer created");
            String t = "The quick brown fox jumps over the lazy dog .";
            opennlp.tools.parser.Parse topParses[] = ParserTool.parseLine(t, parser, 1);
            System.out.println("parsed ");
            System.out.println(topParses[0]);
        }
        catch (Exception ex)
        {
          System.out.println("Error");
        }

    }  
}
}

Output : fetched from the file Exception in thread "main" java.lang.OutOfMemoryError: Java heap space....

while running this project in Netbeans ,I am getting this error i dont know what to do. I did exactly told on the OpenNLP site http://opennlp.apache.org/documentation/1.5.2-incubating/manual/opennlp.html#tools.parser .

4

1 回答 1

1

netbeans中的Java堆空间..但我已经增加了堆大小!)......这已经解决了我的问题......我需要在我的项目的VMX变量中添加它......

于 2013-03-12T13:32:04.100 回答