-
-
Save kureikei/02742b8095445be0bc61 to your computer and use it in GitHub Desktop.
This file contains 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
#! /usr/local/bin/ruby21 | |
require 'csv' | |
F, S = [], [] | |
open("naist-jdic.csv", "r:EUC-JP:UTF-8"){|file| | |
file.each_line {|buf| | |
a = buf.split(",") | |
next if a[13] != "" | |
if a[11].length == 5 then F << a[0] | |
elsif a[11].length == 7 then S << a[0] | |
end | |
} | |
} | |
loop { | |
print "%s %s %s\n" % [F.sample, S.sample, F.sample] | |
sleep 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment