summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-10-30 18:50:51 +0100
committerPatrick Simianer <p@simianer.de>2015-10-30 18:50:51 +0100
commit50fcce8314c07dc13d65da47c8fc6fdd16491495 (patch)
treea0089ef1def7f91f03dcadf831ed531856b561bb /server.rb
parenta2f47cce2000cb491b7d7e0a2f1513c176e7f48c (diff)
better OOV handling
Diffstat (limited to 'server.rb')
-rwxr-xr-xserver.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/server.rb b/server.rb
index 0b39c1d..81816cd 100755
--- a/server.rb
+++ b/server.rb
@@ -271,6 +271,11 @@ get '/next' do # (receive post-edit, update models), send next translation
obj = Hash.new
obj["oovs"] = oovs
obj["progress"] = $db['progress']
+ raw_source_annot = "#{raw_source}"
+ oovs.each { |o|
+ raw_source_annot.gsub! "#{o}", "***#{o}###"
+ }
+ obj["raw_source"] = raw_source_annot
$last_reply = obj.to_json
logmsg :server, "OOV reply: '#{$last_reply}'"
$lock = false