diff options
| author | hallgren <hallgren@chalmers.se> | 2015-04-09 10:18:41 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-04-09 10:18:41 +0000 |
| commit | 71de9a26ef5489ab98c85f5e584acdf99d1f4e3c (patch) | |
| tree | 6c857f66bb31f576415cc2c436f5b9716b3d244b /src/www/js/wc.js | |
| parent | d24953846904166898b92f994964f8e898cfe6aa (diff) | |
Wide coverage translation demo: show an informative error message for sentences that exceed the length limit
Diffstat (limited to 'src/www/js/wc.js')
| -rw-r--r-- | src/www/js/wc.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/www/js/wc.js b/src/www/js/wc.js index 31fc9a950..612f52276 100644 --- a/src/www/js/wc.js +++ b/src/www/js/wc.js @@ -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) } } |
