lib/opener/stanza/tokenizer_pos.rb in opener-chained-daemon-3.1.5 vs lib/opener/stanza/tokenizer_pos.rb in opener-chained-daemon-3.2.0
- old
+ new
@@ -52,15 +52,12 @@
w_index = 0
miscs = {}
tokens.each_with_index do |t, i|
- miscs[i] ||= {}
+ miscs[i] = {}
t.each do |word|
- word['id'].is_a?(Array) && word['id'].each do |id|
- puts id
- miscs[i][id] = word['misc']
- end
+ word['id'].is_a?(Array) && word['id'].each { |id| miscs[i][id] = word['misc'] }
end
end
tokens.map{ |t| t.reverse! } if RTL_LANGUAGES.include? kaf.language
tokens.each_with_index do |sentence, s_index|