This repository was archived by the owner on Apr 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
src/main/java/org/lambda3/text/simplification/discourse/model Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 2222
2323package org .lambda3 .text .simplification .discourse .model ;
2424
25+ import com .fasterxml .jackson .annotation .JsonProperty ;
2526import edu .stanford .nlp .trees .Tree ;
2627import org .lambda3 .text .simplification .discourse .utils .IDGenerator ;
2728import org .lambda3 .text .simplification .discourse .utils .parseTree .ParseTreeException ;
@@ -85,6 +86,7 @@ public void setParseTree(Tree parseTree) {
8586 this .parseTree = parseTree ;
8687 }
8788
89+ @ JsonProperty ("text" )
8890 public String getText () {
8991 return WordsUtils .wordsToString (ParseTreeExtractionUtils .getContainingWords (parseTree ));
9092 }
Original file line number Diff line number Diff line change 2222
2323package org .lambda3 .text .simplification .discourse .model ;
2424
25+ import com .fasterxml .jackson .annotation .JsonProperty ;
2526import edu .stanford .nlp .trees .Tree ;
2627import org .lambda3 .text .simplification .discourse .runner .discourse_tree .Relation ;
2728import org .lambda3 .text .simplification .discourse .utils .parseTree .ParseTreeException ;
@@ -67,10 +68,6 @@ public void setParseTree(Tree parseTree) {
6768 extractPhrase ();
6869 }
6970
70- public String getText () {
71- return WordsUtils .wordsToString (ParseTreeExtractionUtils .getContainingWords (parseTree ));
72- }
73-
7471 private void extractPhrase () {
7572 this .phrase = parseTree ;
7673
@@ -102,6 +99,16 @@ public Tree getPhrase() {
10299 return phrase ;
103100 }
104101
102+ @ JsonProperty ("text" )
103+ public String getText () {
104+ return WordsUtils .wordsToString (ParseTreeExtractionUtils .getContainingWords (parseTree ));
105+ }
106+
107+ @ JsonProperty ("phraseText" )
108+ public String getPhraseText () {
109+ return WordsUtils .wordsToString (ParseTreeExtractionUtils .getContainingWords (phrase ));
110+ }
111+
105112 public void setRelation (Relation relation ) {
106113 this .relation = relation ;
107114 extractPhrase ();
You can’t perform that action at this time.
0 commit comments