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

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


    endState.setEndStateFlag(true);
 
    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);
   
    firstDotQState.addTransition(new TextValueCondition("o", false),
        middleAbbreviateQtoOState);
      firstDotQState.addTransition(new AnyCondition(),  startState);
     
    middleAbbreviateQtoOState.addTransition(new PunctuationValueCondition('.'),
        secondDotQtoOState);
    middleAbbreviateQtoOState.addTransition(new AnyCondition(), startState);
   
    secondDotQtoOState.addTransition(new TextValueCondition("d", false),
        rightAbbreviateQODState);
    secondDotQtoOState.addTransition(new AnyCondition(), startState);
   
    rightAbbreviateQODState.addTransition(new PunctuationValueCondition('.'), endState);
    rightAbbreviateQODState.addTransition(new AnyCondition(), startState);
View Full Code Here


    ntEndState.setEndStateFlag(true);
    endState.setEndStateFlag(true);
 
    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);
   
    startPDOTState.addTransition(new TextValueCondition("r", false), startRState);
    startPDOTState.addTransition(new AnyCondition(), startState);
     
    startRState.addTransition(new PunctuationValueCondition('.'), startRDOTState);
    startRState.addTransition(new AnyCondition(), startState);
 
    startRDOTState.addTransition(new TextValueCondition("n", false), startNState);
    startRDOTState.addTransition(new AnyCondition(), startState);
   
    startNState.addTransition(new PunctuationValueCondition('.'), endState);
    startNState.addTransition(new AnyCondition(), startState);
   
   
    asNeededState.addTransition(new TextValueCondition("needed", false), endState);
    asNeededState.addTransition(new PunctuationValueCondition('-'), asNeededHyphState);
    asNeededState.addTransition(new AnyCondition(), startState);
   
    asNeededHyphState.addTransition(new TextValueCondition("needed", false), endState);
    asNeededHyphState.addTransition(new AnyCondition(), startState);
   
    endState.addTransition(new AnyCondition(), startState);
   
    return m;
View Full Code Here

    State firstDotQState = new NamedState("FIRSTDOTQ");
    State secondDotQtoDState = new NamedState("SECONDDOTQ2D");
    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),
        middleAbbreviateQtoIState);
      firstDotQState.addTransition(new AnyCondition(), startState);
     
    middleAbbreviateQtoDState.addTransition(new PunctuationValueCondition('.'),
        secondDotQtoDState);
    middleAbbreviateQtoDState.addTransition(new AnyCondition(), startState);
   
           
    secondDotQtoDState.addTransition(new TextValueCondition("s", false),
        rightAbbreviateQDSState);
    secondDotQtoDState.addTransition(new AnyCondition(), startState);
 
    secondDotQtoIState.addTransition(new TextValueCondition("d", false),
        rightAbbreviateQIDState);
    secondDotQtoIState.addTransition(new AnyCondition(), startState);
   
    middleAbbreviateQtoIState.addTransition(new PunctuationValueCondition('.'),
        secondDotQtoIState);
View Full Code Here

    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);
   
           
    secondDotQtoDState.addTransition(new TextValueCondition("s", false),
        rightAbbreviateQDSState);
    secondDotQtoDState.addTransition(new AnyCondition(), startState);

    rightAbbreviateQDSState.addTransition(new PunctuationValueCondition('.'), endState);
    rightAbbreviateQDSState.addTransition(new AnyCondition(), startState);
View Full Code Here

      Condition soloCondition = new TextSetCondition(iv_perDayWordSet, false);
      Condition containsSoloTermCondition = new ContainsSetTextValueCondition(
          iv_perDayWordSet, false);
       
     
      startState.addTransition(new TextValueCondition("q", false),
          leftAbbreviateQState);
      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);
 
      startState.addTransition(specificWordCondition, endState);
      startState.addTransition(soloCondition, endState);
      startState.addTransition(containsSoloTermCondition, endState);
     
      startState.addTransition(new AnyCondition(), startState);
     
      clockState.addTransition(new TextValueCondition("a", false),
      leftAbbreviateAState);
      clockState.addTransition(new TextValueCondition("p", false),
      leftAbbreviatePState);
      clockState.addTransition(new AnyCondition(), startState);
     
      leftAbbreviateState.addTransition(specificWordCondition, endState);
      leftAbbreviateState.addTransition(new TextValueCondition("time", false), endState);
      leftAbbreviateState.addTransition(new AnyCondition(), startState);
     
      leftAbbreviateQState.addTransition(new PunctuationValueCondition('.'), firstDotQState);
      leftAbbreviateQState.addTransition(new AnyCondition(), startState);
       
      leftAbbreviateOState.addTransition(new PunctuationValueCondition('.'), firstDotOState);
      leftAbbreviateOState.addTransition(new AnyCondition(), startState);
     
      leftAbbreviateHState.addTransition(new PunctuationValueCondition('.'), firstDotHState);
      leftAbbreviateHState.addTransition(new AnyCondition(), startState);
     
      firstDotQState.addTransition(new TextValueCondition("d", false),
          rightAbbreviateQDState);
      firstDotQState.addTransition(new TextValueCondition("h", false),
          middleAbbreviateQtoHState);
      firstDotQState.addTransition(new AnyCondition(), startState);
     
      firstDotOState.addTransition(new TextValueCondition("d", false),
          rightAbbreviateODState);
      firstDotOState.addTransition(new AnyCondition(), startState);
     
      middleAbbreviateQtoHState.addTransition(new PunctuationValueCondition('.'),
          secondDotQtoHState);
      middleAbbreviateQtoHState.addTransition(new AnyCondition(), startState);
     
      leftAbbreviateAState.addTransition(new PunctuationValueCondition('.'), firstDotAState);
      //leftAbbreviateAState.addTransition(soloCondition, endState);
      leftAbbreviateAState.addTransition(new AnyCondition(), startState);
   
      leftAbbreviatePState.addTransition(new PunctuationValueCondition('.'), firstDotPState);
      leftAbbreviatePState.addTransition(new AnyCondition(), startState);
   
      firstDotAState.addTransition(new TextValueCondition("m", false),
          rightAbbreviateAMState);
      firstDotAState.addTransition(new AnyCondition(), startState);
     

       
      firstDotPState.addTransition(new TextValueCondition("m", false),
          rightAbbreviatePMState);
      firstDotPState.addTransition(new AnyCondition(), startState);
     
      secondDotQtoHState.addTransition(new TextValueCondition("s", false),
          rightAbbreviateQHSState);
     
      secondDotQtoHState.addTransition(new AnyCondition(), startState);
     

      rightAbbreviateAMState.addTransition(new PunctuationValueCondition('.'), endState);
      rightAbbreviateAMState.addTransition(new AnyCondition(), startState);
   
      rightAbbreviatePMState.addTransition(new PunctuationValueCondition('.'), endState);
      rightAbbreviatePMState.addTransition(new AnyCondition(), startState);
     
      firstDotHState.addTransition(new TextValueCondition("s", false),
          rightAbbreviateHSState);
      firstDotHState.addTransition(new AnyCondition(), startState);
     
      rightAbbreviateODState.addTransition(new PunctuationValueCondition('.'), endState);
      rightAbbreviateODState.addTransition(new AnyCondition(), startState);
View Full Code Here

 
    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);
View Full Code Here

        false);
    Condition subFirstNext = new TextSetCondition(iv_confirmedSubNextSet,
        false);
 
    startState.addTransition(subFirstBegin, medState);
      startState.addTransition(new TextValueCondition("p", false), firstDotState);
      startState.addTransition(new AnyCondition(), startState);
     
      firstDotState.addTransition(new PunctuationValueCondition('.'), rState);
      firstDotState.addTransition(new AnyCondition(), startState);
     
      rState.addTransition(new TextValueCondition("r", false), secondDotState);
      rState.addTransition(new AnyCondition(), startState);
     
      secondDotState.addTransition(new PunctuationValueCondition('.'), nState);
      secondDotState.addTransition(new AnyCondition(), startState);
     
      nState.addTransition(new TextValueCondition("n", false), thirdDotState);
      nState.addTransition(new AnyCondition(), startState);
     
      thirdDotState.addTransition(new PunctuationValueCondition('.'), medState);
      thirdDotState.addTransition(new AnyCondition(), startState);
     
View Full Code Here

        startState.addTransition(
                new DisjoinCondition(negPartC, negDetC),
                negPartState);
       
        startState
        .addTransition(new TextValueCondition("r", false), rAbbrState);
        startState
        .addTransition(new TextValueCondition("w", false), wAbbrState);
        startState.addTransition(new AnyCondition(), startState);
       

        negColMultiPartState.addTransition(neg2of3PartC, negColSecondPartState);
        negColMultiPartState.addTransition(negColPartC, negCollocState);
        negColMultiPartState.addTransition(new AnyCondition(), startState);
       
        negColSecondPartState.addTransition(new TextSetCondition(iv_negColAnyOf3PartSet, false), negCollocState);
        negColSecondPartState.addTransition(negColPartC, negCollocState);
        negColSecondPartState.addTransition(new AnyCondition(), startState);
       
        regModalState.addTransition(negCollocC, negCollocState);
        negCollocState.addTransition(negColPartC, negColPartState); //out
       
        negColPartState.addTransition(new AnyCondition(), ntEndState);
       
        negCollocState.addTransition(new AnyCondition(), startState);

        regModalState.addTransition(
                new DisjoinCondition(negPartC, negDetC),
                negPartState);
        regModalState.addTransition(new AnyCondition(), anyState);

        anyState.addTransition(
                new DisjoinCondition(negPartC, negDetC),
                negPartState);
        anyState.addTransition(new AnyCondition(), startState);
        rAbbrState.addTransition(
                new TextValueCondition("/", false),
                fslashState);
        rAbbrState.addTransition(new AnyCondition(), startState);
       
        wAbbrState.addTransition(
                new TextValueCondition("/", false),
                fslashState);
        wAbbrState.addTransition(new AnyCondition(), startState);

        fslashState.addTransition(new TextValueCondition("o", false), endState);
        fslashState.addTransition(new AnyCondition(), startState);
       
        negPartState.addTransition(notCollocC, ntEndState);
        negVerbState.addTransition(notCollocC, ntEndState);
        negPartState.addTransition(new AnyCondition(), startState);
View Full Code Here

 
    Condition specificWordCondition = new WordSetCondition(
        iv_specifiedPatchesWordSet, false);
   
 
    startState.addTransition(new TextValueCondition("a", true),
        leftAbbreviateState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(specificWordCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here

 
    Condition specificWordCondition = new WordSetCondition(
        iv_specifiedGastricWordSet, false);
   
 
    startState.addTransition(new TextValueCondition("a", true),
        leftAbbreviateState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(specificWordCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here

TOP

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

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.