def main(): authorkey,combinedkey,readerkey = data.trainingKeys() i = 0 for path,f,doc in data.walkTrainDataDoc(): print doc print i i += 1
def answerhist(): trainingkeylist = map(lambda (x,y,key): key, data.trainingKeys()) hist = [] for key in trainingkeylist: for docname,answers in key.items(): for a in answers: hist.append(filter(lambda x: ord(x) < 128, a)) return hist
def assembleAllPages(): """ Assembles all training documents as marked-up HTML """ authorkey,combinedkey,readerkey = data.trainingKeys() keydict = {'authorkey': authorkey, 'combinedkey': combinedkey, 'readerkey': readerkey} for path,f,doc in data.walkTrainDataDoc(): page = assemblePage(path, f, doc, keydict)