mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-25 20:42:50 -06:00
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:
@@ -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"}])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user