From: Pierre Date: Wed, 20 Mar 2013 13:23:46 +0000 (+0100) Subject: ... X-Git-Url: http://iramuteq.org/git?a=commitdiff_plain;h=b1e7a76f583a5715d025a9b896508969efa06c24;p=iramuteq ... --- diff --git a/corpus.py b/corpus.py index 0635f2a..cc3f2dc 100644 --- a/corpus.py +++ b/corpus.py @@ -510,6 +510,17 @@ class Corpus : table_uce[uces[uce]][i] = 1 table_uce.insert(0, list_act) return table_uce + + def make_pondtable_with_classe(self, uces, list_act) : + table_uce = [[0 for val in list_act] for line in range(0,len(uces))] + uces = dict([[uce, i] for i, uce in enumerate(uces)]) + for i, lem in enumerate(list_act) : + uceseff = self.getlemuceseff(lem) + lemuces = list(set(uceseff.keys()).intersection(uces)) + for uce in lemuces : + table_uce[uces[uce]][i] = uceseff[uce] + table_uce.insert(0, list_act) + return table_uce def parse_active(self, gramact, gramsup = None) : log.info('parse actives')