Package org.apache.ctakes.drugner.fsm.output.util

Examples of org.apache.ctakes.drugner.fsm.output.util.SubSectionIndicator


  {
    List holdList = new ArrayList();
    // SubSectionIndicator tempSsi = null;
    for (int i = 0; i < holdOutSet.length - 1; i++)
    {
      SubSectionIndicator hos1 = (SubSectionIndicator) holdOutSet[i];
      SubSectionIndicator hos2 = (SubSectionIndicator) holdOutSet[i + 1];

      if (hos1.getStartOffset() > hos2.getStartOffset())
      {
        // tempSsi = hos2;
        holdOutSet[i + 1] = hos1;
        holdOutSet[i] = hos2;
        sortSubSectionInd(holdOutSet);
View Full Code Here


      {
    List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray());

    for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0)
    {
      SubSectionIndicator ssi = (SubSectionIndicator) sortedSubSecInds.get(i);
      Segment segment = getSegmentContainingOffsets(jcas, ssi.getStartOffset(),
          ssi.getEndOffset());
      endBodyOffset = segment.getEnd(); // backup

      SubSectionAnnotation ssa = new SubSectionAnnotation(jcas);

      ssa.setBegin(ssi.getStartOffset());
      // header is marked by the indicator
      ssa.setSubSectionHeaderBegin(ssi.getStartOffset());
      ssa.setSubSectionHeaderEnd(ssi.getEndOffset());

      // body begins where SubSectionIndicator ends
      ssa.setSubSectionBodyBegin(ssi.getEndOffset() + 1);

      if (i + 1 < sortedSubSecInds.size()) // i is not the last element
      {
        SubSectionIndicator nextSsi = (SubSectionIndicator) sortedSubSecInds.get(i + 1);
        endBodyOffset = getSubSectionAnnotationBodyEnd(segment, nextSsi);

      } else
        // this was the last SubSectionIndicator
      {
View Full Code Here

  {
    List holdList = new ArrayList();
    // SubSectionIndicator tempSsi = null;
    for (int i = 0; i < holdOutSet.length - 1; i++)
    {
      SubSectionIndicator hos1 = (SubSectionIndicator) holdOutSet[i];
      SubSectionIndicator hos2 = (SubSectionIndicator) holdOutSet[i + 1];

      if (hos1.getStartOffset() > hos2.getStartOffset())
      {
        // tempSsi = hos2;
        holdOutSet[i + 1] = hos1;
        holdOutSet[i] = hos2;
        sortSubSectionInd(holdOutSet);
View Full Code Here

      {
    List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray());

    for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0)
    {
      SubSectionIndicator ssi = (SubSectionIndicator) sortedSubSecInds.get(i);
      Segment segment = getSegmentContainingOffsets(jcas, ssi.getStartOffset(),
          ssi.getEndOffset());
      endBodyOffset = segment.getEnd(); // backup

      SubSectionAnnotation ssa = new SubSectionAnnotation(jcas);

      ssa.setBegin(ssi.getStartOffset());
      // header is marked by the indicator
      ssa.setSubSectionHeaderBegin(ssi.getStartOffset());
      ssa.setSubSectionHeaderEnd(ssi.getEndOffset());

      // body begins where SubSectionIndicator ends
      ssa.setSubSectionBodyBegin(ssi.getEndOffset() + 1);

      if (i + 1 < sortedSubSecInds.size()) // i is not the last element
      {
        SubSectionIndicator nextSsi = (SubSectionIndicator) sortedSubSecInds.get(i + 1);
        endBodyOffset = getSubSectionAnnotationBodyEnd(segment, nextSsi);

      } else
        // this was the last SubSectionIndicator
      {
View Full Code Here

  {
    List holdList = new ArrayList();
    // SubSectionIndicator tempSsi = null;
    for (int i = 0; i < holdOutSet.length - 1; i++)
    {
      SubSectionIndicator hos1 = (SubSectionIndicator) holdOutSet[i];
      SubSectionIndicator hos2 = (SubSectionIndicator) holdOutSet[i + 1];

      if (hos1.getStartOffset() > hos2.getStartOffset())
      {
        // tempSsi = hos2;
        holdOutSet[i + 1] = hos1;
        holdOutSet[i] = hos2;
        sortSubSectionInd(holdOutSet);
View Full Code Here

      {
    List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray());

    for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0)
    {
      SubSectionIndicator ssi = (SubSectionIndicator) sortedSubSecInds.get(i);
      Segment segment = getSegmentContainingOffsets(jcas, ssi.getStartOffset(),
          ssi.getEndOffset());
      endBodyOffset = segment.getEnd(); // backup

      SubSectionAnnotation ssa = new SubSectionAnnotation(jcas);

      ssa.setBegin(ssi.getStartOffset());
      // header is marked by the indicator
      ssa.setSubSectionHeaderBegin(ssi.getStartOffset());
      ssa.setSubSectionHeaderEnd(ssi.getEndOffset());

      // body begins where SubSectionIndicator ends
      ssa.setSubSectionBodyBegin(ssi.getEndOffset() + 1);

      if (i + 1 < sortedSubSecInds.size()) // i is not the last element
      {
        SubSectionIndicator nextSsi = (SubSectionIndicator) sortedSubSecInds.get(i + 1);
        endBodyOffset = getSubSectionAnnotationBodyEnd(segment, nextSsi);

      } else
        // this was the last SubSectionIndicator
      {
View Full Code Here

            endToken = token;
          }

          BaseToken startToken = (BaseToken) tokens
              .get(tokenStartIndex);
          SubSectionIndicator subs = null;
          if (fsm.equals(iv_subSectionIDProbableMachine)) {
            subs = new SubSectionIndicator(startToken
                .getStartOffset(), endToken.getEndOffset(),
                SubSectionIndicator.PROBABLE_STATUS);
          } else if (fsm.equals(iv_subSectionIDHistoryMachine)) {
            subs = new SubSectionIndicator(startToken
                .getStartOffset(), endToken.getEndOffset(),
                SubSectionIndicator.HISTORY_STATUS);
          } else if (fsm.equals(iv_subSectionIDConfirmMachine)) {
            subs = new SubSectionIndicator(startToken
                .getStartOffset(), endToken.getEndOffset(),
                SubSectionIndicator.CONFIRMED_STATUS);
          } else
            subs = new SubSectionIndicator(startToken
                .getStartOffset(), endToken.getEndOffset(),
                SubSectionIndicator.FAMILY_HISTORY_STATUS);
          outSet.add(subs);

          fsm.reset();
View Full Code Here

  {
    List holdList = new ArrayList();
    // SubSectionIndicator tempSsi = null;
    for (int i = 0; i < holdOutSet.length - 1; i++)
    {
      SubSectionIndicator hos1 = (SubSectionIndicator) holdOutSet[i];
      SubSectionIndicator hos2 = (SubSectionIndicator) holdOutSet[i + 1];

      if (hos1.getStartOffset() > hos2.getStartOffset())
      {
        // tempSsi = hos2;
        holdOutSet[i + 1] = hos1;
        holdOutSet[i] = hos2;
        sortSubSectionInd(holdOutSet);
View Full Code Here

      {
    List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray());

    for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0)
    {
      SubSectionIndicator ssi = (SubSectionIndicator) sortedSubSecInds.get(i);
      Segment segment = getSegmentContainingOffsets(jcas, ssi.getStartOffset(),
          ssi.getEndOffset());
      endBodyOffset = segment.getEnd(); // backup

      SubSectionAnnotation ssa = new SubSectionAnnotation(jcas);

      ssa.setBegin(ssi.getStartOffset());
      // header is marked by the indicator
      ssa.setSubSectionHeaderBegin(ssi.getStartOffset());
      ssa.setSubSectionHeaderEnd(ssi.getEndOffset());

      // body begins where SubSectionIndicator ends
      ssa.setSubSectionBodyBegin(ssi.getEndOffset() + 1);

      if (i + 1 < sortedSubSecInds.size()) // i is not the last element
      {
        SubSectionIndicator nextSsi = (SubSectionIndicator) sortedSubSecInds.get(i + 1);
        endBodyOffset = getSubSectionAnnotationBodyEnd(segment, nextSsi);

      } else
        // this was the last SubSectionIndicator
      {
View Full Code Here

TOP

Related Classes of org.apache.ctakes.drugner.fsm.output.util.SubSectionIndicator

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.