1

Having a sentence like: "I was given tablets by my nurse to try and ease my pain." I want to decompose it to:

  1. "I was given tablets by my nurse to try."

  2. "I was given tablets by my nurse to ease my pain."

I have tried English parser in OpenNLP (by accessing java from Python) (demo: http://nlp.stanford.edu:8080/parser/index.jsp). "try" and "ease" are at the same sub-level of (VP (TO to) below, how can I decompose the sentence?

(ROOT
  (S
    (NP (PRP I))
    (VP (VBD was)
      (VP (VBN given)
        (NP (NNS tablets))
        (PP (IN by)
          (NP (PRP$ my) (NN nurse)
            (S
              (VP (TO to)
                (VP (VB try)
                  (CC and)
                  (VB ease)
                  (NP (PRP$ my) (NN pain)))))))))
    (. .)))

Do you know any way other than this java solution: algorithm to extract simple sentences from complex(mixed) sentences?

Elm662
  • 663
  • 1
  • 5
  • 18
  • I'm not sure why you want to decompose it like that, but those two shorter sentences mean something different to me than the one longer sentence. – Ned Batchelder Jun 11 '17 at 17:26
  • I want to do sentiment analysis. As you see there are 2 main reasons to use the tablet : 1- to try 2- to ease the pain. I want to break the sentence in order to have each reason in a separate sentence. The joiner **and** is the indicator here. – Elm662 Jun 11 '17 at 17:54
  • 2
    Except to my ear, "try and ease the pain" is not two things: it's one attempt to ease the pain. It would be the same as saying, "I was given tablets by my nurse to try to ease the pain" – Ned Batchelder Jun 11 '17 at 18:11
  • As far as I can see, *try* and *ease* are at the same level in the Stanford output tree. – lenz Jun 11 '17 at 19:07
  • Right, my mistake, I edited my post. – Elm662 Jun 12 '17 at 14:51

0 Answers0