Sha256: 93f0d0d303de6cc14162a91f82d71bca161534f13669d237671d10ebcd19848e

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

= sameasdotorg_fu

Allows querying of the http://sameas.org site using ruby

== Sample Usage

Querying a URI/resource

  #!/usr/bin/ruby

  require 'rubygems'
  require 'sameasdotorg_fu'

  sameas = Sameas.new()
  results = sameas.find_by_uri('http://dbpedia.org/resource/Otley')

  puts "For #{results.uri} :"
  pp results.duplicates

Outputs:

  For http://dbpedia.org/resource/Otley :
  ["http://dbpedia.org/resource/Otley",
   "http://mpii.de/yago/resource/Otley",
   "http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000011e4f9",
   "http://sws.geonames.org/2640857/",
   "http://umbel.org/umbel/ne/wikipedia/Otley"]

Querying a term

  #!/usr/bin/ruby

  require 'rubygems'
  require 'sameasdotorg_fu'

  sameas = Sameas.new()
  results = sameas.find_by_term('Otley')

  results.each do |result|
    puts "For #{result.label} :"
    pp result.duplicates
  end

Outputs:

  For http://dbpedia.org/resource/Otley :
  ["http://dbpedia.org/resource/Otley",
   "http://mpii.de/yago/resource/Otley",
   "http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000011e4f9",
   "http://sws.geonames.org/2640857/",
   "http://umbel.org/umbel/ne/wikipedia/Otley"]
  For Otley R.U.F.C. :
  ["http://dbpedia.org/resource/Otley_R.U.F.C.",
   "http://mpii.de/yago/resource/Otley_R.U.F.C.",
   "http://rdf.freebase.com/ns/guid.9202a8c04000641f8000000000d0130d",
   "http://umbel.org/umbel/ne/wikipedia/Otley_R.U.F.C."]
  For Otley Run :
  ["http://dbpedia.org/resource/Otley_Run",
   "http://mpii.de/yago/resource/Otley_Run",
   "http://rdf.freebase.com/ns/guid.9202a8c04000641f800000000098bef8"]
  <snip></snip>

For further details see the examples dir

== Copyright

Copyright (c) 2009 Rattle (http://www.rattlecentral.com). See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
monkeyhelper-sameasdotorg_fu-0.0.1 README.rdoc