Examples of performTest()


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

      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("featurePathMatching/RegExAnnotInvalidFeaturePath2.xml"));

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

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

  public void testAnnotationCreation() throws Exception {

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

    // define result interested in
    String[] tofs = { "org.apache.uima.TestAnnot", "org.apache.uima.TestAnnot:testFeature",
        "org.apache.uima.TestAnnot:testFeature1", "org.apache.uima.TestAnnot1",
View Full Code Here

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

  public void testRuleExceptionDocAnnotNoMAtch() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("ruleExceptions/RegExAnnotExceptions.xml"));
    CAS cas = annotTester.performTest("this is my text with a simpleMatch and an exception 12-wbt-test", "en");

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

    // compare results
View Full Code Here

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

  public void testRuleExceptionDocAnnotMatch() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("ruleExceptions/RegExAnnotExceptions.xml"));
    CAS cas = annotTester.performTest("this is my text with a simpleMatch and no exception", "en");

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

    // compare results
View Full Code Here

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

  public void testRuleExceptionSentenceAnnotNoMatch() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("ruleExceptions/RegExAnnotExceptions.xml"));
    CAS cas = annotTester.performTest("My text starts here: car carbon test cat cart and ends here", "en");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation", "org.apache.uima.TestAnnot",
            "org.apache.uima.SentenceAnnot", "org.apache.uima.TokenAnnot"};
View Full Code Here

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

  public void testRuleExceptionSentenceAnnotMatch() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("ruleExceptions/RegExAnnotExceptions.xml"));
    CAS cas = annotTester.performTest("My text starts here: car carbon  cat cart and ends here", "en");

    // define result interested in
    String[] tofs = { "uima.tcas.DocumentAnnotation", "org.apache.uima.TestAnnot",
            "org.apache.uima.SentenceAnnot", "org.apache.uima.TokenAnnot"};
View Full Code Here

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

   public void testSetFeatureValues1() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("setFeatureValues/RegExAnnotFeatureValues.xml"));
      CAS cas = annotTester.performTest("RuleRegex12.4", "en");

      // define result interested in
      String[] tofs = { "uima.tcas.DocumentAnnotation:language",
            "org.apache.uima.TestAnnot",
            "org.apache.uima.TestAnnot:testFeature0",
View Full Code Here

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

   public void testSetFeatureValues2() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("setFeatureValues/RegExAnnotFeatureValues.xml"));
      CAS cas = annotTester.performTest("RuleRegex22.4", "en");

      // define result interested in
      String[] tofs = { "uima.tcas.DocumentAnnotation:language",
            "org.apache.uima.TestAnnot",
            "org.apache.uima.TestAnnot:testFeature0",
View Full Code Here

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

   public void testSetFeatureValues3() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("setFeatureValues/RegExAnnotFeatureValues.xml"));
      CAS cas = annotTester.performTest("RuleRegex32.4", "en");

      // define result interested in
      String[] tofs = { "org.apache.uima.TestAnnot",
            "org.apache.uima.TestAnnot:testFeature0",
            "org.apache.uima.TestAnnot:testFeature1",
View Full Code Here

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

   public void testSetFeatureValuesForConfidenceAndRuleID() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("setFeatureValues/RegExAnnotFeatureValues.xml"));
      CAS cas = annotTester.performTest("Minimal Configuration", "en");

      // define result interested in
      String[] tofs = { "org.apache.uima.TestAnnot",
            "org.apache.uima.TestAnnot:confidenceValue",
            "org.apache.uima.TestAnnot:ruleId" };
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.