Examples of performTest()


Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

      AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), 0, 9);
      cas.addFsToIndexes(annotation);

      /* execute ClerezzaCASConsumer on the created CAS */
      annotatorTester.performTest(cas);

      MGraph createdGraph = TcManager.getInstance().getMGraph(new UriRef("mytest-clerezza-uima-graph"));
      assertNotNull(createdGraph);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

      AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), 0, 9);
      cas.addFsToIndexes(annotation);

      /* execute ClerezzaCASConsumer on the created CAS */
      annotatorTester.performTest(cas);

      MGraph createdGraph = TcManager.getInstance().getMGraph(new UriRef("mytest-clerezza-ao-graph"));
      assertNotNull(createdGraph);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testFilterFeaturesConditionCorrect() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("filters/RegExAnnotFilterFeature.xml"));
    CAS cas = annotTester.performTest("SimpleRegex", "en");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation:language", "org.apache.uima.TestAnnot" };

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testFilterFeaturesConditionWrong() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("filters/RegExAnnotFilterFeature.xml"));
    CAS cas = annotTester.performTest("SimpleRegex", "en-US");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation:language", "org.apache.uima.TestAnnot" };

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testFilterFeaturesAdvancedCondition1() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("filters/RegExAnnotFilterFeature.xml"));
    CAS cas = annotTester.performTest("AdvancedFilterRegex", "en-US");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation:language", "org.apache.uima.TestAnnot" };

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testFilterFeaturesAdvancedCondition2() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("filters/RegExAnnotFilterFeature.xml"));
    CAS cas = annotTester.performTest("AdvancedFilterRegex", "en-GB");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation:language", "org.apache.uima.TestAnnot" };

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

  public void testFilterFeaturesOnCreatedAnnot() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("filters/RegExAnnotFilterFeature.xml"));
    CAS cas = annotTester.performTest("JustCreateAnAnnotation", "en");

    // define result interested in
    String[] tofs = { "org.apache.uima.TestAnnot", "org.apache.uima.TestAnnot:testFeature" };

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

   public void testDictionaryAnnotator() throws Exception {

      // create annotation tester with the dictionary annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("DictionaryAnnotatorTests/DictionaryAnnotator.xml"));
      CAS cas = annotTester.performTest("nEw yOrk City", "en");

      // define result interested in
      String[] tofs = { "org.apache.uima.DictionaryEntry" };

      // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

            JUnitExtension
                  .getFile("DictionaryAnnotatorTests/DictionaryAnnotatorInvalidInputType.xml"));

      boolean foundMessage = false;
      try {
         annotTester.performTest("Dummy text", "en");
      } catch (DictionaryAnnotatorProcessException ex) {
         String message = ex.getMessage();
         if (message.indexOf("org.apache.uima.InvalidInputType") > -1) {
            foundMessage = true;
         }
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester.performTest()

            JUnitExtension
                  .getFile("DictionaryAnnotatorTests/DictionaryAnnotatorInvalidOutputType.xml"));

      boolean foundMessage = false;
      try {
         annotTester.performTest("Dummy text", "en");
      } catch (DictionaryAnnotatorProcessException ex) {
         String message = ex.getMessage();
         if (message.indexOf("org.apache.uima.DictionaryEntry") > -1) {
            foundMessage = true;
         }
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.