A test
()
| 187 | |
| 188 | /** A test */ |
| 189 | public void testUnpackMarkup() throws Exception{ |
| 190 | // create the markupElementsMap map |
| 191 | //Map markupElementsMap = null; |
| 192 | gate.Document doc = null; |
| 193 | /* |
| 194 | markupElementsMap = new HashMap(); |
| 195 | // populate it |
| 196 | markupElementsMap.put ("S","Sentence"); |
| 197 | markupElementsMap.put ("s","Sentence"); |
| 198 | */ |
| 199 | // Create the element2String map |
| 200 | Map<String,String> anElement2StringMap = new HashMap<String,String>(); |
| 201 | |
| 202 | // Populate it |
| 203 | anElement2StringMap.put("S","\n"); |
| 204 | anElement2StringMap.put("s","\n"); |
| 205 | |
| 206 | doc = gate.Factory.newDocument(new URL(TestDocument.getTestServerName()+"tests/xml/xces.xml"), workingEncoding); |
| 207 | |
| 208 | AnnotationSet annotSet = doc.getAnnotations( |
| 209 | GateConstants.ORIGINAL_MARKUPS_ANNOT_SET_NAME); |
| 210 | assertEquals("For "+doc.getSourceUrl()+" the number of annotations"+ |
| 211 | " should be:758",758,annotSet.size()); |
| 212 | |
| 213 | gate.corpora.TestDocument.verifyNodeIdConsistency(doc); |
| 214 | |
| 215 | // Verifies if the maximum annotation ID on the GATE doc is less than the |
| 216 | // Annotation ID generator of the document. |
| 217 | verifyAnnotationIDGenerator(doc); |
| 218 | |
| 219 | } // testUnpackMarkup() |
| 220 | |
| 221 | /* |
| 222 | * This method runs ANNIE with defaults on a document, then saves |
nothing calls this directly
no test coverage detected