Created
March 4, 2016 08:13
-
-
Save eiel/bdb3d6ff7af2428c6c01 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'linkeddata' | |
require 'csv' | |
graph = RDF::Graph.load("http://hiroshimarb.github.io/") | |
query = RDF::Query.new({ | |
person: { | |
RDF.type => RDF::Vocab::SCHEMA.Person, | |
RDF::Vocab::SCHEMA.name => :name, | |
RDF::Vocab::SCHEMA.description => :desc, | |
} | |
}) | |
puts %W[なまえ 自己紹介].to_csv | |
query.execute(graph).map do |person| | |
puts [person.name, person.desc].to_csv | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment