Revision: 17803
http://sourceforge.net/p/gate/code/17803
Author: markagreenwood
Date: 2014-04-10 18:52:19 +0000 (Thu, 10 Apr 2014)
Log Message:
-----------
I think that's all but one of the gazetteer tests fixed
Modified Paths:
--------------
gate/trunk/src/test/com/ontotext/gate/gazetteer/TestHashGazetteer.java
gate/trunk/src/test/gate/creole/TestPR.java
gate/trunk/src/test/gate/creole/gazetteer/TestFlexibleGazetteer.java
gate/trunk/src/test/gate/creole/gazetteer/TestGazetteer.java
Modified: gate/trunk/src/test/com/ontotext/gate/gazetteer/TestHashGazetteer.java
===================================================================
--- gate/trunk/src/test/com/ontotext/gate/gazetteer/TestHashGazetteer.java
2014-04-10 18:18:41 UTC (rev 17802)
+++ gate/trunk/src/test/com/ontotext/gate/gazetteer/TestHashGazetteer.java
2014-04-10 18:52:19 UTC (rev 17803)
@@ -64,8 +64,8 @@
//check whether the annotations are as expected
assertTrue("Found in "+ doc.getSourceUrl().getFile()+ " "+
doc.getAnnotations(GAZ_AS).size() +
- " Lookup annotations, instead of the expected 80.",
- doc.getAnnotations(GAZ_AS).size()== 80);
+ " Lookup annotations, instead of the expected 75.",
+ doc.getAnnotations(GAZ_AS).size()== 75);
} // testHashGazetteer();
Modified: gate/trunk/src/test/gate/creole/TestPR.java
===================================================================
--- gate/trunk/src/test/gate/creole/TestPR.java 2014-04-10 18:18:41 UTC (rev
17802)
+++ gate/trunk/src/test/gate/creole/TestPR.java 2014-04-10 18:52:19 UTC (rev
17803)
@@ -210,7 +210,7 @@
//
doc3.getAnnotations().get(ANNIEConstants.LOOKUP_ANNOTATION_TYPE).size()== 144);
assertEquals("Wrong number of annotations produced in " +
doc3.getSourceUrl().getFile(),
- 270,
+ 269,
doc3.getAnnotations().get(ANNIEConstants.LOOKUP_ANNOTATION_TYPE).size());
}//testGazetteer
@@ -354,8 +354,8 @@
doc1.getAnnotations().get(ANNIEConstants.LOCATION_ANNOTATION_TYPE).size()== 2);
assertTrue("Found in "+doc1.getSourceUrl().getFile()+ " "+
doc1.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size() +
- " Person annotations, instead of the expected 1",
-
doc1.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size()== 1);
+ " Person annotations, instead of the expected 2",
+
doc1.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size()== 2);
assertTrue("Found in "+doc1.getSourceUrl().getFile()+ " "+
doc1.getAnnotations().get(ANNIEConstants.DATE_ANNOTATION_TYPE).size() +
" Date annotations, instead of the expected 7",
@@ -376,8 +376,8 @@
doc2.getAnnotations().get(ANNIEConstants.LOCATION_ANNOTATION_TYPE).size()== 10);
assertTrue("Found in "+doc2.getSourceUrl().getFile()+ " "+
doc2.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size() +
- " Person annotations, instead of the expected 1",
-
doc2.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size()== 1);
+ " Person annotations, instead of the expected 2",
+
doc2.getAnnotations().get(ANNIEConstants.PERSON_ANNOTATION_TYPE).size()== 2);
assertTrue("Found in "+doc2.getSourceUrl().getFile()+ " "+
doc2.getAnnotations().get(ANNIEConstants.DATE_ANNOTATION_TYPE).size() +
" Date annotations, instead of the expected 8",
@@ -390,8 +390,8 @@
// assertions for doc 3
assertTrue("Found in "+doc3.getSourceUrl().getFile()+ " "+
doc3.getAnnotations().get(ANNIEConstants.ORGANIZATION_ANNOTATION_TYPE).size() +
- " Organization annotations, instead of the expected 28",
-
doc3.getAnnotations().get(ANNIEConstants.ORGANIZATION_ANNOTATION_TYPE).size()==
28);
+ " Organization annotations, instead of the expected 27",
+
doc3.getAnnotations().get(ANNIEConstants.ORGANIZATION_ANNOTATION_TYPE).size()==
27);
assertTrue("Found in "+doc3.getSourceUrl().getFile()+ " "+
doc3.getAnnotations().get(ANNIEConstants.LOCATION_ANNOTATION_TYPE).size() +
" Location annotations, instead of the expected 11",
Modified: gate/trunk/src/test/gate/creole/gazetteer/TestFlexibleGazetteer.java
===================================================================
--- gate/trunk/src/test/gate/creole/gazetteer/TestFlexibleGazetteer.java
2014-04-10 18:18:41 UTC (rev 17802)
+++ gate/trunk/src/test/gate/creole/gazetteer/TestFlexibleGazetteer.java
2014-04-10 18:52:19 UTC (rev 17803)
@@ -134,7 +134,7 @@
System.out.println("There are this many lookup annotations: "+
lookups.size());
}
- assertTrue("found " + lookups.size()+" was expecting 49",lookups.size()==
49);
+ assertEquals("Wrong number of lookup annotations",53,lookups.size());
// Now clean up so we don't get a memory leak.
Factory.deleteResource(doc);
Modified: gate/trunk/src/test/gate/creole/gazetteer/TestGazetteer.java
===================================================================
--- gate/trunk/src/test/gate/creole/gazetteer/TestGazetteer.java
2014-04-10 18:18:41 UTC (rev 17802)
+++ gate/trunk/src/test/gate/creole/gazetteer/TestGazetteer.java
2014-04-10 18:52:19 UTC (rev 17803)
@@ -55,22 +55,20 @@
//test with default parameters
gaz.execute();
AnnotationSet resultAS = doc.getAnnotations("GazetteerAS");
- assertTrue("Found " + resultAS.size() +
- " annotations instead of the expected 64!", resultAS.size() == 64);
+ assertEquals("Wrong number of annotations produced",60, resultAS.size());
resultAS.clear();
//test with partial words
gaz.setWholeWordsOnly(false);
gaz.execute();
- assertEquals("Wrong number of annotations produced", 358, resultAS.size());
+ assertEquals("Wrong number of annotations produced", 388, resultAS.size());
gaz.setWholeWordsOnly(true);
resultAS.clear();
//test with prefix matching
gaz.setLongestMatchOnly(false);
gaz.execute();
- assertTrue("Found " + resultAS.size() +
- " annotations instead of the expected 78!", resultAS.size() == 78);
+ assertEquals("Wrong number of annotations produced", 73, resultAS.size());
gaz.setLongestMatchOnly(true);
resultAS.clear();
Factory.deleteResource(gaz);
@@ -83,7 +81,7 @@
gaz.setDocument(doc);
gaz.setAnnotationSetName("GazetteerAS");
gaz.execute();
- assertEquals("Wrong number of annotations generated", 98, resultAS.size());
+ assertEquals("Wrong number of annotations generated", 97, resultAS.size());
gaz.setCaseSensitive(true);
resultAS.clear();
Factory.deleteResource(gaz);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs