Skip to content

Instantly share code, notes, and snippets.

@YuheiNakasaka
Created April 9, 2016 12:44
Show Gist options
  • Save YuheiNakasaka/0e3e8994aac28be81b72e4f605adb5f0 to your computer and use it in GitHub Desktop.
Save YuheiNakasaka/0e3e8994aac28be81b72e4f605adb5f0 to your computer and use it in GitHub Desktop.
ボスニア・ヘルツェゴビナとおなじリズムの言葉を作成するスクリプト
# 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