stanford-nlp

Error in stanford nlp core

南楼画角 提交于 2019-11-28 20:57:50
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.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader

stanford core nlp java output

会有一股神秘感。 提交于 2019-11-28 17:17:56
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 to see the content. That works. Basically what I'd need is to return the annotated document, so that I

Clause Extraction using Stanford parser

醉酒当歌 提交于 2019-11-28 16:32:32
问题 I have a complex sentence and I need to separate it into main and dependent clause. For example for the sentence ABC cites the fact that chemical additives are banned in many countries and feels they may be banned in this state too. The split required 1)ABC cites the fact 2)chemical additives are banned in many countries 3)ABC feels they may be banned in this state too. I think I could use the Stanford Parser tree or dependencies, but I am not sure how to proceed from here. The tree (ROOT (S

Issue using Stanford CoreNLP parsing models

强颜欢笑 提交于 2019-11-28 10:46:10
问题 I cannot find the Stanford parsing models for German and French: there is no "germanPCFG.ser.gz" or "frenchFactored.ser.gz" in the jar (stanford-corenlp-3.2.0-models.jar) - only english. Have searched through posttagger jar too. Same issue encountered at : How to use Stanford CoreNLP with a Non-English parse model? 回答1: You can find them in the download for the Stanford Parser. Look in the models.jar file. 回答2: With Maven you can use <dependency> <groupId>edu.stanford.nlp</groupId>

Installing coreNLP in R

最后都变了- 提交于 2019-11-28 09:22:45
问题 I'm following the instructions on this link to use coreNLP https://github.com/statsmaths/coreNLP However, I found this error > library(coreNLP) Error in get(method, envir = home) : lazy-load database '/Users/apple/Library/R/3.2/library/coreNLP/R/coreNLP.rdb is corrupt In addition: Warning messages: 1: In .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4], : restarting interrupted promise evaluation 2: In get(method, envir = home) : restarting interrupted promise evaluation 3: In get

How do I use IOB tags with Stanford NER?

若如初见. 提交于 2019-11-28 06:06:45
There seem to be a few different settings: iobtags iobTags entitySubclassification (IOB1 or IOB2?) evaluateIOB Which setting do I use, and how do I use it correctly? I tried labelling like this: 1997 B-DATE volvo B-BRAND wia64t B-MODEL highway B-TYPE tractor I-TYPE But on the training output, it seemed to think that B-TYPE and I-TYPE were different classes. I am using the 2013-11-12 release. How this can be done is currently (2013 releases) a bit of a mess, since there are two different sets of flags for two different DocumentReaderAndWriter implementations. Sorry. The most flexible support

Stanford coreNLP - split words ignoring apostrophe

对着背影说爱祢 提交于 2019-11-28 06:02:58
问题 I'm trying to split a sentence into words using Stanford coreNLP . I'm having problem with words that contains apostrophe. For example, the sentence: I'm 24 years old. Splits like this: [I] ['m] [24] [years] [old] Is it possible to split it like this using Stanford coreNLP?: [I'm] [24] [years] [old] I've tried using tokenize.whitespace, but it doesn't split on other punctuation marks like: '?' and ',' 回答1: Currently, no. The subsequent Stanford CoreNLP processing tools all use Penn Treebank

Stanford Core NLP - understanding coreference resolution

柔情痞子 提交于 2019-11-28 04:35:12
I'm having some trouble understanding the changes made to the coref resolver in the last version of the Stanford NLP tools. As an example, below is a sentence and the corresponding CorefChainAnnotation: The atom is a basic unit of matter, it consists of a dense central nucleus surrounded by a cloud of negatively charged electrons. {1=[1 1, 1 2], 5=[1 3], 7=[1 4], 9=[1 5]} I am not sure I understand the meaning of these numbers. Looking at the source doesn't really help either. Thank you Skarab The first number is a cluster id (representing tokens, which stand for the same entity), see source

trouble importing stanford pos tagger into nltk

杀马特。学长 韩版系。学妹 提交于 2019-11-27 23:23:25
This is probably a very trivial question. I am trying to use the stanford pos tagger through nltk given here The problem is that my nltk lib doesnt contain the stanford module. So I copied the same into the appropriate folder and compiled the same. Now when i try to run an example the module is getting detected but not the class inside the module. Can anyone tell me where I am going wrong?? Again this is probably very dumb. >>> from nltk.tag import stanford >>> st = StanfordTagger('bidirection-distsim-wsj-0-18.tagger') I used py_compile to compile the stanford.py file. Am i missing something

How to extract the noun phrases using Open nlp's chunking parser

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 22:17:24
I am newbie to Natural Language processing.I need to extract the noun phrases from the text.So far i have used open nlp's chunking parser for parsing my text to get the Tree structure.But i am not able to extract the noun phrases from the tree structure, is there any regular expression pattern in open nlp so that i can use it to extract the noun phrases. Below is the code that i am using InputStream is = new FileInputStream("en-parser-chunking.bin"); ParserModel model = new ParserModel(is); Parser parser = ParserFactory.create(model); Parse topParses[] = ParserTool.parseLine(line, parser, 1);