Questions about class hierarchies and nomenclature

2 views
Skip to first unread message

W.P. McNeill

unread,
Jul 15, 2009, 6:23:42 PM7/15/09
to eltk
The way Reader objects (e.g. TermsetReader) are structured now, they
take some non-RDF input data add convert it to an RDF graph which is
stored in a member called Ontology.

Instead of Reader classes, could we just subclass Ontology with
different constructors that know how to read in different kinds of
data? This seems preferable because the Reader classes don't return
Ontology objects but rather contain them.

Likewise, it seems like Ontology could just be a subclass of
rdflib.Graph instead of containing a single Graph member.

I'm also confused about nomenclature of the ELTK objects. Is an
Ontology object basically a single RDF graph instance? If so, the
name "ontology" seems too specific because a word list, for example,
isn't really an "ontology". (You'd want to call it ELTKGraph or
something.)

scott farrar

unread,
Jul 16, 2009, 1:02:42 AM7/16/09
to el...@googlegroups.com
Hi Bill

I think what you're saying about the readers makes sense. I toyed w. both approaches when I first starting creating readers, that is:

-one reader per file type (as it is now)

vs.

-a single reader and various constructors per file type (what you're suggesting)


Instead of Reader classes, could we just subclass Ontology with
different constructors that know how to read in different kinds of
data?  This seems preferable because the Reader classes don't return
Ontology objects but rather contain them.

So, if you want to start this w. your lexicon reader, that's fine w. me. It shouldn't be too much trouble for me to then refactor the other readers if that design looks good.

 

Likewise, it seems like Ontology could just be a subclass of
rdflib.Graph instead of containing a single Graph member.

Hmm, this may be problematic, see my comments below, but your point about confusing terminology is well taken:
 

I'm also confused about nomenclature of the ELTK objects.  Is an
Ontology object basically a single RDF graph instance?  If so, the
name "ontology" seems too specific because a word list, for example,
isn't really an "ontology".  (You'd want to call it ELTKGraph or
something

I'm basically following the lead of a couple of other Semantic Web projects. OWLAPI and Jena, the two Java libs for the Semantic Web, both do it this way, plus the Seth project, where I got the idea of metaclasses. That is, they all have some sort of  oop class called 'ontology'.

Some explanation in terms of what a "model" is:

-think of "model" in terms of the MVC paradigm

-the RDF graph is the logical underpinning--in fact the base layer for the "model", as it provides the abstraction to state arbitrary predications. So, we have rdflib.graph.Graph as the Py class for this.

-the ontology notion ---notice I'm not referring to any specific class here-- is actually separate from the  graph idea. It's another kind of "model", or as I like to think about it, it's another layer, the semantic or "ontological" layer.  Furthermore, I think the layers should be separate, ie we can have the eltk.ontology.Ontology class as separate from the RDF "model".

So, I'd like to keep the eltk.ontology.Ontology as a separate layer, that is, not subclass rdflib.graph.Graph.

BUT, we're not really building an ontology per se, each time we read a file. We're just creating instances at the "ontology" layer.  In the OWL/description logic world, there is a separation of 1) classes and relations from 2) class instances and statements. The former is called the TBox, and the latter is called the Abox. So, we're populating an ABox each time we read a file. Let me scratch my head about this, b/c I agree w. you that the nomenclature is confusing.

Scott





 
.)




Reply all
Reply to author
Forward
0 new messages