X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;f=functions.py;fp=functions.py;h=add77d8dd25ac6af175e0cc28e16570d525ae9e9;hb=65bc8938914181357892f7c87272e5549da2c0b0;hp=4a9b857e0e55d2e1e12528714903fe8545f0f14b;hpb=7a7401e2d002b071a0b3378228ffe6bf6f3dc2d1;p=iramuteq diff --git a/functions.py b/functions.py index 4a9b857..add77d8 100755 --- a/functions.py +++ b/functions.py @@ -860,7 +860,7 @@ def treat_var_mod(variables) : # var_mod[var].append(variable) return var_mod -def doconcorde(corpus, uces, mots, uci = False) : +def doconcorde(corpus, uces, mots, uci = False, fontsize=16) : if not uci : ucestxt1 = [row for row in corpus.getconcorde(uces)] else : @@ -872,15 +872,17 @@ def doconcorde(corpus, uces, mots, uci = False) : listmot = [corpus.getforme(fid).forme for lem in listmot for fid in lem] mothtml = ['%s' % mot for mot in listmot] dmots = dict(list(zip(listmot, mothtml))) + presfont = '

' % fontsize + font = '' % fontsize for uce in uces : ucetxt = ucestxt1[uce].split() ucetxt = ' '.join([dmots.get(mot, mot) for mot in ucetxt]) if not uci : uciid = corpus.getucefromid(uce).uci - ucis_txt.append('

' + ' '.join(corpus.ucis[corpus.getucefromid(uce).uci].etoiles) + ' *%i_%i

' % (uciid, uce, uciid, uce)) + ucis_txt.append(presfont + ' '.join(corpus.ucis[corpus.getucefromid(uce).uci].etoiles) + ' *%i_%i

' % (uciid, uce, uciid, uce)) else : - ucis_txt.append('

' + ' '.join(corpus.ucis[uce].etoiles) + '

') - ucestxt.append(ucetxt) + ucis_txt.append(presfont + ' '.join(corpus.ucis[uce].etoiles) + '

') + ucestxt.append(font + ucetxt + '') return ucis_txt, ucestxt