It was immediately shuffled off into the too hard basket; and neglected to read the "its just JSON" bit.
Today, I went back to Freebase and started creating my own ontologies; which is actually pretty neat - the authoring tools, though a little slow, are clearly the exact kind of thing needed to make the Semantic Web a reality.
(As a side note, the importing tools for lists coupled with having slow internet is a horrible experience - I want that bit of my life back please!)
After finishing all of that useful schema authoring, I've been a bit glum: I can't use this outside of Freebase easily - There are no Freebase to OWL tools that exist, so I
decided to write some.
To use it you'll need:
- PHP
- Net_URL
- HTTP_Client
- To read some documentation!
It's a first run, and doesn't deal with errors at all. Later on, I'll actually throw a web frontend to it perhaps.
Using it is pretty easy:
// 1. Show me all of the types (Classes) in the Music domain (Ontology)
$domain = new FreebaseDomain('/music');
print_r($domain->listTypes());
// 2. Show me the details of all types (classes) in doconnor's mortgage industry domain (ontology)
$domain = new FreebaseDomain('/user/doconnor/mortgage_industry');
$types = $domain->listTypes();
foreach ($types as $key) {
$type = new FreebaseType($key);
print $key . ":\n";
print $type->toOWL("http://www.freebase.com") . "\n\n";
}
No comments:
Post a Comment