Package org.apache.ctakes.core.fsm.condition

Examples of org.apache.ctakes.core.fsm.condition.IntegerRangeCondition


    State monthNumState = new NamedState("MONTH_NUM");
    State monthDaySeparatorState = new NamedState("MONTH_DAY_SEP");
    State dayNumState = new NamedState("DAY_NUM");
    State dayYearSeparatorState = new NamedState("DAY_YEAR_SEP");

    Condition monthNumCondition = new IntegerRangeCondition(MIN_MONTH,
        MAX_MONTH);
    Condition mdFslashCondition = new PunctuationValueCondition('/');
    Condition mdDashCondition = new PunctuationValueCondition('-');
    Condition dyFslashCondition = new PunctuationValueCondition('/');
    Condition dyDashCondition = new PunctuationValueCondition('-');
    Condition dayNumCondition = new IntegerRangeCondition(MIN_DAY, MAX_DAY);
    Condition yearNumCondition = new IntegerRangeCondition(MIN_YEAR,
        MAX_YEAR);

    // condition that is not a fslash or dash
    Condition notFslashNotDashCondition = new CombineCondition(
        new NegateCondition(mdFslashCondition), new NegateCondition(
View Full Code Here


    Condition monthFullTextCondition = new WordSetCondition(
        iv_monthFullNameSet, false);
    Condition monthShortTextCondition = new WordSetCondition(
        iv_monthShortNameSet, false);
    Condition dayNumCondition = new IntegerRangeCondition(MIN_DAY, MAX_DAY);
    Condition periodCondition = new PunctuationValueCondition('.');
    Condition yearNumCondition = new IntegerRangeCondition(MIN_YEAR,
        MAX_YEAR);
    Condition commaCondition = new PunctuationValueCondition(',');

    // condition for not being a comma or year number
    Condition notCommaNotYearNumCondition = new CombineCondition(
View Full Code Here

        leftAbbreviateTState);
    startState.addTransition(new TextValueCondition("q", false),
        eightHourState);
    startState.addTransition(new IntegerValueCondition(8), eightHourState);
    startState.addTransition(TTDCondition, endState);
    startState.addTransition(new DisjoinCondition(new CombineCondition(new NegateCondition(new IntegerRangeCondition(1,7)), new IntegerCondition()), new IntegerValueCondition(8)), handleRangeState);
    startState.addTransition(new DisjoinCondition(new TextSetCondition(iv_postEightWordSet, false), new TextValueCondition("eight", false)), eightHourState);
 
    startState.addTransition(new AnyCondition(), startState);

    handleRangeState.addTransition(new PunctuationValueCondition('-'), hyphState);
    handleRangeState.addTransition(new AnyCondition(), startState);
   
    eightHourState.addTransition(new PunctuationValueCondition('-'), hyphState);
    eightHourState.addTransition(new TextValueCondition("to", false), hyphState);
    eightHourState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
    eightHourState.addTransition(new AnyCondition(), startState);

    leftAbbreviateTState.addTransition(firstDotConditionT, firstDotTState);
    leftAbbreviateTState.addTransition(new AnyCondition(), startState);

    hyphState.addTransition(new IntegerRangeCondition(9,10), rangeState);
    hyphState.addTransition(new TextValueCondition("ten", false), rangeState);
    hyphState.addTransition(new TextValueCondition("nine", false), rangeState);
    hyphState.addTransition(new AnyCondition(), startState);

    firstDotTState.addTransition(new TextValueCondition("i", false),
View Full Code Here

    startState.addTransition(new TextValueCondition("q", false),
        leftAbbreviateQState);
    startState.addTransition(new TextSetCondition(
        iv_fourTimesPerDayWordSet, false) , endState);
    startState.addTransition(new IntegerValueCondition(6), sixHourState);
    startState.addTransition(new DisjoinCondition(new CombineCondition(new NegateCondition(new IntegerRangeCondition(1,5)), new IntegerCondition()), new IntegerValueCondition(6)), handleRangeState);
    startState.addTransition(new DisjoinCondition(new TextSetCondition(iv_postSixWordSet, false), new TextValueCondition("six", false)), sixHourState);

    startState.addTransition(new AnyCondition(), startState);
   
    handleRangeState.addTransition(new PunctuationValueCondition('-'), rangeHourState);
    handleRangeState.addTransition(new AnyCondition(), startState);
   
      leftAbbreviateQState.addTransition(new PunctuationValueCondition('.'), firstDotQState);
      leftAbbreviateQState.addTransition(new TextValueCondition("six", false), sixHourState);
      leftAbbreviateQState.addTransition(new IntegerValueCondition(6), sixHourState);

      leftAbbreviateQState.addTransition(new TextSetCondition(
        iv_fourTimesPerDayWordSet, false) , sixHourState);
      leftAbbreviateQState.addTransition(new AnyCondition(), startState);
     
     
      rangeHourState.addTransition(new IntegerRangeCondition(7,10), eightSuffixState);
      rangeHourState.addTransition(new TextValueCondition("seven", false), eightSuffixState);
      rangeHourState.addTransition(new TextValueCondition("eight", false), eightSuffixState);
      rangeHourState.addTransition(new TextValueCondition("nine", false), eightSuffixState);
      rangeHourState.addTransition(new TextValueCondition("ten", false), eightSuffixState);
      rangeHourState.addTransition(new AnyCondition(), startState);
View Full Code Here

    Machine m = new Machine(startState);

    startState.addTransition(new TextSetCondition(
        iv_sixTimesPerDayWordSet, false) , endState);
    startState.addTransition(new IntegerValueCondition(4), fourHourState);
    startState.addTransition(new DisjoinCondition(new CombineCondition(new NegateCondition(new IntegerRangeCondition(1,3)), new IntegerCondition()), new IntegerValueCondition(4)), handleRangeState);
    startState.addTransition(new DisjoinCondition(new TextSetCondition(iv_postFourWordSet, false), new TextValueCondition("four", false)), fourHourState);
   
    startState.addTransition(new AnyCondition(), startState);
   
    handleRangeState.addTransition(new PunctuationValueCondition('-'), hyphState);
    handleRangeState.addTransition(new AnyCondition(), startState);
   
    fourHourState.addTransition(new PunctuationValueCondition('-'), hyphState);
    fourHourState.addTransition(new TextValueCondition("to", false), hyphState);
    //fourHourState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
   
    fourHourState.addTransition(new AnyCondition(), startState);
   
    firstDotQState.addTransition(new TextValueCondition("d", false),
        middleAbbreviateQtoDState);

        firstDotQState.addTransition(new AnyCondition(), startState);
       
        hyphState.addTransition(new IntegerRangeCondition(5,8), numState);
        hyphState.addTransition(new TextValueCondition("five", false), numState);
        hyphState.addTransition(new TextValueCondition("six", false), numState);
        hyphState.addTransition(new TextValueCondition("seven", false), numState);
        hyphState.addTransition(new TextValueCondition("eight", false), numState);
        hyphState.addTransition(new AnyCondition(), startState);
View Full Code Here

      startState.addTransition(new TextValueCondition("o", false),
          leftAbbreviateOState);
      startState.addTransition(new TextValueCondition("h", false),
          leftAbbreviateHState);
 
            startState.addTransition(new IntegerRangeCondition(1,12), clockState);
            startState.addTransition(new TimeCondition(), endState);
      startState.addTransition(new TextValueCondition("bed", false),
          leftAbbreviateState);
      startState.addTransition(new TextValueCondition("per", false),
          leftAbbreviateState);
View Full Code Here

 
    Machine m = new Machine(startState);
 
    startState.addTransition(new TextSetCondition(
        iv_sixTimesPerDayWordSet, false) , endState);
    startState.addTransition(new DisjoinCondition(new NegateCondition(new IntegerRangeCondition(1,4)), new IntegerValueCondition(5)), handleRangeState);
    startState.addTransition(new IntegerValueCondition(5), fiveHourState);
    startState.addTransition(new TextValueCondition("five", false), fiveHourState);

    startState.addTransition(new AnyCondition(), startState);
   
    handleRangeState.addTransition(new PunctuationValueCondition('-'), hyphState);
    handleRangeState.addTransition(new AnyCondition(), startState);
   
    fiveHourState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
    fiveHourState.addTransition(new AnyCondition(), startState);
   
    hyphState.addTransition(new IntegerRangeCondition(5,10), fiveHourState);
    hyphState.addTransition(new AnyCondition(), startState);
   
    ntEndState.addTransition(new AnyCondition(), startState);
    endState.addTransition(new AnyCondition(), startState);
   
View Full Code Here

    State lastTextState = new NamedState("RIGHT_FREQ");
    State middleATextState = new NamedState("MID_TEXT");
    State midTermState = new NamedState("MID_TERM");
    State termState = new NamedState("SKIP_TERM");

    Condition integerCondition = new IntegerRangeCondition(0,5);
   
    Condition rangeCombineCondition = new DisjoinCondition(
        new RangeCondition(), new RangeStrengthCondition());

//    Condition hyphenatedCondition = new WordSetCondition(iv_hyphenatedSet,
View Full Code Here

    Machine m = new Machine(startState);
    State systolicState = new NamedState("SYSTOLIC");
    State fslashState = new NamedState("FSLASH");

    Condition systolicCondition = new IntegerRangeCondition(80, 200);
    Condition diastolicCondition = new IntegerRangeCondition(60, 160);
    Condition fslashCondition = new PunctuationValueCondition('/');

    startState.addTransition(systolicCondition, systolicState);
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here

    State monthNumState = new NamedState("MONTH_NUM");
    State monthDaySeparatorState = new NamedState("MONTH_DAY_SEP");
    State dayNumState = new NamedState("DAY_NUM");
    State dayYearSeparatorState = new NamedState("DAY_YEAR_SEP");

    Condition monthNumCondition = new IntegerRangeCondition(MIN_MONTH,
        MAX_MONTH);
    Condition mdFslashCondition = new PunctuationValueCondition('/');
    Condition mdDashCondition = new PunctuationValueCondition('-');
    Condition dyFslashCondition = new PunctuationValueCondition('/');
    Condition dyDashCondition = new PunctuationValueCondition('-');
    Condition dayNumCondition = new IntegerRangeCondition(MIN_DAY, MAX_DAY);
    Condition yearNumCondition = new IntegerRangeCondition(MIN_YEAR,
        MAX_YEAR);

    // condition that is not a fslash or dash
    Condition notFslashNotDashCondition = new CombineCondition(
        new NegateCondition(mdFslashCondition), new NegateCondition(
View Full Code Here

TOP

Related Classes of org.apache.ctakes.core.fsm.condition.IntegerRangeCondition

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.