Package net.openai.util.fsm

Examples of net.openai.util.fsm.Condition


    Machine m = new Machine(startState);

    State leftNumTextState = new NamedState("LEFT_DOSAGE");
    State rightNumTextState = new NamedState("RIGHT_DOSAGE");
    State fslashState = new NamedState("FSLASH");
    Condition dashCondition = new PunctuationValueCondition('/');

    Condition leftNumTextCondition = new StrengthCondition();
    Condition rightIntegerCondition = new IntegerCondition();
    Condition rightNumTextCondition = new WordSetCondition(
        iv_textSuffixSet, false);

    startState.addTransition(leftNumTextCondition, leftNumTextState);
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here


    State secondDotQtoPState = new NamedState("SECONDDOTQ2P");
    State secondDotBtoIState = new NamedState("SECONDDOTB2I");
    State secondDotPtoRState = new NamedState("SECONDDOTP2R");
    State secondDotTtoIState = new NamedState("SECONDDOTT2I");

    Condition firstDotConditionQ = new PunctuationValueCondition('.');
    Condition firstDotConditionB = new PunctuationValueCondition('.');
    Condition firstDotConditionP = new PunctuationValueCondition('.');
    Condition firstDotConditionT = new PunctuationValueCondition('.');
    Condition secondDotConditionQH = new PunctuationValueCondition('.');
    Condition secondDotConditionQI = new PunctuationValueCondition('.');
    Condition secondDotConditionQA = new PunctuationValueCondition('.');
    Condition secondDotConditionQD = new PunctuationValueCondition('.');
    Condition secondDotConditionQM = new PunctuationValueCondition('.');
    Condition secondDotConditionQO = new PunctuationValueCondition('.');
    Condition secondDotConditionQW = new PunctuationValueCondition('.');
    Condition secondDotConditionQP = new PunctuationValueCondition('.');
    Condition secondDotConditionBI = new PunctuationValueCondition('.');
    Condition secondDotConditionPR = new PunctuationValueCondition('.');
    Condition secondDotConditionTI = new PunctuationValueCondition('.');
    Condition thirdDotConditionQHS = new PunctuationValueCondition('.');
    Condition thirdDotConditionQAD = new PunctuationValueCondition('.');
    Condition thirdDotConditionQID = new PunctuationValueCondition('.');
    Condition thirdDotConditionQDS = new PunctuationValueCondition('.');
    Condition thirdDotConditionQMT = new PunctuationValueCondition('.');
    Condition thirdDotConditionQOD = new PunctuationValueCondition('.');
    Condition thirdDotConditionQWK = new PunctuationValueCondition('.');
    Condition thirdDotConditionQAM = new PunctuationValueCondition('.');
    Condition thirdDotConditionQPM = new PunctuationValueCondition('.');
    Condition thirdDotConditionBID = new PunctuationValueCondition('.');
    Condition thirdDotConditionPRN = new PunctuationValueCondition('.');
    Condition thirdDotConditionTID = new PunctuationValueCondition('.');

    startState.addTransition(new TextValueCondition("q", true),
        leftAbbreviateQState);
    startState.addTransition(new TextValueCondition("b", true),
        leftAbbreviateBState);
View Full Code Here

    State firstDotAState = new NamedState("FIRSTDOTA");
    State firstDotOState = new NamedState("FIRSTDOTO");
    State firstDotHState = new NamedState("FIRSTDOTH");
    State firstDotPState = new NamedState("FIRSTDOTP");

    Condition firstQDDotCondition = new PunctuationValueCondition('.');
    Condition secondQDDotCondition = new PunctuationValueCondition('.');
    Condition firstODDotCondition = new PunctuationValueCondition('.');
    Condition secondQHDotCondition = new PunctuationValueCondition('.');
    Condition secondODDotCondition = new PunctuationValueCondition('.');
    Condition firstAMDotCondition = new PunctuationValueCondition('.');
    Condition firstPMDotCondition = new PunctuationValueCondition('.');
    Condition secondAMDotCondition = new PunctuationValueCondition('.');
    Condition secondPMDotCondition = new PunctuationValueCondition('.');
    Condition firstHSDotCondition = new PunctuationValueCondition('.');
    Condition secondHSDotCondition = new PunctuationValueCondition('.');

    Condition soloCondition = new WordSetCondition(iv_singleWordSet, true);

    startState.addTransition(new TextValueCondition("q", true),
        leftAbbreviateQState);
    startState.addTransition(new TextValueCondition("a", true),
        leftAbbreviateAState);
View Full Code Here

    State lastTextState = new NamedState("RIGHT_FREQ");
    State middleATextState = new NamedState("MID_TEXT");
    State firstDashState = new NamedState("FIRSTDASH");
    State secondDashState = new NamedState("SECONDDASH");

    Condition integerCondition = new IntegerCondition();
    Condition firstDashCondition = new PunctuationValueCondition('-');
    Condition secondDashCondition = new PunctuationValueCondition('-');

    Condition numericStartCondition = new WordSetCondition(iv_frequencySet,
        false);
    Condition hyphenatedCondition = new WordSetCondition(iv_hyphenatedSet,
        false);
    Condition firstMiddleTextCondition = new WordSetCondition(
        iv_middleTermSet, true);
    Condition secondMiddleTextCondition = new WordSetCondition(
        iv_middleTermSet, true);
    Condition thirdMiddleTextCondition = new WordSetCondition(
        iv_middleTermSet, true);
    Condition fourthMiddleTextCondition = new WordSetCondition(
        iv_middleTermSet, true);
    Condition lastTextCondition = new WordSetCondition(iv_textSuffixSet,
        false);
    Condition firstTextCondition = new WordSetCondition(iv_textPrefixSet,
        false);
    Condition soloCondition = new WordSetCondition(iv_singleWordSet, true);
    Condition specificWordCondition = new WordSetCondition(
        iv_specifiedWordSet, false);
    Condition containsSoloTermCondition = new ContainsSetTextValueCondition(
        iv_singleWordSet, true);

    startState.addTransition(numericStartCondition, leftAbbreviateState);
    startState.addTransition(firstTextCondition, leftAbbreviateState);
    startState.addTransition(new TextValueCondition("a", true),
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,
//        false);

    Condition secondMiddleTextCondition = new WordSetCondition(
        iv_middleTermSet, false);

    startState.addTransition(rangeCombineCondition, leftAbbreviateState);
    startState.addTransition(new WordSetCondition(iv_frequencySet,
        false), leftAbbreviateState);
View Full Code Here

    endState.setEndStateFlag(true);
    ntEndState.setEndStateFlag(true);

    Machine m = new Machine(startState);

    Condition subFirstBegin = new TextSetCondition(iv_historySubBeginSet,
        false);
    Condition subFirstMid = new TextSetCondition(iv_historySubMidSet,
        false);
    Condition subFirstNext = new TextSetCondition(iv_historySubNextSet,
        false);

    startState.addTransition(subFirstBegin, medState);
      startState.addTransition(new AnyCondition(), startState);
     
View Full Code Here

    endState.setEndStateFlag(true);
    ntEndState.setEndStateFlag(true);

    Machine m = new Machine(startState);

    Condition subFirstBegin = new TextSetCondition(iv_probableSubBeginSet,
        false);
    Condition subFirstNext = new TextSetCondition(iv_probableSubNextSet,
        false);

    startState.addTransition(subFirstBegin, medState);
 
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here

    endState.setEndStateFlag(true);
    ntEndState.setEndStateFlag(true);
 
    Machine m = new Machine(startState);
 
    Condition subFirstBegin = new TextSetCondition(iv_confirmedSubBeginSet,
        false);
    Condition subFirstNext = new TextSetCondition(iv_confirmedSubNextSet,
        false);
 
    startState.addTransition(subFirstBegin, medState);
      startState.addTransition(new TextValueCondition("p", false), firstDotState);
      startState.addTransition(new AnyCondition(), startState);
View Full Code Here

        State negCollocState = new NamedState("NEG_COLLOC");
        State negColPartState = new NamedState("NEG_COLPART");
        State negColMultiPartState = new NamedState("NEG_COLMULTIPART");
        State negColSecondPartState = new NamedState("NEG_COL2NDPART");

        Condition regModalC = new TextSetCondition(iv_modalVerbsSet, false);
        Condition negPartC = new TextSetCondition(iv_negParticlesSet, false);
        Condition regVerbC = new TextSetCondition(iv_regVerbsSet, false);
        Condition negVerbC = new TextSetCondition(iv_negVerbsSet, false);
        Condition negDetC = new TextSetCondition(iv_negDeterminersSet, false);
        Condition negCollocC = new TextSetCondition(iv_negCollocSet, false);
        Condition negColPartC = new TextSetCondition(iv_negColPartSet, false);
        Condition neg1of3PartC = new TextSetCondition(iv_negCol1of3PartSet, false);
        Condition neg2of3PartC = new TextSetCondition(iv_negCol2of3PartSet, false);
        Condition notCollocC = new NegateCondition(negCollocC);

        startState.addTransition(negVerbC, negVerbState);
        startState.addTransition(neg1of3PartC, negColMultiPartState);
        startState.addTransition(negCollocC, negCollocState); //rule
     
View Full Code Here

 
      Machine m = new Machine(startState);
      State negPrepState = new NamedState("NEG_PREP");
      State negDetState = new NamedState("NEG_DET");
      State regNounState = new NamedState("REG_NOUN");
      Condition negPrepC = new TextSetCondition(iv_negPrepositionsSet, false);
      Condition negDetC = new TextSetCondition(iv_negDeterminersSet, false);
      Condition regNounC = new TextSetCondition(iv_regNounsSet, false);
 
      startState.addTransition(negDetC, negDetState); // start with a modal
   
      startState.addTransition(negPrepC, negPrepState);
      startState.addTransition(new AnyCondition(), startState);
View Full Code Here

TOP

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

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.