Replaces words in a Japanese text using dictionaries