1
0
forked from GitHub/gf-core

Wide coverage translation demo: show an informative error message for sentences that exceed the length limit

This commit is contained in:
hallgren
2015-04-09 10:18:41 +00:00
parent e2e943eabc
commit 29712a43ac
2 changed files with 14 additions and 5 deletions

View File

@@ -197,6 +197,8 @@ wc.translate=function() {
var r=tra[0]
r.prob = -1
if(r.linearizations) showit(r,gftranslate.grammar)
else if(r.error!=undefined)
show_error(r.error)
}
else if(so.rs.length==0)
show_error("Unable to translate")
@@ -210,7 +212,7 @@ wc.translate=function() {
var r=tra[0]
if(r.error!=undefined) {
if(i==0 && so.rs.length==0) {
//show_error(tra[0].error)
//show_error(r.error)
word_for_word(text)
}
}