def define type_name,left,right,cost
      type=@char_types.named type_name
      (@templates[type_name]||=[]).push Word.new '',left,right,cost
    end
def define type_name,left,right,cost
      type=@char_types.named type_name
      (@templates[type_name]||=[]).push Word.new '',left,right,cost
    end
String -> Feature -> Feature -> Integer ->