Getting Wikipedia infoboxes in a format that Ruby can understand

Posted by hadees on Stack Overflow See other posts from Stack Overflow or by hadees
Published on 2010-12-27T23:31:05Z Indexed on 2010/12/31 22:54 UTC
Read the original article Hit count: 322

I am trying to get the data from Wikipedia's infoboxes into a hash or something so that I can use it in my Ruby on Rails program. Specifically I'm interested in the Infobox company and Infobox person. The example I have been using is "Ford Motor Company". I want to get the company info for that and the person info for the people linked to in Ford's company box.

I've tried figuring out how to do this from the Wikipedia API or DBPedia but I haven't had much luck. I know wikipedia can return some things as json which I could parse with ruby but I haven't been able to figure out how to get the infobox. In the case of DBPedia I am kind of lost on how to even query it to get the info for Ford Motor Company.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about mediawiki