Sha256: 3f3c5f957f994de16f86f78db673ea12e4387bae3a27f0469a710b4b1d87cc23

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'
gem 'dimus-biodiversity'

$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
require 'biodiversity'

if ARGV.empty?
  puts "Usage:\n\nnnparse file_with_scientific_names\n\n"
  exit
end


parser = ScientificNameParser.new
debug = true
# parse a file with names
count = count2 = 0
IO.foreach(ARGV[-1]) do |n|
  puts 'started' if count2 == 0 && debug
  count2 += 1
  puts count2.to_s + "/" + count.to_s if count2 % 10000 == 0 && debug
  n.strip!
  unless parser.parse n
    puts n
    count += 1
  end    
end
puts count.to_s

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dimus-biodiversity-0.0.3 bin/nnparse