Skip to content

Commit 597ce94

Browse files
committed
Update some tests based on a different ordering of SemanticGraph items when switched to LinkedHashMap
Apparently there's a shorter path in some search algorithms Items in the semgrex are now ordered by creation time Cluster ids changed? Update some coref scores to reflect recent changes
1 parent db84999 commit 597ce94

7 files changed

+10
-12
lines changed

itest/src/edu/stanford/nlp/coref/NeuralChineseCorefBenchmarkSlowITest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ public class NeuralChineseCorefBenchmarkSlowITest extends CorefBenchmark {
99

1010
@Override
1111
public void setUp() throws Exception, IOException {
12-
logger = Redwood.channels(NeuralEnglishCorefCoNLLBenchmarkSlowITest.class);
13-
EXPECTED_F1_SCORE = 53.80;
12+
logger = Redwood.channels(NeuralChineseCorefBenchmarkSlowITest.class);
13+
EXPECTED_F1_SCORE = 54.3;
1414
PROPERTIES_PATH = "edu/stanford/nlp/coref/properties/neural-chinese.properties";
1515
WORK_DIR_NAME = "NeuralChineseCorefBenchmarkTest";
1616
testName = "Neural Chinese Coref";
1717
super.setUp();
1818
}
1919

20-
}
20+
}

itest/src/edu/stanford/nlp/coref/NeuralEnglishCorefBenchmarkSlowITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ public class NeuralEnglishCorefBenchmarkSlowITest extends CorefBenchmark {
1010
@Override
1111
public void setUp() throws Exception, IOException {
1212
logger = Redwood.channels(NeuralEnglishCorefCoNLLBenchmarkSlowITest.class);
13-
EXPECTED_F1_SCORE = 59.90;
13+
EXPECTED_F1_SCORE = 62.15;
1414
PROPERTIES_PATH = "edu/stanford/nlp/coref/properties/neural-english.properties";
1515
WORK_DIR_NAME = "NeuralEnglishCorefBenchmarkTest";
1616
testName = "Neural English Coref";
1717
super.setUp();
1818
}
1919

20-
}
20+
}

itest/src/edu/stanford/nlp/coref/NeuralEnglishCorefCoNLLBenchmarkSlowITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class NeuralEnglishCorefCoNLLBenchmarkSlowITest extends CorefBenchmark {
99
@Override
1010
public void setUp() throws Exception, IOException {
1111
logger = Redwood.channels(NeuralEnglishCorefCoNLLBenchmarkSlowITest.class);
12-
EXPECTED_F1_SCORE = 65.56;
12+
EXPECTED_F1_SCORE = 65.51;
1313
PROPERTIES_PATH = "edu/stanford/nlp/coref/properties/neural-english-conll.properties";
1414
WORK_DIR_NAME = "NeuralEnglishCorefCoNLLBenchmarkTest";
1515
testName = "Neural English Coref (CoNLL)";

itest/src/edu/stanford/nlp/coref/StatisticalCorefCoNLLBenchmarkSlowITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class StatisticalCorefCoNLLBenchmarkSlowITest extends CorefBenchmark {
1010
@Override
1111
public void setUp() throws Exception, IOException {
1212
logger = Redwood.channels(StatisticalCorefCoNLLBenchmarkSlowITest.class);
13-
EXPECTED_F1_SCORE = 63.29;
13+
EXPECTED_F1_SCORE = 63.27;
1414
PROPERTIES_PATH = "edu/stanford/nlp/coref/properties/statistical-english-conll.properties";
1515
WORK_DIR_NAME = "StatisticalCorefBenchmarkTest";
1616
testName = "Statistical English Coref (CoNLL)";

itest/src/edu/stanford/nlp/pipeline/CoreWrapperITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void testPipeline() throws Exception {
9696
assertEquals(expectedDependencyParse, firstSentence.dependencyParse().toString());
9797
// coref info
9898
String expectedCoref =
99-
"{17=CHAIN17-[\"us\" in sentence 3, \"our\" in sentence 3], 19=CHAIN19-[\"Barack Obama\" in sentence 1, " +
99+
"{19=CHAIN19-[\"us\" in sentence 3, \"our\" in sentence 3], 21=CHAIN21-[\"Barack Obama\" in sentence 1, " +
100100
"\"He\" in sentence 2, \"Obama\" in sentence 3, \"My\" in sentence 3, \"I\" in sentence 3, \"his\" " +
101101
"in sentence 3]}";
102102
assertEquals(expectedCoref, exampleDocument.corefChains().toString());

itest/src/edu/stanford/nlp/pipeline/StanfordCoreNLPServerITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void testTregexJson() throws IOException {
125125

126126
@Test
127127
public void testSemgrexJson() throws IOException {
128-
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(" ", "");
128+
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(" ", "");
129129

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

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

itest/src/edu/stanford/nlp/simple/SentenceAlgorithmsITest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ public void testDependencyPathBetweenRegressions() throws IOException {
204204
add("Geledi");
205205
add("<-nmod:of-");
206206
add("Sultanate");
207-
add("<-conj:and-");
208-
add("commander");
209207
add("<-acl:relcl-");
210208
add("Sultanate");
211209
add("<-appos-");

0 commit comments

Comments
 (0)