stanford-nlp

Custom relation extraction model using Stanford Core NLP doesn't find any relations

…衆ロ難τιáo~ 提交于 2019-12-11 02:38:07
问题 I trained a custom model for relation extraction using Stanford Core NLP's example. But when I run the model, it doesn't find any relations -- even when I use sentences directly from my training set. I used a verrrry small training set (20 examples) just to make sure I could get the model to train. Even though my training set is ridiculously small, I would still expect the model to work, just very poorly. Why isn't the model able to find any relations? Also, I wanted to name my relation

Stanford's coreNLP Name Entity Recogniser throwing error 500 Server Error: Internal Server Error for url

瘦欲@ 提交于 2019-12-11 02:32:43
问题 I have a set of text files. I am using Stanford's coreNLP Name Entity Recogniser to extract details of the lines where patient name is mentioned out of those files. When I am running NER on a single sentence, it is printing results correctly but when I am running it on set of files, it is printing the results along with error and also I am not able to write the results on a text file because of this: 500 Server Error: Internal Server Error for url: http://localhost:9000/?properties=%7B

edit config file in stanford pos tagger

房东的猫 提交于 2019-12-11 02:21:52
问题 i have tagged a simple sentence and this is my code: package tagger; import edu.stanford.nlp.tagger.maxent.MaxentTagger; public class myTag { public static void main(String[] args) { MaxentTagger tagger = new MaxentTagger("D:/tagger/english-bidirectional-distsim.tagger"); String sample = "i go to school by bus"; String tagged = tagger.tagString(sample); System.out.println(tagged); } } this is the output: Reading POS tagger model from D:/tagger/english-bidirectional-distsim.tagger ... done [3

What is the default number of threads in stanford-corenlp

不想你离开。 提交于 2019-12-11 00:59:48
问题 What is the default number of threads in stanford-corenlp? Specifically, the named entity extractor, and then the information extractor. Also, I would like both to use a single thread for debugging purposes, how do I set this? Thanks! 回答1: Default is 1 thread. There are two ways to run Stanford CoreNLP in a multi-threaded mode. 1.) each thread handles a separate document 2.) each thread handles a separate sentence Suppose you have 4 cores. If you want each thread to handle a separate document

Stanford OpenIE with option openie.resolve_coref don't work

試著忘記壹切 提交于 2019-12-10 22:48:36
问题 I am meeting the openie annotator of Stanford NLP. However the option openie.resolve_coref don't work in my input text. I want use openie for generate triples with coreference resolved. How I can to do this? This code was copied of site Stanford and I added the line: props.setProperty("openie.resolve_coref", "true"); Properties props = new Properties(); props.setProperty("openie.resolve_coref", "true"); props.setProperty("annotators", "tokenize,ssplit,pos,lemma,depparse,parse,natlog,ner,coref

Stanford NLP - VP vs NP

陌路散爱 提交于 2019-12-10 21:27:48
问题 I have one example where Stanford NLP outputs a weird parse tree for the sentence: Clean my desk (ROOT (NP (NP (JJ Clean)) (NP (PRP$ my) (NN desk)))) As you can see, it tags the word Clean as an adjective dependent on the verb desk with the whole phrase being tagged as a Noun Phrase , while my expectation is for Clean to be tagged as a verb, and the phase as a Verb Phrase . The JJ-PRP$-NN combination simply doesn't make sense in English to me. Anyone ever run into something similar? I know

Why does 'corenlp.run' yield different results when I run CoreNLP locally?

﹥>﹥吖頭↗ 提交于 2019-12-10 18:09:36
问题 The website corenlp.run which is supposed to be CoreNLP's demo site, shows pretty different results from when I run the CoreNLP pipeline on my local machine. The website actually shows the correct result, while the local machine version does not. I was wondering if anyone close to the CoreNLP project can explain the differences? Case in point - this is what happens when I use this as an input " Give me a restaurant on Soquel Drive that serves good french food " (this is from the RestQuery

How to use a custom TokensRegex rules annotator with Stanford CoreNLP Server?

不羁的心 提交于 2019-12-10 15:53:05
问题 The TokensRegex rules color annotator ( stanford-corenlp-full-2016-10-31/tokensregex/color.rules.txt ) loads successfully when using CoreNLP through command line but fails for the web server with java.lang.IllegalArgumentException: Unknown annotator: color . Setup # custom.properties annotators=tokenize,ssplit,pos,lemma,ner,regexner,color customAnnotatorClass.color = edu.stanford.nlp.pipeline.TokensRegexAnnotator color.rules = tokensregex/color.rules.txt Command Line $ java -cp "*" -Xmx2g edu

nltk : How to prevent stemming of proper nouns

浪尽此生 提交于 2019-12-10 14:23:16
问题 I am trying to wrote a keyword extraction program using Stanford POS taggers and NER. For keyword extraction, i am only interested in proper nouns. Here is the basic approach Clean up the data by removing anything but alphabets Remove stopwords Stem each word Determine POS tag of each word If the POS tag is a noun then feed it to the NER The NER will then determine if the word is a person, organization or location sample code docText="'Jack Frost works for Boeing Company. He manages 5

Stanford POS Tagger: How to preserve newlines in the output?

不问归期 提交于 2019-12-10 12:03:51
问题 My input.txt file contains the following sample text: you have to let's come and see me. Now if I invoke the Stanford POS tagger with the default command: java -classpath stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTagger -model models/wsj-0-18-bidirectional-distsim.tagger -textFile input.txt > output.txt I get the following in my output.txt file: you_PRP have_VBP to_TO let_VB 's_POS come_VB and_CC see_VB me_PRP ._. The problem with the above output is that I have lost my