Finding RDF instance data with Swoogle

April 24th, 2005

Someone on the yahoo semanticWeb mailing list asked for “a populated ontology for countries”. I thought “Ha! This is just what Swoogle is designed for — finding RDF documents”. It turned out to not be as easy as I expected, prompting us to add a new feature. You can now use Swoogle to find RDF documents instantiating a given class or property. The results will be ranked them by the number of instances.

So, here are a two ways to find populated country ontologies. The first approach is to search for ontologies that appear to be about counties, select one, and then find documents that use it as a namespace. The second focuses on finding classes that represent countries, select one, and find documents that instantiate it.

Searching for country ontologies. Start by finding ontologies that seem to be about counties to find one that looks promising. This query asks Swoogle for ontologies (i.e., RDF documents that mostly *define* classes and properties) with RDF terms whose local names contain the lexemes ‘country’ and ‘capital’ and ‘population’. The results are ranked by Swoogle’s ontology ranking algorithm that takes into account how much each is used, so working down the list is a good strategy.

Let’s suppose we like the first one, which is based on the CIA factbook . Looking at the document view you can see a bit more about it. By entering a Swoogle namespace search, you can find all 28 documents using it as a namespace. Scanning the result summaries, you can see how many instances each defines and investigate the promising ones.

Note to self: we should add a “document’s using this namespace” link to both the document view and the document result summary

Searching for country classes. Another approach is to search by terms (i.e., classes or properties). This query asks for all classes that contain the lexeme ‘country’, ranking the results by the number of instances. Select one of the results that looks interesting, say the first. Click on the definition link to bring up a page about that term. At the top of this page there is a link ‘Documents populating this term as a class’ that, when followed, leads to a page listing documents ranked by instances of this term.