Commit 910f3a2a authored by Sylvain Coulange's avatar Sylvain Coulange
Browse files

petit ménage

parent d915e640
......@@ -41,7 +41,7 @@ def main(request):
print(result)
phonographieList = []
for r in result:
for r in result:
phonographie = []
for i in r:
ph = Phonograph()
......@@ -50,6 +50,7 @@ def main(request):
phonographie.append(ph)
phonographieList.append(phonographie)
data.pphh.append(phonographieList)
else:
data = Data()
data.text = ''
......
......@@ -121,9 +121,9 @@ def mimi(mot):
# Traitement de l'apostrophe
mot = mot.replace("'",'’')
# Si mot dans dictionnaire... decoupage(mot,transcription)
if re.match(r'\W+|\d+',mot):
if re.match(r'^\W+$|^\d+$',mot):
print("'", mot, "' n'est pas un mot.")
result = [[('phon_neutre',mot)]]
elif mot in word2trans.keys():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment