stanford-nlp

Stanford NLP parse tree format

為{幸葍}努か 提交于 2019-11-27 16:57:21
问题 This may be a silly question, but how does one iterate through a parse tree as an output of an NLP parser (like Stanford NLP)? It's all nested brackets, which is neither an array nor a dictionary or any other collection type I've used. (ROOT\n (S\n (PP (IN As)\n (NP (DT an) (NN accountant)))\n (NP (PRP I))\n (VP (VBP want)\n (S\n (VP (TO to)\n (VP (VB make)\n (NP (DT a) (NN payment)))))))) 回答1: This particular output format of the Stanford Parser is call the "bracketed parse (tree)". It is

Error in stanford nlp core

浪尽此生 提交于 2019-11-27 13:20:22
问题 I downloaded the stanford nlp and when i run the code which is given in their website . I get an error in this line : StanfordCoreNLP pipeline = new StanfordCoreNLP(props); The error is as follows : Exception in thread "main" java.lang.NoClassDefFoundError: nu/xom/Node at sample1.main(sample1.java:35) Caused by: java.lang.ClassNotFoundException: nu.xom.Node at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController

Tools for text simplification (Java) [closed]

一曲冷凌霜 提交于 2019-11-27 11:03:44
What is the best tool that can do text simplification using Java? Here is an example of text simplification: John, who was the CEO of a company, played golf. ↓ John played golf. John was the CEO of a company. Khairul I see your problem as a task of converting complex or compound sentence into simple sentences. Based on literature Sentence Types , a simple sentence is built from one independent clause. A compound and complex sentence is built from at least two clauses. Also, clause must have subject and verb. So your task is to split sentence into clauses that form your sentence. Dependency

Stanford nlp for python

这一生的挚爱 提交于 2019-11-27 10:49:01
All I want to do is find the sentiment (positive/negative/neutral) of any given string. On researching I came across Stanford NLP. But sadly its in Java. Any ideas on how can I make it work for python? Use py-corenlp Download Stanford CoreNLP The latest version at this time (2018-10-23) is 3.9.2: wget https://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip https://nlp.stanford.edu/software/stanford-english-corenlp-2018-10-05-models.jar If you do not have wget , you probably have curl : curl https://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip -O https://nlp

stanford core nlp java output

梦想与她 提交于 2019-11-27 10:34:57
问题 I'm a newbie with Java and Stanford NLP toolkit and trying to use them for a project. Specifically, I'm trying to use Stanford Corenlp toolkit to annotate a text (with Netbeans and not command line) and I tried to use the code provided on http://nlp.stanford.edu/software/corenlp.shtml#Usage (Using the Stanford CoreNLP API).. question is: can anybody tell me how I can get the output in a file so that I can further process it? I've tried printing the graphs and the sentence to the console, just

How to install and invoke Stanford NERTagger?

不羁岁月 提交于 2019-11-27 06:55:19
问题 I am trying to use NLTK interface for Stanford NER in the python enviornment, nltk.tag.stanford.NERTagger. from nltk.tag.stanford import NERTagger st = NERTagger('/usr/share/stanford-ner/classifiers/all.3class.distsim.crf.ser.gz', '/usr/share/stanford-ner/stanford-ner.jar') st.tag('Rami Eid is studying at Stony Brook University in NY'.split()) I am supposed to get the output: [('Rami', 'PERSON'), ('Eid', 'PERSON'), ('is', 'O'), ('studying', 'O'), ('at', 'O'), ('Stony', 'ORGANIZATION'), (

How to train the Stanford NLP Sentiment Analysis tool

﹥>﹥吖頭↗ 提交于 2019-11-27 03:52:02
Hell everyone! I'm using the Stanford Core NLP package and my goal is to perform sentiment analysis on a live-stream of tweets. Using the sentiment analysis tool as is returns a very poor analysis of text's 'attitude' .. many positives are labeled neutral, many negatives rated positive. I've gone ahead an acquired well over a million tweets in a text file, but I haven't a clue how to actually train the tool and create my own model. Link to Stanford Sentiment Analysis page "Models can be retrained using the following command using the PTB format dataset:" java -mx8g edu.stanford.nlp.sentiment

Extract list of Persons and Organizations using Stanford NER Tagger in NLTK

情到浓时终转凉″ 提交于 2019-11-27 03:31:49
I am trying to extract list of persons and organizations using Stanford Named Entity Recognizer (NER) in Python NLTK. When I run: from nltk.tag.stanford import NERTagger st = NERTagger('/usr/share/stanford-ner/classifiers/all.3class.distsim.crf.ser.gz', '/usr/share/stanford-ner/stanford-ner.jar') r=st.tag('Rami Eid is studying at Stony Brook University in NY'.split()) print(r) the output is: [('Rami', 'PERSON'), ('Eid', 'PERSON'), ('is', 'O'), ('studying', 'O'), ('at', 'O'), ('Stony', 'ORGANIZATION'), ('Brook', 'ORGANIZATION'), ('University', 'ORGANIZATION'), ('in', 'O'), ('NY', 'LOCATION')]

Using Stanford Parser(CoreNLP) to find phrase heads

有些话、适合烂在心里 提交于 2019-11-26 23:09:52
问题 I am going to use Stanford Corenlp 2013 to find phrase heads. I saw this thread. But, the answer was not clear to me and I couldn't add any comment to continue that thread. So, I'm sorry for duplication. What I have at the moment is the parse tree of a sentence (using Stanford Corenlp) (I also tried with CONLL format which is created by Stanford Corenlp). And what I need is exactly the head of noun phrases. I don't know how I can use dependencies and the parse tree to extract heads of

Tools for text simplification (Java) [closed]

匆匆过客 提交于 2019-11-26 22:19:57
问题 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 6 years ago . What is the best tool that can do text simplification using Java? Here is an example of text simplification: John, who was the CEO of a company, played golf. ↓ John played golf. John was the CEO of a company. 回答1: I see your problem as a task of converting complex or compound sentence into simple sentences.