Package net.openai.util.fsm

Examples of net.openai.util.fsm.Condition


    State endState = new NamedState("END");
    endState.setEndStateFlag(true);
 
    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);
View Full Code Here


      endState.setEndStateFlag(true);
 
      Machine m = new Machine(startState);
 
      Condition probableC = new TextSetCondition(iv_probableSet, false);
    
 
      startState.addTransition(probableC, endState);
      startState.addTransition(new AnyCondition(), startState);
View Full Code Here

        State fslashState = new NamedState("FORWARD_SLASH");
        State probCollocState = new NamedState("PROB_COLLOC");
        State probFamilyPartState = new NamedState("PROB_FAMC");
        State probColPartState = new NamedState("PROB_COLPART");
       // Condition probableFHC = new TextValueCondition("family", false);
        Condition probCollecC = new TextSetCondition(iv_probableCollocSet, false);
        Condition probColPartC = new TextSetCondition(iv_probableColPartSet, false);
        
 
        startState.addTransition(probCollecC, probCollocState); //questionable
        startState.addTransition(new AnyCondition(), startState);
View Full Code Here

        endState.setEndStateFlag(true);

        Machine m = new Machine(startState);

        Condition historyC = new TextSetCondition(iv_historySet, false);
 
        startState.addTransition(historyC, endState);
        startState
                .addTransition(new TextValueCondition("h", false), hAbbrState);
        startState
View Full Code Here

        endState.setEndStateFlag(true);

        Machine m = new Machine(startState);

        Condition familyHistoryC = new TextSetCondition(
                iv_familyHistorySet,
                false);

        startState.addTransition(familyHistoryC, endState);
        startState.addTransition(
View Full Code Here

      State decPartNumState = new NamedState("DECIMAL_NUM");
      State fslashState = new NamedState("FORWARD-SLASH");
      State hypenState = new NamedState("HYPHEN");
      State dotLeftState = new NamedState("DOT_LEFT");
      State dotRightState = new NamedState("DOT_RIGHT");
      Condition intNumeratorCondition = new NumberCondition();
      Condition decPartInt = new NumberCondition();
      Condition fslashCondition = new PunctuationValueCondition('/');
      Condition intDenominatorCondition = new NumberCondition();
      Condition decDenominatorCondition = new DecimalCondition();
      Condition decimalCondition = new DecimalCondition();
      Condition containsdotCondition = new PunctuationValueCondition('.');
      Condition leftContainsShortDose = new ContainsSetTextValueCondition(
        iv_textNumeratorSet, false);
   
      startState.addTransition(intNumeratorCondition, numeratorLeftState);
      startState.addTransition(leftContainsShortDose, numeratorLeftState);
      startState.addTransition(new DecimalCondition(), numeratorLeftState);
View Full Code Here

        Machine m = new Machine(startState);
        State numeratorNumState = new NamedState("NUMERATOR_NUM");
        State fslashState = new NamedState("FORWARD_SLASH");
        State numeratorTextState = new NamedState("NUMERATOR_TEXT");

        Condition intNumeratorCondition = new NumberCondition();
        Condition fslashCondition = new PunctuationValueCondition('/');
        Condition intDenominatorCondition = new NumberCondition();
        Condition decimalCondition = new DecimalCondition();
        Condition textNumeratorCondition =
            new WordSetCondition(iv_textNumeratorSet, false);
        Condition textDenominatorCondition =
            new WordSetCondition(iv_textDenominatorSet, false);

        startState.addTransition(intNumeratorCondition, numeratorNumState);
        startState.addTransition(decimalCondition, numeratorNumState);
    startState.addTransition(textNumeratorCondition, numeratorTextState);
View Full Code Here

    State rightNumTextState = new NamedState("RIGHT_NUM_TEXT");
    State middleDash = new NamedState("MIDDASH");
    State dashAnotherState = new NamedState("DASH_2");
    State dash2State = new NamedState("DASH2");
   
    Condition rightIntCondition = new NumberCondition();
   
    Condition rightNumTextCondition =
      new WordSetCondition(iv_textNumberSet, false);
 
   
    startState.addTransition(new WordSetCondition(iv_textNumberSet, false), leftNumTextState);
    startState.addTransition(new AnyCondition(), startState);
View Full Code Here

      State leftNumIntegerState = new NamedState("LEFT_NUM_INTEGER");
      State leftNumTextState = new NamedState("LEFT_NUM_TEXT");
      State dashState = new NamedState("DASH1");
      State dash1State = new NamedState("DASH_1");
   
      Condition leftIntCondition = new NumberCondition();
      Condition rightIntCondition = new NumberCondition();
 
      startState.addTransition(leftIntCondition, leftNumIntegerState);
      startState.addTransition(new WordSetCondition(iv_hyphenatedSet, false), endState);
      startState.addTransition(new WordSetCondition(iv_textNumberSet, false), leftNumTextState);
      startState.addTransition(new AnyCondition(), startState);
View Full Code Here

    State decPartNumState = new NamedState("DECIMAL_NUM");

    State dashState = new NamedState("DASH");
    State dotState = new NamedState("DOT");

    Condition rangeCondition = new RangeCondition();
    Condition leftIntCondition = new NumberCondition();
    Condition decIntCondition = new NumberCondition();
    Condition rightIntCondition = new NumberCondition();

    Condition rightDecimalCondition = new DecimalCondition();
    Condition dashCondition = new PunctuationValueCondition('-');
   
    Condition dotCondition = new PunctuationValueCondition('.');

    Condition rightDoseagesCondition = new FractionStrengthCondition();
 
    startState.addTransition(leftIntCondition, leftNumIntegerState);
    startState.addTransition(rangeCondition, leftNumIntegerState);

 
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.