No commit activity in last 3 years
No release in over 3 years
A tool that queries dbpedia.org's lookup tool to find concepts, and then bundles the results into either ruby objects (using Hashie) or json.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.2.0
>= 0
~> 2.2
 Project Readme

DbpediaConceptSearch

A tool that queries dbpedia.org's lookup tool to find concepts, and then bundles the results into either ruby objects (using Hashie) or json.

Installation

gem install 'dbpedia_concept_search'

or if using bundler, add this to your Gemfile:

gem 'dbpedia_concept_search'

Usage

The initial search is defined by creating a new DbpediaConceptSearch:

require 'dbpedia_concept_search'

search = DbpediaConceptSearch.new('place', 'London')

This will lead to a query matching this

Results

The results method will return an array of objects. See lib/example.rb

JSON

Use search.to_json to return a JSON representation of the data.

Background service

DbpediaConceptSearch relies on the dbpedia lookup service. To test this service, check that the flowing URL returns XML describing Berlin concepts:

http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryClass=place&QueryString=berlin

If you get a failure, I've found the best solution is to post the error to dbpedia-discussion@lists.sourceforge.net.