new DFSATransition<>(null, states.get(start), states.get(end), new Word(str), null, cost); states.get(start).addTransition(trans); ++edgesNb;
tSource.addTransition (new DFSATransition<>("", tSource, new DFSAState<>(-1, null), "1", "", 0)); newASource.addTransition (new DFSATransition<>("", newASource, aDest, newAnswer.toString(), "", newCost)); DFSAState<String, Integer> aDest = new DFSAState<>(nodeId.intValue(), answerLattice, 0.0); stateLinks.put(tSource,aDest); newASource.addTransition(new DFSATransition<>("", newASource, aDest, newAnswer.toString(), "", newCost));
startState.addTransition(tr); } else { int sharedProduct = product / tagNum[pos + rightWindow]; DFSATransition<String, Integer> tr = new DFSATransition<>("", sourceState, destState, classIndex.get(curTag), "", -windowScore[pos][product]); graphStates[pos-leftWindow][predTag].addTransition(tr);
tSource.addTransition (new DFSATransition<String, Integer>("", tSource, new DFSAState<String, Integer>(-1, null), "1", "", 0)); newASource.addTransition (new DFSATransition<String, Integer>("", newASource, aDest, newAnswer.toString(), "", newCost)); DFSAState<String, Integer> aDest = new DFSAState<String, Integer>(nodeId.intValue(), answerLattice, 0.0); stateLinks.put(tSource,aDest); newASource.addTransition(new DFSATransition<String, Integer>("", newASource, aDest, newAnswer.toString(), "", newCost));
tSource.addTransition (new DFSATransition<>("", tSource, new DFSAState<>(-1, null), "1", "", 0)); newASource.addTransition (new DFSATransition<>("", newASource, aDest, newAnswer.toString(), "", newCost)); DFSAState<String, Integer> aDest = new DFSAState<>(nodeId.intValue(), answerLattice, 0.0); stateLinks.put(tSource,aDest); newASource.addTransition(new DFSATransition<>("", newASource, aDest, newAnswer.toString(), "", newCost));
startState.addTransition(tr); } else { int sharedProduct = product / tagNum[pos + rightWindow]; DFSATransition<String, Integer> tr = new DFSATransition<>("", sourceState, destState, classIndex.get(curTag), "", -windowScore[pos][product]); graphStates[pos-leftWindow][predTag].addTransition(tr);
startState.addTransition(tr); } else { int sharedProduct = product / tagNum[pos + rightWindow]; DFSATransition<String, Integer> tr = new DFSATransition<String, Integer>("",sourceState,destState,classIndex.get(curTag),"",-windowScore[pos][product]); graphStates[pos-leftWindow][predTag].addTransition(tr);
startState.addTransition(tr); } else { int sharedProduct = product / tagNum[pos + rightWindow]; DFSATransition<String, Integer> tr = new DFSATransition<String, Integer>("",sourceState,destState,classIndex.get(curTag),"",-windowScore[pos][product]); graphStates[pos-leftWindow][predTag].addTransition(tr);