File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/edu/stanford/nlp/semgraph/semgrex Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,19 @@ public IndexedWord getNode(String name) {
64
64
public Set <String > getNodeNames () {
65
65
return namesToNodes .keySet ();
66
66
}
67
+
68
+ public String toString () {
69
+ StringBuilder builder = new StringBuilder ();
70
+ builder .append (matchedPattern );
71
+ builder .append ("\n " );
72
+ builder .append (sg );
73
+ builder .append ("\n " );
74
+ for (Map .Entry <String , IndexedWord > entry : namesToNodes .entrySet ()) {
75
+ builder .append (entry .getKey () + " matched at " + entry .getValue () + "\n " );
76
+ }
77
+ for (Map .Entry <String , SemanticGraphEdge > entry : namesToEdges .entrySet ()) {
78
+ builder .append (entry .getKey () + " matched at " + entry .getValue () + "\n " );
79
+ }
80
+ return builder .toString ();
81
+ }
67
82
}
You can’t perform that action at this time.
0 commit comments