lib/sastrawi/stemmer/stemmer.rb in sastrawi-0.1.3 vs lib/sastrawi/stemmer/stemmer.rb in sastrawi-0.1.4
- old
+ new
@@ -68,17 +68,17 @@
suffixes = %w[ku mu nya lah kah tah pun]
second_match = /^(.*)-(.*)$/.match(words[0])
if suffixes.include?(suffix) && second_match
words[0] = second_match[1]
- words[1] = second_match[2] << '-' << suffix
+ words[1] = "#{second_match[2]}-#{suffix}"
end
root_first_word = stem_singular_word(words[0])
root_second_word = stem_singular_word(words[1])
if !@dictionary.contains?(words[1]) && root_second_word == words[1]
- root_second_word = stem_singular_word('me' << words[1])
+ root_second_word = stem_singular_word("me#{words[1]}")
end
if root_first_word == root_second_word
root_first_word
else