Examples of AnnotatorTester


Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   public void testCustomNormalizationClassNotFound() throws Exception {
      // test annotator configuration where the custom normalizer could not be found.
      String message = "";
      try {
         new AnnotatorTester(JUnitExtension
               .getFile("conceptSyntax/RegExAnnotCustomNormalizationClassNotFound.xml"));
      } catch (ResourceInitializationException ex) {
         message = ex.getCause().getLocalizedMessage();
      }
      Assert
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   public void testCustomValidatorClassNotFound() throws Exception {
      // test annotator configuration where the custom validator could not be found
      String message = "";
      try {
         new AnnotatorTester(JUnitExtension
               .getFile("conceptSyntax/RegExAnnotValidatorClassNotFound.xml"));
      } catch (ResourceInitializationException ex) {
         message = ex.getCause().getLocalizedMessage();
      }
      Assert
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

    * @throws Exception
    */
   public void testVariablesConept1() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("variables/RegExAnnotVariables.xml"));

      CAS cas = annotTester.performTest(
            "Monday simple regex with variables Tuesday", "en");

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

View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

    * @throws Exception
    */
   public void testVariablesConept2() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("variables/RegExAnnotVariables.xml"));

      CAS cas = annotTester.performTest("Tuesday January Sunday test {days}",
            "en");

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

View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

    * @throws Exception
    */
   public void testVariablesConept3() throws Exception {

      // create annotation tester with the regex annotator specifier
      AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("variables/RegExAnnotVariables.xml"));

      CAS cas = annotTester.performTest("Match: Jan. Don't macht Jana", "en");

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

      // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   public void testVariablesNotAvailable() throws Exception {

      boolean foundMessage = false;
      try {
         // create annotation tester with the regex annotator specifier
         new AnnotatorTester(JUnitExtension
               .getFile("variables/RegExAnnotVariablesError.xml"));
      } catch (ResourceInitializationException ex) {
         String message = ex.getCause().getMessage();
         if ((message.indexOf("days") > -1)
               && (message.indexOf("VariableError") > -1)) {
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   * @throws Exception
   */
  public void testMatchAll() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("matchStrategy/RegExAnnotMatchStrategy.xml"));
    CAS cas = annotTester.performTest("no mactch matchALL matchALL matchALL no match", "en");

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

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   * @throws Exception
   */
  public void testMatchFirst() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("matchStrategy/RegExAnnotMatchStrategy.xml"));
    CAS cas = annotTester.performTest("no mactch matchFirst matchFirst no match", "en");

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

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   * @throws Exception
   */
  public void testMatchCompleteOK() throws Exception {

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

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

    // compare results
View Full Code Here

Examples of org.apache.uima.test.junit_extension.AnnotatorTester

   * @throws Exception
   */
  public void testMatchCompleteNotOK() throws Exception {

    // create annotation tester with the regex annotator specifier
    AnnotatorTester annotTester = new AnnotatorTester(JUnitExtension
            .getFile("matchStrategy/RegExAnnotMatchStrategy.xml"));
    CAS cas = annotTester.performTest("matchComplete is not OK", "en");

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

    // compare results
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.