Package net.openai.util.fsm

Examples of net.openai.util.fsm.AnyCondition


    Condition dayNightWithPeriodCondition = new DayNightWordCondition();
    Condition closingPeriodCondition = new PunctuationValueCondition('.');

    startState.addTransition(hourNumCondition, hourNumState);
    startState.addTransition(hourMinCondition, hourMinTextState);
    startState.addTransition(new AnyCondition(), startState);

    hourMinTextState.addTransition(dayNightCondition, endState);
    hourMinTextState.addTransition(dayNightWithPeriodCondition,
        ampmTextWithPeriodState);
    hourMinTextState.addTransition(new AnyCondition(), startState);

    hourNumState.addTransition(dayNightCondition, endState);
    hourNumState.addTransition(dayNightWithPeriodCondition,
        ampmTextWithPeriodState);
    hourNumState.addTransition(new AnyCondition(), startState);

    ampmTextWithPeriodState.addTransition(closingPeriodCondition, endState);
    ampmTextWithPeriodState.addTransition(new AnyCondition(), startState);

    endState.addTransition(new AnyCondition(), startState);

    return m;
  }
View Full Code Here


    startState.addTransition(new TextValueCondition("a", true),
        leftAbbreviateState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(specificWordCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
 
   
    leftAbbreviateState.addTransition(firstMiddleTextCondition,
        middleATextState);
    leftAbbreviateState.addTransition(firstDashCondition, firstDashState);
    leftAbbreviateState.addTransition(new AnyCondition(), startState);
 
    firstDashState
        .addTransition(thirdMiddleTextCondition, middleATextState);
    firstDashState.addTransition(new AnyCondition(), startState);
 
    middleATextState
        .addTransition(secondMiddleTextCondition, lastTextState);
    middleATextState.addTransition(secondDashCondition, secondDashState);
    middleATextState.addTransition(new AnyCondition(), startState);
 
    secondDashState.addTransition(fourthMiddleTextCondition, lastTextState);
    secondDashState.addTransition(new AnyCondition(), startState);
 
 
    lastTextState.addTransition(new AnyCondition(), startState);
 
    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

    startState.addTransition(new TextValueCondition("a", true),
        leftAbbreviateState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(specificWordCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
 
   
    leftAbbreviateState.addTransition(firstMiddleTextCondition,
        middleATextState);
    leftAbbreviateState.addTransition(firstDashCondition, firstDashState);
    leftAbbreviateState.addTransition(new AnyCondition(), startState);
 
    firstDashState
        .addTransition(thirdMiddleTextCondition, middleATextState);
    firstDashState.addTransition(new AnyCondition(), startState);
 
    middleATextState
        .addTransition(secondMiddleTextCondition, lastTextState);
    middleATextState.addTransition(secondDashCondition, secondDashState);
    middleATextState.addTransition(new AnyCondition(), startState);
 
    secondDashState.addTransition(fourthMiddleTextCondition, lastTextState);
    secondDashState.addTransition(new AnyCondition(), startState);
 

    lastTextState.addTransition(new AnyCondition(), startState);
 
    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

        leftAbbreviatePState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(soloCondition, endState);
 
    startState.addTransition(new AnyCondition(), startState);
 
    leftAbbreviatePState.addTransition(new PunctuationValueCondition('.'), firstDotPState);
    leftAbbreviatePState.addTransition(new AnyCondition(), startState);

    firstDotPState.addTransition(soloCondition, endState);
    firstDotPState.addTransition(new TextValueCondition("v", true),
        rightAbbreviatePVState);
    firstDotPState.addTransition(new AnyCondition(), startState);
    leftAbbreviateState.addTransition(firstMiddleTextCondition,
        middleATextState);
    leftAbbreviateState.addTransition(firstDashCondition, firstDashState);
    leftAbbreviateState.addTransition(soloCondition, endState);
    leftAbbreviateState.addTransition(new AnyCondition(), startState);
 
    firstDashState
        .addTransition(thirdMiddleTextCondition, middleATextState);
    firstDashState.addTransition(new AnyCondition(), startState);
 
    middleATextState
        .addTransition(secondMiddleTextCondition, lastTextState);
    middleATextState.addTransition(secondDashCondition, secondDashState);
    middleATextState.addTransition(new AnyCondition(), startState);
 
    secondDashState.addTransition(fourthMiddleTextCondition, lastTextState);
    secondDashState.addTransition(new AnyCondition(), startState);
 
    lastTextState.addTransition(new AnyCondition(), startState);
 
    rightAbbreviatePVState.addTransition(new PunctuationValueCondition('.'), endState);
    rightAbbreviatePVState.addTransition(new AnyCondition(), startState);

    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

        leftAbbreviatePState);
    startState.addTransition(initialMiddleTextCondition, leftAbbreviateState);
    startState.addTransition(rangeCombineCondition, leftDosagesState);
    startState.addTransition(soloCondition, endState);
    startState.addTransition(specificWordCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
   
    leftAbbreviatePState.addTransition(firstPODotCondition, firstDotPState);
    leftAbbreviatePState.addTransition(new AnyCondition(), startState);

    firstDotPState.addTransition(soloCondition, endState);
       
    firstDotPState.addTransition(new TextValueCondition("o", true),
        rightAbbreviatePOState);
    firstDotPState.addTransition(new AnyCondition(), startState);
   
    leftAbbreviateState.addTransition(firstMiddleTextCondition,
        middleATextState);
    leftAbbreviateState.addTransition(firstDashCondition, firstDashState);
    leftAbbreviateState.addTransition(soloCondition, endState);
    leftAbbreviateState.addTransition(new AnyCondition(), startState);
 
    firstDashState
        .addTransition(thirdMiddleTextCondition, middleATextState);
    firstDashState.addTransition(new AnyCondition(), startState);
 
    middleATextState
        .addTransition(secondMiddleTextCondition, lastTextState);
    middleATextState.addTransition(secondDashCondition, secondDashState);
    middleATextState.addTransition(new AnyCondition(), startState);
 
    secondDashState.addTransition(fourthMiddleTextCondition, lastTextState);
    secondDashState.addTransition(new AnyCondition(), startState);
 
    lastTextState.addTransition(new AnyCondition(), startState);
    rightAbbreviatePOState.addTransition(secondPODotCondition, endState);
    rightAbbreviatePOState.addTransition(new AnyCondition(), startState)
    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

    Machine m = new Machine(startState);
   
    Condition soloCondition = new WordSetCondition(iv_singleRectalWordSet, true);
 
    startState.addTransition(soloCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
 
    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

    Machine m = new Machine(startState);
   
    Condition soloCondition = new WordSetCondition(iv_singleInjectWordSet, true);
 
    startState.addTransition(soloCondition, endState);
    startState.addTransition(new AnyCondition(), startState);
 
    endState.addTransition(new AnyCondition(), startState);
 
    return m;
  }
View Full Code Here

TOP

Related Classes of net.openai.util.fsm.AnyCondition

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.