Re: [QUESTION] Solvent - Using a custom ontology

From: David Huynh <dfhuynh_at_csail.mit.edu>
Date: Mon, 09 Jan 2006 09:37:53 -0500

Daniel S. Haischt wrote:

> Hello David,
>
> thanx for you quick reply.
>
> David Huynh wrote:
>
> > In any case, no, you do not have to import ontologies into Piggy
> > Bank (even though you can do that just by browsing Firefox+Piggy
> > Bank to those ontologies and "collect" them). As for Solvent, there
> > is no feature to import ontologies. Your scraper script can just
> > use the ontologies you need (by adding RDF statements having URIs
> > specified by those ontologies).
> >
>
> In this latter case, where I want the scraper script to use an
> existing OWL ontology, do I have to write the scraper by hand as
> shown at...
>
> -> http://simile.mit.edu/piggy-bank/screen-scrapers-howto.html
>
> ... ?

No, you can still use Solvent. Let's say that you have an ontology for
reviewing books and it defines a class <http://foo.com/myOntology#Book>
and a property <http://foo.com/myOntology#review-text>. Then you can
just modify the Javascript code generated by Solvent and include
statements such as these:

var prefixMyOntology = "http://foo.com/myOntology#";
...
model.addStatement(
  itemURI,
  prefixRDF + "type",
  prefixMyOntology + "Book",
  false
);
...
model.addStatement(
  itemURI,
  prefixMyOntology + "review-text",
  reviewTextScrapedFromWebPage,
  true
);

Whatever you can do by writing the scraper by hand is the same as
whatever you can do in Solvent, and vice versa. The only difference is
that Solvent makes it easier to get the right XPaths and to debug your
script.

David
Received on Mon Jan 09 2006 - 14:35:34 EST

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT