Package org.apache.uima.tutorial

Examples of org.apache.uima.tutorial.TimeAnnot


      while (dateIter.hasNext()) {
        DateAnnot date = (DateAnnot) dateIter.next();

        Iterator time1Iter = timeIndex.iterator();
        while (time1Iter.hasNext()) {
          TimeAnnot time1 = (TimeAnnot) time1Iter.next();

          Iterator time2Iter = timeIndex.iterator();
          while (time2Iter.hasNext()) {
            TimeAnnot time2 = (TimeAnnot) time2Iter.next();

            // times must be different annotations
            if (time1 != time2) {
              // compute the begin and end of the span
              int minBegin = Math.min(Math.min(time1.getBegin(), time2.getBegin()), Math.min(date
                      .getBegin(), room.getBegin()));
              int maxEnd = Math.max(Math.max(time1.getEnd(), time2.getEnd()), Math.max(date
                      .getEnd(), room.getEnd()));

              // span must be smaller than the window size?
              if (maxEnd - minBegin < mWindowSize) {
                // span must not overlap the last annotation we made
View Full Code Here

TOP

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

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.