Skip to content

Instantly share code, notes, and snippets.

View ikegami-yukino's full-sized avatar

IKEGAMI Yukino ikegami-yukino

View GitHub Profile
@phelrine
phelrine / hirakana.sh
Created August 30, 2011 18:01
漢字ひらがな変換
#!/bin/sh
mecab --node-format="%f[7] " | nkf -w --hiragana | sed 's/EOS//g'
@tily
tily / detect_rhyme.rb
Created July 31, 2011 13:36
日本語テキストから脚韻を抽出する (母音版)
#!/usr/bin/env ruby
# Usage: ruby detect_rhyme.rb /path/to/file.txt num
# Example: ruby detect_rhyme.rb 坊ちゃん.txt 3
require 'MeCab'
def main(args)
path, num = args[0], args[1].to_i
rhyme = {}
File.open(path).each do |line|
node_list = get_node_list(line)