Stanford core nlp: sentimental tree and positional labels

Sentiment annotations contain an annotated tree with attached annotations at its nodes, used to predict sentiment. This tree is different from the parsing tree provided by the parsing annotation. For example, for this sentence:

I don't know half of you half as well as I should like; and I like less than half of you half as well as you deserve.

      

This is a parse tree:

(ROOT
  (S
    (S
      (NP (PRP I))
      (VP (VBP do) (RB n't)
        (VP (VB know)
          (NP
            (NP (NN half))
            (PP (IN of)
              (NP (PRP you))
              (ADVP (DT half) (RB as) (RB well))))
          (SBAR (IN as)
            (S
              (NP (PRP I))
              (VP (MD should)
                (VP (VB like))))))))
    (: ;)
    (CC and)
    (S
      (NP (PRP I))
      (VP (VBP like)
        (NP
          (NP
            (QP (JJR less) (IN than) (NN half)))
          (PP (IN of)
            (NP (PRP you) (DT half))))
        (ADVP
          (ADVP (RB as) (RB well))
          (SBAR (IN as)
            (S
              (NP (PRP you))
              (VP (VBP deserve)))))))
    (. .)))

      

This is an annotated tree with a feeling:

(ROOT
  (@S
    (@S
      (@S
        (S (NP I)
          (VP
            (@VP (VBP do) (RB n't))
            (VP
              (@VP (VB know)
                (NP (NP half)
                  (PP
                    (@PP (IN of) (NP you))
                    (ADVP (DT half)
                      (@ADVP (RB as) (RB well))))))
              (SBAR (IN as)
                (S (NP I)
                  (VP (MD should) (VP like)))))))
        (: ;))
      (CC and))
    (S (NP I)
      (VP
        (@VP (VBP like)
          (NP
            (NP (JJR less)
              (@QP (IN than) (NN half)))
            (PP (IN of)
              (NP (PRP you) (DT half)))))
        (ADVP
          (ADVP (RB as) (RB well))
          (SBAR (IN as)
            (S (NP you) (VP deserve)))))))
  (. .))

      

Why are the trees slightly different? I think verbs are verb phrases in the sense tree, nouns, etc.

What does this "@" mean?

How can I access positional attributes of nodes, iterating through the sense tree? Is this a node value?

If I want to get the pos tag from sense tree trees from parse tree looking for a parse tree node with the same output (leaves) in the only way? If the trees were the same, I could iterate over both of them, for example.

What is the suggested way to get the positional sign of mood nodes?

+3


source to share





All Articles