* </ol>
*
* @return
*/
private Machine getWeeklyMachine() {
State startState = new NamedState("START");
State endState = new NamedState("END");
State ntEndState = new NonTerminalEndState("NON TERMINAL END");
ntEndState.setEndStateFlag(true);
endState.setEndStateFlag(true);
State leftAbbreviateState = new NamedState("LEFT_FREQ");
Machine m = new Machine(startState);
State leftAbbreviateQState = new NamedState("LEFT_Q");
State middleAbbreviateQtoWState = new NamedState("MID_Q2W");
State rightAbbreviateQWKState = new NamedState("RIGHT_QWK");
State firstDotQState = new NamedState("FIRSTDOTQ");
State secondDotQtoWState = new NamedState("SECONDDOTQ2W");
Condition firstDotConditionQ = new PunctuationValueCondition('.');
Condition secondDotConditionQW = new PunctuationValueCondition('.');
Condition thirdDotConditionQWK = new PunctuationValueCondition('.');
Condition soloCondition = new TextSetCondition(iv_perWeekWordSet, false);
startState.addTransition(new TextValueCondition("q", false),
leftAbbreviateQState);
startState.addTransition(new TextValueCondition("a", false),
leftAbbreviateState);
startState.addTransition(new TextValueCondition("at", false),
leftAbbreviateState);
startState.addTransition(new TextValueCondition("per", false),
leftAbbreviateState);
startState.addTransition(soloCondition, endState);
startState.addTransition(new AnyCondition(), startState);
leftAbbreviateQState.addTransition(firstDotConditionQ, firstDotQState);
leftAbbreviateQState.addTransition(new AnyCondition(), startState);
leftAbbreviateState.addTransition(new ContainsSetTextValueCondition(
iv_perWeekWordSet, false), endState);
leftAbbreviateState.addTransition(new AnyCondition(), startState);
firstDotQState.addTransition(new TextValueCondition("w", false),
middleAbbreviateQtoWState);
firstDotQState.addTransition(new AnyCondition(), startState);
middleAbbreviateQtoWState.addTransition(secondDotConditionQW,
secondDotQtoWState);
middleAbbreviateQtoWState.addTransition(new AnyCondition(), startState);
secondDotQtoWState.addTransition(new TextValueCondition("k", false),
rightAbbreviateQWKState);
secondDotQtoWState.addTransition(new AnyCondition(), startState);
rightAbbreviateQWKState.addTransition(thirdDotConditionQWK, endState);
rightAbbreviateQWKState.addTransition(new AnyCondition(), startState);
// rightAbbreviateQWKState.addTransition(new AnyCondition(), startState);