Sha256: 67e01f276176183ed8d2ddb8d8113e0fd70ab0c44443ab0e56f620f7db955730

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

#!/usr/bin/env ruby

MAZEGAKI_DIC = Hash.new([])

ARGF.each_line do |line|
  next if /^\p{ascii}/.match?(line)
  x, y = line.split
  key = x.sub(/\A(\p{hiragana}+)[a-z>]\z/, "\\1—")
  values = y.split("/").map { |i|
    i.sub(/;.*/, "")
  }.reject { |i|
    i.empty? || i == key
  }
  MAZEGAKI_DIC[key] |= values
end

MAZEGAKI_DIC.sort_by { |key,|
  key
}.each do |key, values|
  puts "#{key} /#{values.join('/')}/"
end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
textbringer-1.0.9 bin/merge_mazegaki_dic