Package org.apache.uima.analysis_engine

Examples of org.apache.uima.analysis_engine.AnalysisEngine.destroy()


      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
    } finally {
      ae.destroy();
    }

  }

  @Test
View Full Code Here


      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other.Type2"));
    } finally {
      ae.destroy();
    }

  }

  @Test
View Full Code Here

      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other2.Type1"));
    } finally {
      ae.destroy();
    }

  }

  @Test
View Full Code Here

      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.Type2"));
    } finally {
      ae.destroy();
    }
  }

  @Test
  public void testImportPackageFromCasTypeSystem() throws Exception {
View Full Code Here

      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other2.Type1"));
    } finally {
      ae.destroy();
    }
  }

  @Test
  public void testImportAllPackagesFromTypeSystem() throws Exception {
View Full Code Here

      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other3.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other4.Type2"));
    } finally {
      ae.destroy();
    }
  }

  @Test
  public void testImportAllPackagesWithAliasFromTypeSystem() throws Exception {
View Full Code Here

      ae.process(cas);

      assertEquals(Arrays.asList("First"), selectText(cas, "org.apache.uima.ruta.other3.Type1"));
      assertEquals(Arrays.asList("Second"), selectText(cas, "org.apache.uima.ruta.other4.Type2"));
    } finally {
      ae.destroy();
    }
  }

  @Test
  public void testImportAllPackagesFromTypeSystemWithAmbiguousShortNames() throws Exception {
View Full Code Here

        // success, Type1 and Type2 are ambiguous and this exception should be raised.
      } else {
        throw e;
      }
    } finally {
      ae.destroy();
    }
  }

  private List<String> selectText(CAS cas, String type) {
    List<String> values = new ArrayList<String>();
View Full Code Here

   
    assertEquals("start of bodynormal BOLDend of body" , text);
   
   
    cas.release();
    ae.destroy();
  }

 
}
View Full Code Here

    FSIterator<AnnotationFS> iterator = ai.iterator();
    AnnotationFS a = iterator.next();
    assertEquals("CW SW", a.getCoveredText());

    cas.release();
    ae.destroy();
  }

}
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.