Advertisement
lamiastella

stanford corenlp

Apr 21st, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.91 KB | None | 0 0
  1. [jalal@goku entity-sentiment-analysis]$ python parse_doc.py
  2. Parsing Document...
  3. Tokenizing sentences...
  4. Done!
  5. Anaphora resolution for sentence: Jean is really sad, but Adam is the happiest guy ever
  6. Done!
  7. Named Entity Clustering:
  8. ('child is: ', Tree('FRAG', [Tree('S', [Tree('S', [Tree('NP', [Tree('NNP', ['Jean'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('ADJP', [Tree('RB', ['really']), Tree('JJ', ['sad'])])])]), Tree(',', [',']), Tree('CC', ['but']), Tree('S', [Tree('NP', [Tree('NNP', ['Adam'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('NP', [Tree('DT', ['the']), Tree('JJS', ['happiest']), Tree('NN', ['guy'])]), Tree('ADVP', [Tree('RB', ['ever'])])])])])]))
  9. (ROOT
  10. (FRAG
  11. (S
  12. (S (NP (NNP Jean)) (VP (VBZ is) (ADJP (RB really) (JJ sad))))
  13. (, ,)
  14. (CC but)
  15. (S
  16. (NP (NNP Adam))
  17. (VP
  18. (VBZ is)
  19. (NP (DT the) (JJS happiest) (NN guy))
  20. (ADVP (RB ever)))))))
  21. ('*************Node label is: ', u'ROOT')
  22. ('child is: ', Tree('S', [Tree('S', [Tree('NP', [Tree('NNP', ['Jean'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('ADJP', [Tree('RB', ['really']), Tree('JJ', ['sad'])])])]), Tree(',', [',']), Tree('CC', ['but']), Tree('S', [Tree('NP', [Tree('NNP', ['Adam'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('NP', [Tree('DT', ['the']), Tree('JJS', ['happiest']), Tree('NN', ['guy'])]), Tree('ADVP', [Tree('RB', ['ever'])])])])]))
  23. (FRAG
  24. (S
  25. (S (NP (NNP Jean)) (VP (VBZ is) (ADJP (RB really) (JJ sad))))
  26. (, ,)
  27. (CC but)
  28. (S
  29. (NP (NNP Adam))
  30. (VP
  31. (VBZ is)
  32. (NP (DT the) (JJS happiest) (NN guy))
  33. (ADVP (RB ever))))))
  34. ('*************Node label is: ', u'FRAG')
  35. ('child is: ', Tree('S', [Tree('NP', [Tree('NNP', ['Jean'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('ADJP', [Tree('RB', ['really']), Tree('JJ', ['sad'])])])]))
  36. ('child is: ', Tree(',', [',']))
  37. ('child is: ', Tree('CC', ['but']))
  38. ('child is: ', Tree('S', [Tree('NP', [Tree('NNP', ['Adam'])]), Tree('VP', [Tree('VBZ', ['is']), Tree('NP', [Tree('DT', ['the']), Tree('JJS', ['happiest']), Tree('NN', ['guy'])]), Tree('ADVP', [Tree('RB', ['ever'])])])]))
  39. (S
  40. (S (NP (NNP Jean)) (VP (VBZ is) (ADJP (RB really) (JJ sad))))
  41. (, ,)
  42. (CC but)
  43. (S
  44. (NP (NNP Adam))
  45. (VP
  46. (VBZ is)
  47. (NP (DT the) (JJS happiest) (NN guy))
  48. (ADVP (RB ever)))))
  49. ('*************Node label is: ', u'S')
  50. ___________I am here
  51. ('child is: ', Tree('NP', [Tree('NNP', ['Jean'])]))
  52. ('child is: ', Tree('VP', [Tree('VBZ', ['is']), Tree('ADJP', [Tree('RB', ['really']), Tree('JJ', ['sad'])])]))
  53. (S (NP (NNP Jean)) (VP (VBZ is) (ADJP (RB really) (JJ sad))))
  54. ('*************Node label is: ', u'S')
  55. ___________I am here
  56. ('*************subchild_labels are: ', [u'NNP'])
  57. I am here ***************************
  58. ('child is: ', u',')
  59. (, ,)
  60. ('*************Node label is: ', u',')
  61. ('child is: ', u'but')
  62. (CC but)
  63. ('*************Node label is: ', u'CC')
  64. ('child is: ', Tree('NP', [Tree('NNP', ['Adam'])]))
  65. ('child is: ', Tree('VP', [Tree('VBZ', ['is']), Tree('NP', [Tree('DT', ['the']), Tree('JJS', ['happiest']), Tree('NN', ['guy'])]), Tree('ADVP', [Tree('RB', ['ever'])])]))
  66. (S
  67. (NP (NNP Adam))
  68. (VP
  69. (VBZ is)
  70. (NP (DT the) (JJS happiest) (NN guy))
  71. (ADVP (RB ever))))
  72. ('*************Node label is: ', u'S')
  73. ___________I am here
  74. ('*************subchild_labels are: ', [u'NNP'])
  75. I am here ***************************
  76. ('child is: ', Tree('NNP', ['Jean']))
  77. (NP (NNP Jean))
  78. ('*************Node label is: ', u'NP')
  79. ('child is: ', Tree('VBZ', ['is']))
  80. ('child is: ', Tree('ADJP', [Tree('RB', ['really']), Tree('JJ', ['sad'])]))
  81. (VP (VBZ is) (ADJP (RB really) (JJ sad)))
  82. ('*************Node label is: ', u'VP')
  83. ('child is: ', Tree('NNP', ['Adam']))
  84. (NP (NNP Adam))
  85. ('*************Node label is: ', u'NP')
  86. ('child is: ', Tree('VBZ', ['is']))
  87. ('child is: ', Tree('NP', [Tree('DT', ['the']), Tree('JJS', ['happiest']), Tree('NN', ['guy'])]))
  88. ('child is: ', Tree('ADVP', [Tree('RB', ['ever'])]))
  89. (VP (VBZ is) (NP (DT the) (JJS happiest) (NN guy)) (ADVP (RB ever)))
  90. ('*************Node label is: ', u'VP')
  91. ('child is: ', u'Jean')
  92. (NNP Jean)
  93. ('*************Node label is: ', u'NNP')
  94. ('child is: ', u'is')
  95. (VBZ is)
  96. ('*************Node label is: ', u'VBZ')
  97. ('child is: ', Tree('RB', ['really']))
  98. ('child is: ', Tree('JJ', ['sad']))
  99. (ADJP (RB really) (JJ sad))
  100. ('*************Node label is: ', u'ADJP')
  101. ('child is: ', u'Adam')
  102. (NNP Adam)
  103. ('*************Node label is: ', u'NNP')
  104. ('child is: ', u'is')
  105. (VBZ is)
  106. ('*************Node label is: ', u'VBZ')
  107. ('child is: ', Tree('DT', ['the']))
  108. ('child is: ', Tree('JJS', ['happiest']))
  109. ('child is: ', Tree('NN', ['guy']))
  110. (NP (DT the) (JJS happiest) (NN guy))
  111. ('*************Node label is: ', u'NP')
  112. ('child is: ', Tree('RB', ['ever']))
  113. (ADVP (RB ever))
  114. ('*************Node label is: ', u'ADVP')
  115. ('child is: ', u'really')
  116. (RB really)
  117. ('*************Node label is: ', u'RB')
  118. ('child is: ', u'sad')
  119. (JJ sad)
  120. ('*************Node label is: ', u'JJ')
  121. ('child is: ', u'the')
  122. (DT the)
  123. ('*************Node label is: ', u'DT')
  124. ('child is: ', u'happiest')
  125. (JJS happiest)
  126. ('*************Node label is: ', u'JJS')
  127. ('child is: ', u'guy')
  128. (NN guy)
  129. ('*************Node label is: ', u'NN')
  130. ('child is: ', u'ever')
  131. (RB ever)
  132. ('*************Node label is: ', u'RB')
  133. ('context: ', [(u' Jean', u'Jean is really sad'), (u' Adam', u'Adam is the happiest guy ever')])
  134. Jean is really sad
  135. Adam is the happiest guy ever
  136. [[(u' Jean', u'Jean is really sad'), (u' Adam', u'Adam is the happiest guy ever')]]
  137. Done!
  138. 2018-04-21 16:38:28.870963: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
  139. 2018-04-21 16:38:28.870992: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
  140. 2018-04-21 16:38:28.871000: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
  141. 2018-04-21 16:38:28.871007: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
  142. 2018-04-21 16:38:28.871015: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
  143. Sentence: 0,Jean is really sad , yielded results (pos/neg): 0.35309/0.64691, prediction: neg
  144. Sentence: 0,Adam is the happiest guy ever , yielded results (pos/neg): 0.97347/0.02653, prediction: pos
  145. Entity: Jean -- sentiment: -0.293821
  146. Entity: Adam -- sentiment: 0.94695
  147. {u' Jean': -0.29382148, u' Adam': 0.94694996}
  148. [jalal@goku entity-sentiment-analysis]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement