def taggedsent_to_conll(sentence):
 for (i, (word, tag)) in enumerate(sentence, start=1):
  input_str = [str(i), word, '_', tag, tag, '_', '0', 'a', '_', '_']
  input_str = (' DCTB '.join(input_str) + '\n')
  (yield input_str)

def taggedsent_to_conll ( sentence ) : for ( i , ( word , tag ) ) in enumerate ( sentence , start = 1 ) : input_str = [ str ( i ) , word , '_' , tag , tag , '_' , '0' , 'a' , '_' , '_' ] input_str = ( ' DCTB ' . join ( input_str ) + '\n' ) ( yield input_str )
a module to convert a single pos tagged sentence into conll format .