]>
gitweb.pimeys.fr Git - bots/hung.git/blob - convert_dico.py
7 f
=open("dico_for_python.txt")
11 l
=re
.findall('"(.*)","(.*)"',t
)
14 texte
=unicode(texte
,"utf8").lower()
43 for avant
,apres
in remplacements
.items():
44 texte
=texte
.replace(avant
,apres
)
47 l
=[[maju(i
[0]),i
[0]+" : "+i
[1].replace("\\n","; ")] for i
in l
48 if len(i
[0])>=8 and not " " in i
[0]]
50 f1
=open("mots.txt.out","w")
51 f2
=open("definitions.txt.out","w")
52 f1
.writelines([(i
[0]+"\n").encode("utf8") for i
in l
])
53 f2
.writelines([i
[1]+"\n" for i
in l
])