Sha256: baa3ae763b8fed888f6f84acf45dc7ca4c23829b9cfd4747d8cb000392472678

Contents?: true

Size: 713 Bytes

Versions: 38

Compression:

Stored size: 713 Bytes

Contents

#!/usr/bin/env ruby

require "json"

print(<<HEADER.chomp)
column_create item_dictionary gene95_desc COLUMN_SCALAR ShortText
column_create bigram item_dictionary_gene95_desc COLUMN_INDEX|WITH_POSITION item_dictionary gene95_desc
load --table item_dictionary
[
["_key","gene95_desc"]
HEADER

loop do
  raw_key = gets
  break if raw_key.nil?
  raw_body = gets

  key = nil
  body = nil
  begin
    key = raw_key.encode("UTF-8", "Windows-31J").strip
    body = raw_body.encode("UTF-8", "Windows-31J").strip
  rescue EncodingError
    $stderr.puts("Ignore:")
    $stderr.puts("   key: <#{raw_key}>")
    $stderr.puts("  body: <#{raw_body}>")
    next
  end
  puts(",")
  print([key, body].to_json)
end
puts
puts("]")

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
rroonga-9.0.7-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-9.0.7-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-9.0.3-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-9.0.3-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-9.0.2-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-9.0.2-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-7.1.1-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-7.1.1-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-7.0.2-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-7.0.2-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.1.3-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.1.3-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.1.0-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.1.0-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.9-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.9-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.7-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.7-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.5-x64-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb
rroonga-6.0.5-x86-mingw32 vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb