stanford-nlp

Score each sentence in a line based upon a tag and summarize the text. (Java)

a 夏天 提交于 2019-12-23 00:23:28
问题 I'm trying to create a summarizer in Java. I'm using the Stanford Log-linear Part-Of-Speech Tagger to tag the words, and then, for certain tags, I'm scoring the sentence and finally in the summary, I'm printing sentences with a high score value. Here's the code: MaxentTagger tagger = new MaxentTagger("taggers/bidirectional-distsim-wsj-0-18.tagger"); BufferedReader reader = new BufferedReader( new FileReader ("C:\\Summarizer\\src\\summarizer\\testing\\testingtext.txt")); String line = null;

Stanford Dependencies Conversion Tool [closed]

泄露秘密 提交于 2019-12-22 17:53:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . The Stanford dependencies manual (http://nlp.stanford.edu/software/dependencies_manual.pdf) mentions: "Or our conversion tool can convert the output of other constituency parsers to the Stanford Dependencies representation." Does anyone know where is that tool available or how to use it? The Stanford Parser

Which settings should be used for TokensregexNER

陌路散爱 提交于 2019-12-22 10:28:49
问题 When I try regexner it works as expected with the following settings and data; props.setProperty("annotators", "tokenize, cleanxml, ssplit, pos, lemma, regexner"); Bachelor of Laws DEGREE Bachelor of (Arts|Laws|Science|Engineering|Divinity) DEGREE What I would like to do is that using TokenRegex. For example Bachelor of Laws DEGREE Bachelor of ([{tag:NNS}] [{tag:NNP}]) DEGREE I read that to do this, I should use TokensregexNERAnnotator. I tried to use it as follows, but it did not work.

Running Stanford corenlp server with French models

泪湿孤枕 提交于 2019-12-22 06:49:17
问题 I am trying to analyse some French text with the Stanford CoreNLP tool (it's my first time trying to use any StanfordNLP software) To do so, I have downloaded the v3.6.0 jar and the corresponding french models. Then I run the server with: java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer As described in this answer, I call the API with: wget --post-data 'Bonjour le monde.' 'localhost:9000/?properties={"parse.model":"edu/stanford/nlp/models/parser/nndep/UD_French.gz",

How to print the parse tree of Stanford JavaNLP

谁说我不能喝 提交于 2019-12-22 01:44:41
问题 I am trying to get all the noun phrases using the edu.stanford.nlp.* package. I got all the subtrees of label value "NP", but I am not able to get the normal original String format (not Penn Tree format). E.g. for the subtree.toString() gives (NP (ND all)(NSS times))) but I want the string "all times". Can anyone please help me. Thanks in advance. 回答1: I believe what you want is something like: final StringBuilder sb = new StringBuilder(); for ( final Tree t : tree.getLeaves() ) { sb.append(t

How to recognize a named entity that is lowcase such as kobe bryant by CoreNLP?

痞子三分冷 提交于 2019-12-21 22:11:16
问题 I got a problem that CoreNLP can only recognize named entity such as Kobe Bryant that is beginning with a uppercase char, but can't recognize kobe bryant as a person!!! So how to recognize a named entity that is beginning with a lowercase char by CoreNLP ???? Appreciate it !!!! 回答1: First off, you do have to accept that it is harder to get named entities right in lowercase or inconsistently cased English text than in formal text, where capital letters are a great clue. (This is also one

How to create incremental NER training model(Appending in existing model)?

三世轮回 提交于 2019-12-21 20:43:18
问题 I am training customized Named Entity Recognition(NER) model using stanford NLP but the thing is i want to re-train the model . Example : Suppose i trained xyz model , then i will test it on some text if model detected somethings wrong then i (end user) will correct it and wanna re-train(append mode) the model on the corrected text. Stanford Doesn't provide re-training facility so thats why i shifted towards spacy library of python , where i can retrain the model means , i can append new

How to create incremental NER training model(Appending in existing model)?

不问归期 提交于 2019-12-21 20:42:58
问题 I am training customized Named Entity Recognition(NER) model using stanford NLP but the thing is i want to re-train the model . Example : Suppose i trained xyz model , then i will test it on some text if model detected somethings wrong then i (end user) will correct it and wanna re-train(append mode) the model on the corrected text. Stanford Doesn't provide re-training facility so thats why i shifted towards spacy library of python , where i can retrain the model means , i can append new

Why is stanford corenlp gender identification nondeterministic?

心不动则不痛 提交于 2019-12-21 20:29:12
问题 I have the following results and as you can see the name edward has different results (null and male). This has happened with several names. edward, Gender: null james, Gender: MALE karla, Gender: null edward, Gender: MALE Additionally, how can I customize the gender dictionaries? I want to add Spanish and Chinese names. 回答1: You have raised a lot of issues! 1.) Karla is not in the default gender mappings file, so that is why that's getting null 2.) If you want to make your own custom file,

Lazy parsing with Stanford CoreNLP to get sentiment only of specific sentences

一笑奈何 提交于 2019-12-21 20:25:29
问题 I am looking for ways to optimize the performance of my Stanford CoreNLP sentiment pipeline. As a result, a want to get sentiment of sentences but only those which contain specific keywords given as an input. I have tried two approaches: Approach 1: StanfordCoreNLP pipeline annotating entire text with sentiment I have defined a pipeline of annotators: tokenize, ssplit, parse, sentiment. I have run it on entire article, then looked for keywords in each sentence and, if they were present, run a