Examples of NamedState


Examples of org.apache.ctakes.core.fsm.state.NamedState

        return m;
    }

    private Machine getNominalNegIndicatorMachine()
  {
      State startState = new NamedState("START");
      State endState = new NamedState("END");
      State anyState = new NamedState("ANY");
      State ntEndState = new NonTerminalEndState("NON TERMINAL END");
      endState.setEndStateFlag(true);
      ntEndState.setEndStateFlag(true);
 
      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);
 
      negPrepState.addTransition(new AnyCondition(), ntEndState);
      negDetState.addTransition(regNounC, regNounState);
      negDetState.addTransition(new AnyCondition(), ntEndState);
      negDetState.addTransition(new AnyCondition(), anyState);
 
      anyState.addTransition(regNounC, regNounState);
      anyState.addTransition(new AnyCondition(), anyState);
 
      regNounState.addTransition(new AnyCondition(), ntEndState);
 
      ntEndState.addTransition(new AnyCondition(), startState);
 
      return m;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.