simongray / StatementAnnotator

Custom annotator for Stanford CoreNLP that annotates sentences with the underlying statements contained within them.
4 stars 0 forks source link

Figure out how to handle clausal subjects and complex direct objects #36

Closed simongray closed 8 years ago

simongray commented 8 years ago

Example sentence:

Establishing a practice goes a long way to reduce stress.

Pretty print:

[goes/VBZ
    csubj>[Establishing/VBG dobj>[practice/NN det>a/DT]]
    dobj>[way/NN det>a/DT amod>long/JJ acl>[reduce/VB mark>to/TO dobj>stress/NN]]
    punct>./.]

skaermbillede 2016-06-26 14 47 33

Currently it outputs this:

Establishing a practice goes a long way to reduce stress.
  |_ statement: {Establishing a practice}
  |  |_ component: {Verb: Establishing}
  |  |_ component: {DirectObject: a practice}
  |_ statement: {Establishing goes a long way to reduce stress}
     |_ component: {DirectObject: a long way to reduce stress}
     |_ component: {Verb: reduce}
     |_ component: {DirectObject: stress}
     |_ component: {Verb: Establishing goes}

While I'm okay with the first being a statement and not a subject, it should be a nested statement and the other statement should only have two pure components: verb and direct object (= everything after the verb).

simongray commented 8 years ago

Desired outcome

{S: Establishing a practice} {V: goes} {DI: a long way to reduce stress}

Steps to take

  1. use csubj for partioning into subjects (or accept that csubj is a nested statement)
  2. increase the scope of direct object (look at acl relation=clausal modifier of noun)