Où trouver des dictionnaires ou listes de mots SVP ?
11 réponses
Eric Grambier
Bonjour,
Où puis-je trouver (en gratuit ou payant si pas trop cher) des
dictionnaires de mots (liste de mots avec leurs pluriels et verbes sous
leurs formes conjuguées...) pour par exemple trouver des anagrammes ou
autres jeux de lettres ?
Et voilà par exemple un programme pour générer des anagrammes ; Francois
fichiermots=open('mots_francais.txt','r') #fichier initial dest=open('dicosort.txt','w') #fichier retraité DICO={'-':'','ä':'a','é':'e','è':'e','ê':'e','ë':'e','à':'a','â':'a','ç':'c','î':'i','ï':'i','ü':'u','ù':'u','û':'u','ö':'o','ô':'o'} Le while L<123: DICO[chr(L)]=chr(L) L=L+1 while 1: motliste=[] motrie2='' x=0 a=fichiermots.readline() if len(a)==0: #tester si EOF break else: for car in a[:len(a)-1]: s=DICO[car] #remplacement accentuation par normal motliste.append(s) #constitution du mot motliste.sort() for let in motliste: motrie2=motrie2+motliste[x].lower() x=x+1 ecrirefich = ""%s";"%s"n" % (a[:len(a)-1],motrie2) print ecrirefich dest.write(ecrirefich)
fichiermots.close() dest.close()
-- Francois A. _________
Excellent newsreader : http://mesnews.no-ip.com
Et voilà par exemple un programme pour générer des anagrammes ;
Francois
fichiermots=open('mots_francais.txt','r') #fichier initial
dest=open('dicosort.txt','w') #fichier retraité
DICO={'-':'','ä':'a','é':'e','è':'e','ê':'e','ë':'e','à':'a','â':'a','ç':'c','î':'i','ï':'i','ü':'u','ù':'u','û':'u','ö':'o','ô':'o'}
Le
while L<123:
DICO[chr(L)]=chr(L)
L=L+1
while 1:
motliste=[]
motrie2=''
x=0
a=fichiermots.readline()
if len(a)==0: #tester si EOF
break
else:
for car in a[:len(a)-1]:
s=DICO[car] #remplacement accentuation par
normal
motliste.append(s) #constitution du mot
motliste.sort()
for let in motliste:
motrie2=motrie2+motliste[x].lower()
x=x+1
ecrirefich = ""%s";"%s"n" % (a[:len(a)-1],motrie2)
print ecrirefich
dest.write(ecrirefich)
Et voilà par exemple un programme pour générer des anagrammes ; Francois
fichiermots=open('mots_francais.txt','r') #fichier initial dest=open('dicosort.txt','w') #fichier retraité DICO={'-':'','ä':'a','é':'e','è':'e','ê':'e','ë':'e','à':'a','â':'a','ç':'c','î':'i','ï':'i','ü':'u','ù':'u','û':'u','ö':'o','ô':'o'} Le while L<123: DICO[chr(L)]=chr(L) L=L+1 while 1: motliste=[] motrie2='' x=0 a=fichiermots.readline() if len(a)==0: #tester si EOF break else: for car in a[:len(a)-1]: s=DICO[car] #remplacement accentuation par normal motliste.append(s) #constitution du mot motliste.sort() for let in motliste: motrie2=motrie2+motliste[x].lower() x=x+1 ecrirefich = ""%s";"%s"n" % (a[:len(a)-1],motrie2) print ecrirefich dest.write(ecrirefich)