0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

キリル文字をローマ字に変えるパーサが存在しなかったので作ってみた。

Posted at

目的

ローマ字からキリル文字変換器はWeb上に存在したがその逆のキリル文字をローマ字に変えるパーサが存在しなかったので作ってみた。

russian.py
murnes_pursey_rossita={
    "А":"a",
    "а":"a",
    "Б":"b",
    "б":"b",
    "В":"v",
    "в":"v",
    "Г":"g",
    "г":"g",
    "Д":"d",
    "д":"d",
    "Е":"e",
    "е":"e",
    "Ж":"zh",
    "ж":"zh",
    "З":"z",
    "з":"z",
    "И":"i",
    "и":"i",
    "Й":"y",
    "й":"y",
    "К":"k",
    "к":"k",
    "Л":"l",
    "л":"l",
    "М":"m",
    "м":"m",
    "Н":"n",
    "н":"n",
    "О":"o",
    "о":"o",
    "П":"p",
    "п":"p",
    "Р":"r",
    "р":"r",
    "С":"s",
    "с":"s",
    "Т":"t",
    "т":"t",
    "У":"u",
    "у":"u",
    "Ф":"f",
    "ф":"f",
    "Х":"kh",
    "х":"kh",
    "Ц":"ts",
    "ц":"ts",
    "Ч":"ch",
    "ч":"ch",
    "Ш":"sh",
    "ш":"sh",
    "Щ":"shch",
    "щ":"shch",
    "Ь":"",
    "ь":"",
    "Ю":"yu",
    "ю":"yu",
    "Я":"ya",
    "я":"ya"
}

def info_rossita():
    puts=input("ロシア語入力>>")
    for k in murnes_pursey_rossita:
        puts=puts.replace(k,murnes_pursey_rossita[k])
    print(puts)

while(True):
    info_rossita()
    if(input("quitでキリル→ローマ終了")=="quit"):
        break

結果

変換ができてるみたい。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?