Skip to content

Commit

Permalink
These items in the semgrex are now ordered
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Dec 3, 2021
1 parent dd80c15 commit eecf8a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void testTregexJson() throws IOException {

@Test
public void testSemgrexJson() throws IOException {
String expected="{ \"sentences\": [ { \"0\": { \"text\": \"ate\", \"begin\": 2, \"end\": 3, \"$obj\": { \"text\": \"fish\", \"begin\": 4, \"end\": 5 }, \"$verb\": { \"text\": \"ate\", \"begin\": 2, \"end\": 3 } }, \"length\": 1 } ]}".replaceAll(" ", "");
String expected="{ \"sentences\": [ { \"0\": { \"text\": \"ate\", \"begin\": 2, \"end\": 3, \"$verb\": { \"text\": \"ate\", \"begin\": 2, \"end\": 3 }, \"$obj\": { \"text\": \"fish\", \"begin\": 4, \"end\": 5 } }, \"length\": 1 } ]}".replaceAll(" ", "");

String query = "The dog ate a fish";
byte[] message = query.getBytes("utf-8");
Expand All @@ -143,7 +143,7 @@ public void testSemgrexJson() throws IOException {

@Test
public void testSemgrexAnnotation() throws IOException {
String expected = "result { result { match { matchIndex: 3 node { name: \"obj\" matchIndex: 5 } node { name: \"verb\" matchIndex: 3 } } }}".replaceAll(" ", "");
String expected = "result { result { match { matchIndex: 3 node { name: \"verb\" matchIndex: 3 } node { name: \"obj\" matchIndex: 5 } } }}".replaceAll(" ", "");
String query = "The dog ate a fish";
byte[] message = query.getBytes("utf-8");
Properties props = new Properties();
Expand Down

0 comments on commit eecf8a1

Please sign in to comment.