Questions tagged [dependency-parsing]

92 questions
2
votes
1 answer

How to keep punctuation in Stanford dependency parser

I am using Stanford CoreNLP (01.2016 version) and I would like to keep the punctuation in the dependency relations. I have found some ways for doing that when you run it from command line, but I didn't find anything regarding the java code which…
user1419243
  • 1,655
  • 3
  • 19
  • 33
2
votes
0 answers

How to use stanford dependency parser to extract aspect terms from text?

I'm currently working on an aspect-level sentiment analysis project using online travel reviews. I'm using Stanford CoreNLP to get things done. So far, I have managed to pre-process the data by POS tagging and lemmatizing the review content. I read…
2
votes
1 answer

Python NLTK : Extract lexical head item from Stanford dependency parsed result

I have a sentence and i want to extract lexical head item, i could do the dependency parsing using Stanford NLP library. How can i extract main head head in a sentence? In the case of the sentence Download and share this tool, the head would be…
aman
  • 1,875
  • 4
  • 18
  • 27
1
vote
1 answer

List of dependencies in Spacy

I'm a beginner in NLP and i've decided to start with Spacy. It's simple to handle and to comprehend. Neverthless, i can't acess to the full documentation or parsing. I mean , i don't know the meaning of "IN" , "RB" for example And, displacy that is…
ZADI
  • 13
  • 2
1
vote
1 answer

Is possible to get dependency/pos information for entities in Spacy?

I am working on extracting entities from scientific text (I am using scispacy) and later I will want to extract relations using hand-written rules. I have extracted entities and their character span successfully, and I can also get the pos and…
1
vote
1 answer

Run dependency parser on pre-initialized doc object of spacy

I am trying to incorporate spacy's dependency parser into a legacy code in java through web API. All other components tokenizer, tagger, merged_words, NER are done from the legacy NLP code. I am only interested to apply the dependency parser along…
hunsvadis
  • 13
  • 5
1
vote
0 answers

Pytorch save/load model with lower dev set accuracy?

Here is the question: I am loading my pytorch model(best result on dev set while training) from the checkpoint file during model evaluation, remembering to do model.eval() and with torch.no_grad(), I still get a lower accuracy result(with 1-2% drop)…
switchsyj
  • 63
  • 1
  • 8
1
vote
1 answer

Add known matches to Spacy document with character offsets

I would like to run some analysis on documents using different Spacy tools, though I am interested in the Dependency Matcher in particular. It just so happens that for these documents, I already have the character offsets of some difficult-to-parse…
user94154
  • 16,176
  • 20
  • 77
  • 116
1
vote
1 answer

Extract subtree (Phrase) for nsubj elements using spacy

The aim is to extract the sub-tree (phrases) from the sentence if the 'nsubj' exists in the given sentence. Here is the code which I am using: import spacy nlp = spacy.load('en') piano_doc = nlp('The alarm clock is, to many high school students,…
1
vote
1 answer

NLP: Compare these two sentences. Is this a misclassification?

I am using the dependence parse of spacy. I am puzzled with these two very similar sentences. Sentence 1: text='He noted his father was a nice guy.' Note that in this sentence "father" is clearly the subject of "father was a nice guy": [(0, 'He',…
DanielTheRocketMan
  • 3,199
  • 5
  • 36
  • 65
1
vote
1 answer

nlp: What is exactly a grammar dependence tag 'attr'?

I am exploring the spacy nlp python library. I have got this: text='Daniel is a smart clever professor.' spacy_doc = nlp(text) token_pos=[token.pos_ for token in spacy_doc] token_tag=[token.tag_ for token in spacy_doc] token_dep=[token.dep_ for…
DanielTheRocketMan
  • 3,199
  • 5
  • 36
  • 65
1
vote
0 answers

Test for whether a token is a conjunction head in spaCy

Question Is there a way to detect whether a token is a conjunction head in spaCy? Problem description I'd like the following sentence: "Both Americans and Muslim friends and citizens, tax-paying citizens, and Muslims in nations were just appalled…
1
vote
0 answers

Dialogflow Rule-based grammar matching

I am doing some research about chatbots and more specifically Dialogflow. When I was searching for the intent classification I find out that Dialogflow is using rule-based grammar matching and ML matching. I tried to find more information about the…
1
vote
0 answers

Gap-Degree of non-projective dependency tree

The following is how my class defines gap-degree: The gap-degree of a word in a dependency tree is the least k for which the substring consisting of the word and its descendants is entirely comprised of k +1 contiguous substrings. The gap-degree of…
1
vote
1 answer

What is the meaning of labels on the arrows of dependency parser graph?

I am using coreNLP module demo by Stanford online here: https://corenlp.run . So, I am trying out a few sentences to see their syntactic structure using dependency parser available here. One such example is this sentence: "documents related to new…
Lucky Sunda
  • 53
  • 1
  • 8