Package org.apache.uima.tutorial

Examples of org.apache.uima.tutorial.DateTimeAnnot


    Matcher matcher = pattern.matcher(input);
    String matched;
    while (matcher.find()) {
      int start = matcher.start(1);
      matched = fixUpDateTimeStrings(matcher.group(1));
      DateTimeAnnot dtAnnot = (DateTimeAnnot) m.newAnnotation(jcas, start, matcher.end(1));
      pp.setIndex(0);
      Date dtSpec = dateFormat.parse(matched, pp);
      // System.out.println(dtAnnot.dtSpec);
      if (dtSpec != null) {
        dtAnnot.setShortDateString(dfDateShort.format(dtSpec));
      }
      dtAnnot.addToIndexes();
    }
  }
View Full Code Here


    Matcher matcher = pattern.matcher(input);
    String matched;
    while (matcher.find()) {
      int start = matcher.start(1);
      matched = fixUpDateTimeStrings(matcher.group(1));
      DateTimeAnnot dtAnnot = (DateTimeAnnot) m.newAnnotation(jcas, start, matcher.end(1));
      pp.setIndex(0);
      Date dtSpec = dateFormat.parse(matched, pp);
      // System.out.println(dtAnnot.dtSpec);
      if (dtSpec != null) {
        dtAnnot.setShortDateString(dfDateShort.format(dtSpec));
      }
      dtAnnot.addToIndexes();
    }
  }
View Full Code Here

    Matcher matcher = pattern.matcher(input);
    String matched;
    while (matcher.find()) {
      int start = matcher.start(1);
      matched = fixUpDateTimeStrings(matcher.group(1));
      DateTimeAnnot dtAnnot = (DateTimeAnnot) m.newAnnotation(jcas, start, matcher.end(1));
      pp.setIndex(0);
      Date dtSpec = dateFormat.parse(matched, pp);
      // System.out.println(dtAnnot.dtSpec);
      if (dtSpec != null) {
        dtAnnot.setShortDateString(dfDateShort.format(dtSpec));
      }
      dtAnnot.addToIndexes();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.tutorial.DateTimeAnnot

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.