Storing dataset from Condtional FreqDist
Jose
josemlv83 at gmail.com
Mon Jan 19 05:16:51 EST 2015
Hello i have trying to store information in arff file but i has been really. Any ideas of how can i do that?
with open('fileids3.txt', 'r') as f:
genres=[word.strip() for word in f.next().split(',')]
with open('adjectifs2.txt', 'r') as g:
adj = [word.strip() for word in g.next().split(',')]
freq = nltk.ConditionalFreqDist(
(genre, m)
for genre in brown.fileids()
for m in brown.words(fileids=genre))
freq.tabulate(conditions=genres, samples=adj)
More information about the Python-list
mailing list