Wide Coverage Demo App: use PGF service lexing/unlexing

It is now enough to make one server call per translation, and the results can
cached by the browser.
This commit is contained in:
hallgren
2014-04-09 19:49:45 +00:00
parent 43e61a1e3b
commit 17cf501d4c
3 changed files with 15 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ gftranslate.translate=function(source,from,to,start,limit,cont) {
function extract(result) { cont(result[0].translations) }
if(encsrc.length<500)
gftranslate.call("?command=c-translate&input="+encsrc
+"&lexer=text&from="+g+from+"&to="+g+to
+"&lexer=text&unlexer=text&from="+g+from+"&to="+g+to
+"&start="+start+"&limit="+limit,extract)
else cont([{error:"sentence too long"}])
}