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

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


        ntEndState.setEndStateFlag(true);

        Machine m = new Machine(startState);

        Condition negInitDetC = new TextSetCondition(iv_negInitialDeterminersSet, false);
        Condition negInit1of2DetC = new TextSetCondition(iv_negCol1of2PartSet, false);
        Condition negInit2of2DetC = new TextSetCondition(iv_negCol2of2PartSet, false);
        Condition negInit1of3DetC = new TextSetCondition(iv_negCol1Of3PartSet, false);
        Condition negInit2of3DetC = new TextSetCondition(iv_negCol2Of3PartSet, false);
        Condition negInit3of3DetC = new TextSetCondition(iv_negCol3Of3PartSet, false);
        Condition negInit1of3ArterialDetC = new TextSetCondition(iv_negCol1Of3ArterialPartSet, false);
        Condition negInit2of3ArterialDetC = new TextSetCondition(iv_negCol2Of3ArterialPartSet, false);
        Condition negInit3of3ArterialDetC = new TextSetCondition(iv_negCol3Of3ArterialPartSet, false);
        Condition negInitNtEndDetC = new TextSetCondition(iv_negColAnyOf3PartSet, false);
       
        startState.addTransition(negInitDetC, endState); // start with a modal
        startState.addTransition(negInit1of2DetC, twoPartState);
        startState.addTransition(negInit1of3DetC, twoOfThreePartState);
        startState.addTransition(negInit1of3ArterialDetC, twoArterialPartState);
View Full Code Here


 
      Condition firstDotConditionQ = new PunctuationValueCondition('.');
      Condition secondDotConditionQW = new PunctuationValueCondition('.');
      Condition thirdDotConditionQWK = new PunctuationValueCondition('.');

      Condition soloCondition = new TextSetCondition(iv_perWeekWordSet, false);
 
 
      startState.addTransition(new TextValueCondition("q", false),
          leftAbbreviateQState);
      startState.addTransition(new TextValueCondition("a", false),
View Full Code Here

    Condition firstDotConditionT = new PunctuationValueCondition('.');
    Condition secondDotConditionTI = new PunctuationValueCondition('.');
    Condition thirdDotConditionTID = new PunctuationValueCondition('.');
   
    Condition TTDCondition = new TextSetCondition(iv_threeTimesADayWordSet, false);
 
    startState.addTransition(new TextValueCondition("t", false),
        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),
        middleAbbreviateTtoIState);
    firstDotTState.addTransition(new AnyCondition(), startState);

    rangeState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
    rangeState.addTransition(new AnyCondition(), startState);

    middleAbbreviateTtoIState.addTransition(secondDotConditionTI,
        secondDotTtoIState);
    middleAbbreviateTtoIState.addTransition(new AnyCondition(), startState);
View Full Code Here

    State leftAbbreviateBState = new NamedState("LEFT_B");
    State middleAbbreviateBtoIState = new NamedState("MID_B2I");
    State rightAbbreviateBIDState = new NamedState("RIGHT_BID");
    State firstDotBState = new NamedState("FIRSTDOTB");
    State secondDotBtoIState = new NamedState("SECONDDOTB2I");
    Condition TDCondition = new TextSetCondition(iv_twiceADayWordSet, false);
   
    startState.addTransition(new TextValueCondition("b", false),
        leftAbbreviateBState);
    startState.addTransition(new TextValueCondition("q", false), twelveHourState);
    startState.addTransition(new IntegerValueCondition(12), twelveHourState);
    startState.addTransition(new TextValueCondition("twelve", false), twelveHourState);
    startState.addTransition(TDCondition, endState);
    startState.addTransition(new AnyCondition(), startState);

        twelveHourState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
        twelveHourState.addTransition(new TextSetCondition(iv_twiceADayWordSet, false), endState);
       // twelveHourState.addTransition(new RangeStrengthCondition(), endState);
        twelveHourState.addTransition(new AnyCondition(), startState);
       
    leftAbbreviateBState.addTransition(new PunctuationValueCondition('.'), firstDotBState);
    leftAbbreviateBState.addTransition(new AnyCondition(), startState);
View Full Code Here

    State rightAbbreviateQADState = new NamedState("RIGHT_QAD_EODM");
    State secondDotQtoAState = new NamedState("SECONDDOTQ2A_EODM");
    State firstDotQState = new NamedState("FIRSTDOTQ_EODM");
    State EODState = new NamedState("FIRSTDOTQ_EODM");
   
    Condition EODCondition = new TextSetCondition(iv_everyOtherDayWordSet, false);
   
    startState.addTransition(new TextValueCondition("q", false),
        leftAbbreviateQState);
    startState.addTransition(EODCondition, endState);
    startState.addTransition(new TextValueCondition("every-other", false), EODState);
    startState.addTransition(new AnyCondition(), startState);
   
    leftAbbreviateQState.addTransition(new PunctuationValueCondition('.'),
        firstDotQState);
  //leftAbbreviateQState.addTransition(new RangeStrengthCondition(), endState);
    leftAbbreviateQState.addTransition(new AnyCondition(), startState);
   
    firstDotQState.addTransition(new TextValueCondition("a", false),
        middleAbbreviateQtoAState);
    firstDotQState.addTransition(new AnyCondition(), startState);
   
    middleAbbreviateQtoAState.addTransition(new PunctuationValueCondition('.'),
        secondDotQtoAState);
    middleAbbreviateQtoAState.addTransition(new AnyCondition(), startState);
   
    secondDotQtoAState.addTransition(new TextValueCondition("d", false),
        rightAbbreviateQADState);
    secondDotQtoAState.addTransition(new AnyCondition(), startState);
   
    EODState.addTransition(new TextSetCondition(iv_dailyWordSet, false), endState);
    EODState.addTransition(new AnyCondition(), startState);
   
    rightAbbreviateQADState.addTransition(new PunctuationValueCondition('.'), endState);
    rightAbbreviateQADState.addTransition(new AnyCondition(), startState);
   
View Full Code Here

 
    Machine m = new Machine(startState);
   
    startState.addTransition(new TextValueCondition("q", false),
        leftAbbreviateQState);
      startState.addTransition(new TextSetCondition(iv_everyOtherHourWordSet, false), endState);
    startState.addTransition(new AnyCondition(), startState);
   
    leftAbbreviateQState.addTransition(new PunctuationValueCondition('.'), firstDotQState);
    leftAbbreviateQState.addTransition(new AnyCondition(), startState);
   
View Full Code Here

 
    Machine m = new Machine(startState);
   
    startState.addTransition(new TextValueCondition("as", false),
        asNeededState);
      startState.addTransition(new TextSetCondition(iv_prnWordSet, false), endState);
      startState.addTransition(new TextValueCondition("p", false), startPState);
    startState.addTransition(new AnyCondition(), startState);
   
    startPState.addTransition(new PunctuationValueCondition('.'), startPDOTState);
    startPState.addTransition(new AnyCondition(), startState);
View Full Code Here

    State secondDotQtoIState = new NamedState("SECONDDOTQ2I");
    Machine m = new Machine(startState);
   
    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);
     
      eightSuffixState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
      eightSuffixState.addTransition(new AnyCondition(), startState);
   
   
    sixHourState.addTransition(new PunctuationValueCondition('-'), rangeHourState);
    sixHourState.addTransition(new TextValueCondition("to", false), rangeHourState);
    sixHourState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
    sixHourState.addTransition(new TextSetCondition(iv_fourTimesPerDayWordSet, false), endState);
    sixHourState.addTransition(new AnyCondition(), startState);
     
    firstDotQState.addTransition(new TextValueCondition("d", false),
        middleAbbreviateQtoDState);
    firstDotQState.addTransition(new TextValueCondition("i", false),
View Full Code Here

    State firstDotQState = new NamedState("FIRSTDOTQ");
    State secondDotQtoDState = new NamedState("SECONDDOTQ2D");

    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);
       
        numState.addTransition(new TextSetCondition(iv_hourlySuffixSet, false), endState);
        numState.addTransition(new AnyCondition(), startState);
       
    middleAbbreviateQtoDState.addTransition(new PunctuationValueCondition('.'),
        secondDotQtoDState);
    middleAbbreviateQtoDState.addTransition(new AnyCondition(), startState);
View Full Code Here

      State firstDotOState = new NamedState("FIRSTDOTO");
      State firstDotHState = new NamedState("FIRSTDOTH");
     
 
     
      Condition specificWordCondition = new TextSetCondition(
          iv_dailyWordSet, false);
      Condition soloCondition = new TextSetCondition(iv_perDayWordSet, false);
      Condition containsSoloTermCondition = new ContainsSetTextValueCondition(
          iv_perDayWordSet, false);
       
     
      startState.addTransition(new TextValueCondition("q", false),
View Full Code Here

TOP

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

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.