Package com.jpetrak.gate.stringannotation.extendedgazetteer2

Examples of com.jpetrak.gate.stringannotation.extendedgazetteer2.ExtendedGazetteer2.execute()


         Factory.createResource("gate.corpora.DocumentImpl", parms);
    AnnotationSet lookups = doc.getAnnotations().get("OutType");
    assertEquals(0,lookups.size());
    // run the gazetteer on the document
    eg.setDocument(doc);
    eg.execute();
    // check if we got the correct annotations
    AnnotationSet tokens = doc.getAnnotations().get("Token");
    assertEquals(46,tokens.size());
    AnnotationSet sentences = doc.getAnnotations().get("Sentence");
    assertEquals(4,sentences.size());
View Full Code Here


      i++;
    }
    doc.getAnnotations().removeAll(lookups);
    eg.setMatchAtWordStartOnly(false);
    eg.setMatchAtWordEndOnly(false);
    eg.execute();
    lookups = doc.getAnnotations().get("OutType");
    assertEquals(22,lookups.size());
    doc.getAnnotations().removeAll(lookups);
    eg.setLongestMatchOnly(false);
    eg.execute();
View Full Code Here

    eg.execute();
    lookups = doc.getAnnotations().get("OutType");
    assertEquals(22,lookups.size());
    doc.getAnnotations().removeAll(lookups);
    eg.setLongestMatchOnly(false);
    eg.execute();
    lookups = doc.getAnnotations().get("OutType");
    assertEquals(26,lookups.size());
    System.out.println("Gazetteer application test 1 finished for backedn "+backendNr);
  }
 
View Full Code Here

         Factory.createResource("gate.corpora.DocumentImpl", parms);
    AnnotationSet lookups = doc.getAnnotations("EXT").get("Lookup");
    assertEquals(0,lookups.size());
    // run the gazetteer on the document
    eg.setDocument(doc);
    eg.execute();
    AnnotationDiffer differ = new AnnotationDiffer();
    differ.setSignificantFeaturesSet(new HashSet<String>());
    AnnotationSet keys = doc.getAnnotations().get("Lookup");
    System.out.println("Lookups old: "+keys.size());
    AnnotationSet responses = doc.getAnnotations("EXT").get("Lookup");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.