Commit f8f94203e7db209ef1e607db3ad0bdded8fb466e

Authored by Killian
1 parent b65eb4cd11
Exists in soap

Correction du unicode(orkis) qui gérait pas accent et les lem

Showing 2 changed files with 7 additions and 11 deletions Side-by-side Diff

... ... @@ -17,16 +17,12 @@
17 17 def __unicode__(self):
18 18 string = u""
19 19 for word in self.dico:
20   - print(isinstance(string, unicode))
21   - print(isinstance(unicode(word.decode("utf-8")),unicode))
22   - print(word)
23   - print(string)
24   - string += ( unicode(word.decode("utf-8")))
  20 + string += ( unicode(word.decode("utf-8")))+unicode (u";")
25 21 for lemWord in self.dico[word][0]:
26   - string += (unicode(lemWord.decode("utf-8"))) #+ unicode(u" "))
  22 + string += (unicode(lemWord.decode("utf-8"))+ unicode(u" "))
27 23 string +=u";"
28 24 for phonWord in self.dico[word][1]:
29   - string += (unicode(phonWord.decode("utf-8"))) #+ unicode(u" "))
  25 + string += (unicode(phonWord.decode("utf-8"))+ unicode(u" "))
30 26 string+=u"\n"
31 27 return string
32 28 def clean(self):
33 29  
34 30  
... ... @@ -55,13 +51,13 @@
55 51 self.insertLem()
56 52 self.insertPhon()
57 53 table=[]
58   - for i in self.dico:
  54 + for i,v in self.dico.iteritems():
59 55 if not re.match(r"<s>",i):
60 56 list=[]
61 57 list.append(i)
62   - for indice in self.dico[i][0]:
  58 + for indice in v[0]:
63 59 list.append(indice)
64   - for indice in self.dico[i][1]:
  60 + for indice in v[1]:
65 61 list.append(indice)
66 62 ligne= " ".join(list)
67 63  
test/functional/testLiaSoap.py
... ... @@ -3,7 +3,7 @@
3 3 import threading
4 4  
5 5 ### TODO : Tester en parallele x4 un million de fois pour voir ###
6   -url = 'http://lrc2-kija.univ-avignon.fr:8000/?wsdl'
  6 +url = 'http://194.57.216.156:8181/?wsdl'
7 7 client = Client(url)
8 8 filename = "data.txt"
9 9 file = open(filename, "r")