From 50fcce8314c07dc13d65da47c8fc6fdd16491495 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 30 Oct 2015 18:50:51 +0100 Subject: better OOV handling --- server.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server.rb') 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 -- cgit v1.2.3