'write the binary features to input file and update the transition dictionary'

def _write_to_file(self, key, binary_features, input_file):

    self._transition.setdefault(key, (len(self._transition) + 1))
    self._match_transition[self._transition[key]] = key
    input_str = (((str(self._transition[key]) + '    ') + binary_features) + '\n')
    input_file.write(input_str.encode('utf-8'))
