generated katakana templates, refined comparison algo