Package org.apache.ctakes.ytex.uima.model

Examples of org.apache.ctakes.ytex.uima.model.NamedEntityRegex


   * @throws Exception
   */
  @Test
  public void testRegex() throws UIMAException, IOException {
    NamedEntityRegexAnnotator ner = new NamedEntityRegexAnnotator();
    NamedEntityRegex nerex = new NamedEntityRegex();
    nerex.setCode("C00TEST");
    nerex.setContext("DEFAULT");
    nerex.setRegex("(?i)COUGH");
    ner.initRegexMap(Arrays.asList(nerex));
   
      JCas jCas = JCasFactory.createJCasFromPath("src/main/resources/org/apache/ctakes/ytex/types/TypeSystem.xml");
      String text = "Dr. Doolitle asked patient\nto take a deep breath\nand exhale slowly.  Patient coughed.";
      jCas.setDocumentText(text);
View Full Code Here

TOP

Related Classes of org.apache.ctakes.ytex.uima.model.NamedEntityRegex

Copyright © 2018 www.massapicom. 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.