def perform_on_POS(type, arr, pre_stem_suff)
if (arr.empty?)
return nil
end
temp_POS = []
arr.each do |pos|
array = pos.split("/");
j=1
if(type==1)
sb = ""
elsif(type==2)
sb = array[0] + "\t"
else
sb = LatinArabicTranslator.translate(array[0]) + "\t"
sb.force_encoding "UTF-8"
end
while( j < array.length)
if (j > 1)
sb+=" / "
end
sb+=array[j]
j+=1
end
temp_POS.push(sb)
end
if(pre_stem_suff==2)
if ((temp_POS.length > 1) and @debug)
puts "More than one stem for " + temp_POS.to_s
end
if (type ==1 and temp_POS[0].empty?)
puts "Empty POS for stem " + get_stem_long_POS()
end
return temp_POS[0]
else
return temp_POS
end
end