summaryrefslogtreecommitdiff
path: root/src/www/js/wc.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-04-11 15:00:15 +0000
committerhallgren <hallgren@chalmers.se>2014-04-11 15:00:15 +0000
commit6601a3972e54b6dd36877355fb21c82d3fbcbd91 (patch)
tree3b37de539d8d911dbe3639d03f7bbc96b0cbee37 /src/www/js/wc.js
parentaca589d87272706f9405f4a771c52fbcf574491a (diff)
Simple Translator: use colors to indicate translation quality
Diffstat (limited to 'src/www/js/wc.js')
-rw-r--r--src/www/js/wc.js18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/www/js/wc.js b/src/www/js/wc.js
index 14593d1b5..af60475be 100644
--- a/src/www/js/wc.js
+++ b/src/www/js/wc.js
@@ -1,5 +1,5 @@
var wc={}
-//wc.cnl="Phrasebook" // try this controlled natural language first
+wc.cnl="Phrasebook" // try this controlled natural language first
wc.f=document.forms[0]
wc.o=element("output")
wc.e=element("extra")
@@ -59,22 +59,6 @@ wc.translate=function() {
return s.split(/([.!?]+[ \t\n]+|\n\n+|[ \t\n]*[-•*+#]+[ \t\n]+)/)
}
- function trans_quality(r) {
- var text=r.linearizations[0].text
- if(r.prob==0) return {quality:"high_quality",text:text}
- else {
- var quality="default_quality"
- switch(text[0]) {
- case '+': text=text.substr(1); quality="high_quality"; break;
- case '*': text=text.substr(1); quality="low_quality"; break;
- default:
- if(r.tree[0]=="?") quality="low_quality"
- }
- text=text.trimLeft()
- return {quality:quality,text:text}
- }
- }
-
function translate_segment(si) { // si = segment index
var rs=[] // list of alternative translations for this segment
var current_pick=0 // index of currently selected alternative