emorynlp / nlp4j

NLP framework for JVM languages.
http://emorynlp.github.io/nlp4j/
Other
149 stars 33 forks source link

How to properly use NLP4J #27

Closed rdeoliveira closed 7 years ago

rdeoliveira commented 7 years ago

Hi, I added the NL4J dependencies to my Maven project then created the following test (almost a copy of NLPDemo.java):

String configFile = "src/main/resources/config-decode-en.xml";

NLPDecoder nlp4j = new NLPDecoder(IOUtils.createFileInputStream(configFile));
NLPNode[] nodes;

String sentence = "John bought a car for Mary.";
nodes = nlp4j.decode(sentence);
System.out.println(Joiner.join(nodes, "\n", 1) + "\n");

The system completed a run in 53 seconds, so I'm wondering what I've done wrong to make it run so slowly. Is there a proper way to use NLP4J to get this? Note that I'm only interested in the dependency tree at the moment, which I'd preferably get as an object, so that I can later use it in my application.

Thanks!

rdeoliveira commented 7 years ago

That is just the 'warmup' time, not the parsing time. I'm guessing this is expected with the current design so I'm closing this issue.