Package org.apache.ctakes.smokingstatus.util

Examples of org.apache.ctakes.smokingstatus.util.ClassifiableEntry


          skip = true;

      }
      // ---
      if (!skip) {
        ClassifiableEntry entry = new ClassifiableEntry();
        entry.iv_recordID = recordID;
        entry.iv_begin = sentAnn.getBegin();
        entry.iv_end = sentAnn.getEnd();
        entry.iv_text = sentAnn.getCoveredText();
        entryList.add(entry);
      }
    }

    // collect segment annotations
    Iterator<?> segItr = jcas.getJFSIndexRepository().getAnnotationIndex(
        Segment.type).iterator();
    while (segItr.hasNext()) {
      Segment segAnn = (Segment) segItr.next();
      iv_segList.add(segAnn);
    }

    iv_entryIndexMap.put(recordID, entryList);

    buildProcEntryList();

    /**
     * cycle through the procEntryList to process one sentence at a time
     */

    try {
      for (iv_classifiableIdx = 0; iv_classifiableIdx < iv_procEntryList
          .size(); iv_classifiableIdx++) {
        jcas_local.reset();
        // create a new JCas object
        // jcas_local.setDocumentText(jcas.getDocumentText());

        // all sentences should be added to one list in iv_entryIndexMap
        ClassifiableEntry entry = (ClassifiableEntry) iv_procEntryList
            .get(iv_classifiableIdx);
        // add object to CAS that captures entry data
        RecordSentence rs = new RecordSentence(jcas_local);
        rs.setRecordID(entry.iv_recordID);

View Full Code Here


    while (recItr.hasNext()) {
      String recordID = (String) recItr.next();
      Iterator<?> entryItr = ((List<?>) iv_entryIndexMap.get(recordID))
          .iterator();
      while (entryItr.hasNext()) {
        ClassifiableEntry entry = (ClassifiableEntry) entryItr.next();

        if ((iv_allowedClassifications == null)
            || (iv_allowedClassifications
                .contains(entry.iv_classification))) {
          iv_procEntryList.add(entry);
View Full Code Here

TOP

Related Classes of org.apache.ctakes.smokingstatus.util.ClassifiableEntry

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.