def writeModel(states, transitions, outputFile):
    """Writes out a file for TransducerCompiler.py to read.
    """
    def fn(stateName):
        return stateName.replace('/', '')
    outputFile = open(outputFile, 'w')
    outputFile.write("\n# States: %s Transitions: %s \n" % (len(states), len(transitions)))
    for state in states.keys():
        outputFile.write("S %s = %s\n" % (fn(state), states[state]))
    for fS, tS in transitions.keys():
        outputFile.write("T %s --> %s = %s\n" % (fn(fS), fn(tS), " * ".join(transitions[(fS, tS)])))
    outputFile.close()