X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=corpus.py;h=3ced4824a7e546fc14ebd4472d10e5b0e50b40e4;hp=011206fcc5553f7c6150e410917c0d475ce5c910;hb=5249c446f605b92824c1b12fe390563450d90f3f;hpb=83802e662acde01994fe0bd2bf6978fef90b14f8 diff --git a/corpus.py b/corpus.py index 011206f..3ced482 100644 --- a/corpus.py +++ b/corpus.py @@ -539,6 +539,14 @@ class Corpus : ident += 1 f.write('\n'.join([self.ucis[self.iduces[uce[0]].uci].paras[ident].encode(self.parametres['syscoding']), uce[1].encode(self.parametres['syscoding'])]) + '\n') + def export_meta_table(self, outf) : + metas = [[`i`] + text.etoiles[1:] for i, text in enumerate(self.ucis)] + longueur_max = max([len(val) for val in metas]) + first = ['column_%i' % i for i in range(longueur_max)] + metas.insert(0, first) + with open(outf, 'w') as f : + f.write('\n'.join(['\t'.join(line) for line in metas]).encode(self.parametres['syscoding'])) + def export_corpus_classes(self, outf, alc = True, lem = False, uci = False) : ucecl = {} for i, lc in enumerate(self.lc) : @@ -1597,6 +1605,8 @@ class Builder : filein = parametres['dictionary'] else : filein = None + if dial.corpusname.GetValue() != '' : + parametres['corpus_name'] = dial.corpusname.GetValue() dial.Destroy() ReadLexique(self.parent, lang = parametres['lang'], filein = filein) if parametres['lang'] != 'other' and os.path.exists(self.parent.DictPath.get(parametres['lang']+'_exp', 'french_exp')):