Package org.apache.ctakes.core.fsm.output

Examples of org.apache.ctakes.core.fsm.output.StatusIndicator


    try {
      Set<StatusIndicator> s = _statusIndicatorFSM.execute(fsmTokenList);

      if (s.size() > 0) {
        StatusIndicator finalSi = null;
        Iterator<StatusIndicator> siItr = s.iterator();
        while (siItr.hasNext()) {
          StatusIndicator si = siItr.next();
          if (finalSi == null) {
            finalSi = si;
          } else if ((si.getStatus() == StatusIndicator.FAMILY_HISTORY_STATUS)
              && (finalSi.getStatus() == StatusIndicator.HISTORY_STATUS)) {
            // family history always overrides history
            finalSi = si;
          } else if ((scope == ContextAnnotator.LEFT_SCOPE) && (si.getEndOffset() > finalSi.getEndOffset())) {
            // pick one with closest proximity to focus
            finalSi = si;
          } else if ((scope == ContextAnnotator.RIGHT_SCOPE)
              && (si.getStartOffset() < finalSi.getStartOffset())) {
            // pick one w/ closest proximity to focus
            finalSi = si;
          }
        }
        ContextHit ctxHit = new ContextHit(finalSi.getStartOffset(), finalSi.getEndOffset());
View Full Code Here


                        endToken = token;
                    }

                    BaseToken startToken = (BaseToken) tokens
                            .get(tokenStartIndex);
                    StatusIndicator si = null;
                    if (m.equals(iv_historyMachine))
                    {
                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.HISTORY_STATUS);
                    }
                    else if (m.equals(iv_probableMachine) || (m.equals(iv_probableMachineNoTerm)))
                    {

                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.PROBABLE_STATUS);
                    }
                    else if (m.equals(iv_familyHistoryMachine))
                    {
                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.FAMILY_HISTORY_STATUS);
                    }
                    outSet.add(si);
View Full Code Here

                    {
                        endToken = token;
                    }

                    BaseToken startToken = tokens.get(tokenStartIndex);
                    StatusIndicator si = null;
                    if (m.equals(iv_historyMachine))
                    {
                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.HISTORY_STATUS);
                    }
                    else if (m.equals(iv_probableMachine))
                    {
                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.PROBABLE_STATUS);
                    }
                    else if (m.equals(iv_familyHistoryMachine))
                    {
                        si = new StatusIndicator(
                                startToken.getStartOffset(),
                                endToken.getEndOffset(),
                                StatusIndicator.FAMILY_HISTORY_STATUS);
                    }
                    outSet.add(si);
View Full Code Here

TOP

Related Classes of org.apache.ctakes.core.fsm.output.StatusIndicator

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.