#! /bin/env python corpus = "man.conll" def make_xml_line(word,tag): outline = '' + word + '' return outline file = open(corpus,'r') line = file.readline() while line: line = line.rstrip() list = line.split() if list: word = list[1] tag = list[4] # print word + '\t' + tag print make_xml_line(word,tag) else: print line = file.readline() file.close()