commited all contents created by participants

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-21 18:12:40 +01:00
parent cefd1c2ad0
commit b936b1e616
2137 changed files with 1076319 additions and 730 deletions
@@ -0,0 +1,31 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
diff_words = []
#Créez un dictionnaire
permutations = {
'ph' : 'f' ,
'qu' : 'kh' ,
'y' : 'i' ,
't' : 'th' ,
'ê' : 'ai' ,
'ss' : 'ç' ,
}
#Ouvrir un texte comme matériau brut
#Le séparer en lignes
#le séparer en mots
with open("diff.txt", "r", encoding="ISO-8859-1") as source:
for line in source:
words = line.split(" ")
for word in words:
for key, value in permutations.items():
if key in word:
word = word.replace(key, value)
diff_words.append(word)
with open("diff_permute.txt", "w") as destination:
destination.write(' '.join(diff_words))