stanford-nlp

How do we get run Stanford Classifier on an array of Strings?

痴心易碎 提交于 2020-01-05 13:12:01
问题 I have got an array of strings String strarr[] = { "What a wonderful day", "beautiful beds", "food was awesome" }; I also have a trained dataset Room What a beautiful room Room Wonderful sea-view Room beds are comfortable Room bed-spreads are good Food The dinner was marvellous Food Tasty foods Service people are rude Service waitors were not on time Service service was horrible Pogrammatically I am unable to get the scores and labels of the strings I want to classify. If however, I am using

How do we get run Stanford Classifier on an array of Strings?

落花浮王杯 提交于 2020-01-05 13:11:34
问题 I have got an array of strings String strarr[] = { "What a wonderful day", "beautiful beds", "food was awesome" }; I also have a trained dataset Room What a beautiful room Room Wonderful sea-view Room beds are comfortable Room bed-spreads are good Food The dinner was marvellous Food Tasty foods Service people are rude Service waitors were not on time Service service was horrible Pogrammatically I am unable to get the scores and labels of the strings I want to classify. If however, I am using

Maven build throws JodaTime Exception at runtime

亡梦爱人 提交于 2020-01-05 10:20:07
问题 I'm building a maven-based java application using corenlp 3.3.1. The salient pom.xml dependencies are <dependency> <groupId>edu.stanford.nlp</groupId> <artifactId>stanford-corenlp</artifactId> <version>3.3.1</version> </dependency> <dependency> <groupId>edu.stanford.nlp</groupId> <artifactId>stanford-corenlp</artifactId> <version>3.3.1</version> <classifier>models</classifier> </dependency> Running mvn dependency:tree gives: [INFO] +- log4j:log4j:jar:1.2.17:compile [INFO] +- commons-logging

Stanford CoreNLP Server disable logging

一曲冷凌霜 提交于 2020-01-04 22:44:28
问题 I have the feeling that the logging of the server is quite exhaustive. Is there a way to disable or reduce the logging output? It seems that if I send a document to the server it will write the content to stdout which might be a performance killer. Can I do that somehow? Update I found a way to suppress the output from the server. Still my question is how and if I can do this using a command line argument for the actual server. However for a dirty workaround it seems the following can ease

How to use entitymentions annotator in stanford CoreNLP?

巧了我就是萌 提交于 2020-01-04 13:38:29
问题 I am trying the newest version of Stanford CoreNLP. When I extract location or organisation names, I see that every single word is tagged with the annotation. So, if the entity is "NEW YORK TIMES", then it is getting recorded as three different entities : "NEW", "YORK" and "TIMES". I find that the newest CoreNLP have "entitymentions" annotator. I think this annotator may help me to solve this problem. However, there is no usage instruction or example for this annotator. Could anyone give me

Crossvalidation in Stanford NER

爱⌒轻易说出口 提交于 2020-01-04 05:56:50
问题 I'm trying to use cross validation in Stanford NER. The feature factory lists 3 properties: numFolds int 1 The number of folds to use for cross-validation. startFold int 1 The starting fold to run. numFoldsToRun int 1 The number of folds to run. which I think should be used for cross validation. But I don't think they actually work. Setting numFolds to 1 or 10 doesn't change the running time for training at all. And strangely, using numFoldsToRun gives the following warning: Unknown property:

R's coreNLP::initCoreNLP() throws java.lang.OutOfMemoryError

☆樱花仙子☆ 提交于 2020-01-04 05:54:09
问题 coreNLP is an R package for interfacing with Standford's CoreNLP Java libraries. The first line one must execute (after loading the appropriate packages with the library() command) is initCoreNLP() . Unfortunately, this results in the following error: Loading classifier from edu/stanford/nlp/models/ner/english.conll.4class.distsim.crf.ser.gz ... Error in rJava::.jnew("edu.stanford.nlp.pipeline.StanfordCoreNLP", basename(path)) : java.lang.OutOfMemoryError: GC overhead limit exceeded Note,

Adding a new annotator in Stanford CoreNLP

橙三吉。 提交于 2020-01-03 05:10:09
问题 I am trying to add a new annotator in Stanford CoreNLP according to the instructions in http://nlp.stanford.edu/downloads/corenlp.shtml. "Adding a new annotator StanfordCoreNLP also has the capacity to add a new annotator by reflection without altering the code in StanfordCoreNLP.java . To create a new annotator, extend the class edu.stanford.nlp.pipeline.Annotator and define a constructor with the signature (String, Properties). Then, add the property customAnnotatorClass. FOO=BAR to the

Killing Stanford core nlp process

断了今生、忘了曾经 提交于 2020-01-03 04:05:27
问题 I launch Stanford Core NLP server using the following command (on Ubuntu 16.04): java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000 I would like to kill this server once I am done using it. Simply closing terminal does not help. It does not release memory. Is there way to kill it and release memory without rebooting computer? 回答1: You can always CTRL-C in the terminal window to stop the server. You could also ps aux | grep StanfordCoreNLPServer to

Killing Stanford core nlp process

别说谁变了你拦得住时间么 提交于 2020-01-03 04:05:05
问题 I launch Stanford Core NLP server using the following command (on Ubuntu 16.04): java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000 I would like to kill this server once I am done using it. Simply closing terminal does not help. It does not release memory. Is there way to kill it and release memory without rebooting computer? 回答1: You can always CTRL-C in the terminal window to stop the server. You could also ps aux | grep StanfordCoreNLPServer to