2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2011 Pierre Ratinaud
8 def make_word_stat(corpus, listin) :
14 for word in corpus.lems[lem] :
15 print word, 'nb d\'uce avec:', len(corpus.formes[word][1]), 'eff tot:',sum([corpus.formes[word][1][val] for val in corpus.formes[word][1]])
16 uces = [val for val in corpus.formes[word][1]]
17 print word, len(uces), 'uces'
18 print word, len(list(set([val[0] for val in uces]))), 'ucis'
20 huces.append(set(guces))
21 print 'lem', lem, len(set(guces)), 'uces'
22 print 'lem', lem, len(set([val[0] for val in set(guces)])), 'ucis'
23 inter = set(huces[0]).intersection(huces[1])#.intersection(huces[2])
24 print 'intersection:', len(list(set(inter))), 'uces'
25 inter2 = set([val[0] for val in huces[0]]).intersection([val[0] for val in huces[1]])#.intersection([val[0] for val in huces[2]])
26 print 'intersection:', len(list(set(inter2))), 'ucis'