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);