Sha256: c6643f58b2f582df3e05cd60c2efc7f9a4c520501126c5341370070c9666378c
Contents?: true
Size: 413 Bytes
Versions: 23
Compression:
Stored size: 413 Bytes
Contents
# print_annotation: print all annotations in the given file require 'simple_bioc' if ARGF.argv.size < 1 puts "usage: ruby print_annotation.rb {filepath}" exit end collection = SimpleBioC::from_xml(ARGF.argv[0]) collection.documents.each do |d| d.passages.each do |p| p.sentences.each do |s| s.annotations.each{|a| puts "#{d} #{a}"} end p.annotations.each{|a| puts "#{d} #{a}"} end end
Version data entries
23 entries across 23 versions & 1 rubygems