}
public void printLattice(DFSA tagLattice, List<CoreLabel> doc, PrintWriter out) {
CoreLabel[] docArray = doc.toArray(new CoreLabel[doc.size()]);
// Create answer lattice:
MutableInteger nodeId = new MutableInteger(0);
DFSA answerLattice = new DFSA(null);
DFSAState aInitState = new DFSAState(nodeId.intValue(),answerLattice);
answerLattice.setInitialState(aInitState);
Map<DFSAState,DFSAState> stateLinks = new HashMap<DFSAState,DFSAState>();
// Convert binary lattice into word lattice:
tagLatticeToAnswerLattice
(tagLattice.initialState(), aInitState, new StringBuilder(""), nodeId, 0, 0.0, stateLinks, answerLattice, docArray);