Examples of UimaMeeting


Examples of org.apache.uima.fit.examples.tutorial.type.UimaMeeting

    UimaAcronym uimaAcronym = JCasUtil.selectByIndex(jCas, UimaAcronym.class, 0);
    assertNotNull(uimaAcronym);
    assertEquals("CPE", uimaAcronym.getCoveredText());
    assertEquals("Collection Processing Engine", uimaAcronym.getExpandedForm());

    UimaMeeting uimaMeeting = JCasUtil.selectByIndex(jCas, UimaMeeting.class, 0);
    assertNotNull(uimaMeeting);
    assertEquals("Let's meet to talk about the CPE.", uimaMeeting.getCoveredText());
  }
View Full Code Here

Examples of org.apache.uima.fit.examples.tutorial.type.UimaMeeting

      while (tokenizer.hasMoreTokens()) {
        String token = tokenizer.nextToken();
        // look up token in map to see if it is an acronym
        if (uimaTermTable.get(token) != null) {
          // create annotation
          UimaMeeting annot = new UimaMeeting(aJCas, meeting.getBegin(), meeting.getEnd());
          annot.setRoom(meeting.getRoom());
          annot.setDate(meeting.getDate());
          annot.setStartTime(meeting.getStartTime());
          annot.setEndTime(meeting.getEndTime());
          // Add annotation to a list, to be later added to the indexes.
          // We need to do this because it's not allowed to add to an
          // index that you're currently iterating over.
          uimaMeetings.add(annot);
          break;
View Full Code Here

Examples of org.apache.uima.tutorial.UimaMeeting

      while (tokenizer.hasMoreTokens()) {
        String token = tokenizer.nextToken();
        // look up token in map to see if it is an acronym
        if (mMap.get(token) != null) {
          // create annotation
          UimaMeeting annot = new UimaMeeting(aJCas, meeting.getBegin(), meeting.getEnd(), meeting
                  .getRoom(), meeting.getDate(), meeting.getStartTime(), meeting.getEndTime());
          // Add annotation to a list, to be later added to the indexes.
          // We need to do this because it's not allowed to add to an
          // index that you're currently iterating over.
          uimaMeetings.add(annot);
          break;
        }
      }

      iter.moveToNext();
    }

    Iterator uimaMeetingIter = uimaMeetings.iterator();
    while (uimaMeetingIter.hasNext()) {
      UimaMeeting annot = (UimaMeeting) uimaMeetingIter.next();
      annot.addToIndexes();
    }
  }
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.