Skip to content

Instantly share code, notes, and snippets.

@kureikei
Created March 1, 2015 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kureikei/02742b8095445be0bc61 to your computer and use it in GitHub Desktop.
Save kureikei/02742b8095445be0bc61 to your computer and use it in GitHub Desktop.
#! /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