Created
April 9, 2016 12:44
-
-
Save YuheiNakasaka/0e3e8994aac28be81b72e4f605adb5f0 to your computer and use it in GitHub Desktop.
ボスニア・ヘルツェゴビナとおなじリズムの言葉を作成するスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# gem install romaji | |
require 'romaji' | |
boin = ['o','u','i','a','e','u','e','o','i','a'] | |
shiin_alphabet = ('a'..'z').to_a - ['a','i','u','e','o','q','c'] # q, cは母音と相性悪い | |
result = [] | |
boin.each do |w| | |
shiin = shiin_alphabet.to_a.sample | |
result << shiin + w | |
end | |
romaji = result.join | |
p romaji | |
p Romaji.romaji2kana(romaji) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment