Commit 9aab1de7383750179acc696485ad651e5c2b4bb2

Authored by Killian
1 parent 6c1479b8b7
Exists in soap

Tentative Soap infructueuse

Showing 2 changed files with 17 additions and 6 deletions Side-by-side Diff

... ... @@ -11,6 +11,18 @@
11 11 def isReady(self):
12 12 self.phoner.isReady()
13 13 self.tagger.isReady()
  14 + def __str__(self):
  15 + string=""
  16 + for word in self.dico:
  17 + string += (word+';')
  18 + for lemWord in self.dico[word][0]:
  19 + string += (lemWord+" ")
  20 + string +=";"
  21 + for phonWord in self.dico[word][1]:
  22 + string += (phonWord+" ")
  23 + string += ';'
  24 + string+='\n'
  25 + return string
14 26 def clean(self):
15 27 stopword=StopWord()
16 28 self.string=stopword.RemoveStopList(self.string)
... ... @@ -2,11 +2,12 @@
2 2 import subprocess
3 3 import os
4 4 import json
  5 +from lxml import etree
5 6 from flask import Flask, request, render_template
6 7 from processor.LiaTools import *
7 8 from processor.Orkis import Orkis
8 9 from flaskext.enterprise import Enterprise
9   -
  10 +from time import ctime
10 11 app = Flask(__name__)
11 12 enterprise = Enterprise(app)
12 13  
... ... @@ -27,11 +28,9 @@
27 28 return unicode(taggedTable)
28 29  
29 30 class OrkisService(enterprise.SOAPService):
30   - @enterprise.soap(enterprise.String,_returns=enterprise._sp.String)
31   - def get_phon(self,string):
32   - orkisProc=Orkis(string)
33   - return orkisProc.getDico()
34   -
  31 + @enterprise.soap(returns=enterprise._sp.String)
  32 + def get_phon(self):
  33 + return ctime()
35 34  
36 35 if __name__ == '__main__':
37 36 app.debug = True