File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
test/src/edu/stanford/nlp/semgraph/semgrex/ssurgeon Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 33import static org .junit .Assert .*;
44
55import java .util .Collection ;
6+ import java .util .List ;
67
78import org .junit .Test ;
89
1415
1516public class SsurgeonTest {
1617
18+ @ Test
19+ public void readXMLEmptyPattern () {
20+ String newline = System .getProperty ("line.separator" );
21+ String doc = String .join (newline ,
22+ "<ssurgeon-pattern-list>" ,
23+ " <ssurgeon-pattern>" ,
24+ " <uid>37</uid>" ,
25+ " <notes>This is a simple test</notes>" ,
26+ " <semgrex>{}=a1 >appos=e1 {}=a2 <nsubj=e2 {}=a3</semgrex>" ,
27+ " </ssurgeon-pattern>" ,
28+ "</ssurgeon-pattern-list>" );
29+ Ssurgeon inst = Ssurgeon .inst ();
30+ List <SsurgeonPattern > pattern = inst .readFromString (doc );
31+ }
32+
1733 /**
1834 * Simple test of an Ssurgeon edit script. This instances a simple semantic graph,
1935 * a semgrex pattern, and then the resulting actions over the named nodes in the
You can’t perform that action at this time.
0 commit comments