romajize and unromajize

一つ目のテキストエリアのテキストを romajize エンコードして、二つ目のテキストエリアに表示します。一方で、二つ目のテキストエリアのテキストを romajize デコードして一つ目のテキストエリアに表示します。romajize とは、ひらがなカタカナをローマ字に変換するここでの規則を意味します。

Encodes by romajize the text in the first text area and displays it in the second text area. On the other hand, the text in the second text area is romajize decoded and displayed in the first text area. romajize means the rule here to convert hiragana and katakana to romaji.


Description

I tried to make an algorithm to convert Japanese Hiragana to Romaji. In Japan, there are rules for conversion of Hepburn romanization and instructional romanization, but what I tried here was whether or not reversible conversion could be maintained. For that purpose, the above two rules are not enough. Therefore, it is necessary to give priority to the rules of "kana-kanji conversion" that are common in Japanese computer culture. In addition, we also examined an algorithm for converting Japanese katakana to romaji. Here, we limited the rule making to the extent that it can be expressed by regular expressions without using a Japanese-English dictionary, etc., and obtained certain results, so we will conduct a demonstration test here.

解説

日本語のひらがなをローマ字に変換するアルゴリズムの製作を試みた。日本国にはヘボン式と訓令式のローマ字への変換規則があるが、ここで試みたのは、可逆変換を保てるか否か、である。そのためには、上の二つの規則だけでは不十分である。よって、日本のコンピュータ文化で一般的な「かな漢字変換」の規則なども参考に、それを優先する必要がある。加えて、日本語のカタカナをローマ字に変換するアルゴリズムも同時に検討した。ここでは、和英辞書などは使わずに正規表現で表せる範囲での規則作りに限定し、一定の成果を得たので、ここで実証試験を行う。

参考文献

  1. 東京大学教養学部英語部会/教養教育開発機構, 日本語のローマ字表記の推奨形式, 2009.
  2. 安岡孝一, NかMか, 漢字文化, 第9号, 文部科学省21世紀COEプログラム, 2006.
  3. Wikipedia, ローマ字入力, 閲覧 2021.
  4. ShanaBrian, ひらがなまたはカタカナからローマ字へ変換, 閲覧 2021.
一覧
    Copyright (C) 2021 Taiji Yamada <taiji@aihara.co.jp>