views:

324

answers:

5

Are there libraries or certain "techniques" that you can use to create an ontology of elements?

Or "design patterns"?

I am talking about just a "graph" of things. Suppose I have a bunch of words. Certain words are "under" other words or "related" to other words. I need a good way to group them and know their relationship.

A: 

an ontology is a dictionary that defines URIs and agree on a meaning for each of them. A trivial ontology is just a bunch of URIs you pick more or less out of the blue. This method unfortunately does not give you any information about semantic relationships of your ontological entities. To explain these relationships you normally describe them with an OWL file, and you normally use tools for this. I use Protege. it's quite ok.

Stefano Borini
+4  A: 

http://seth-scripting.sourceforge.net/

Vijay Mathew
ow... this is **fantastic**... a scriptable protege :)))
Stefano Borini
+2  A: 

You can use rdflib (http://www.rdflib.net/) for storing triples. You then have to make your own decisions about the kind of ontology you want to build. Look at the OWL format for that.

I toyed with python and ontologies during my PhD, so perhaps a quick scan through my thesis can give you some ideas. For instance a short OWL summary or a UML model of a plone ontology tool.

Reinout van Rees
I am looking for someone to help me with the definition of a small ontology. would you have time for an opensource project?
Stefano Borini
Sorry, I'm already full with several other projects (and two kids :-) )
Reinout van Rees
+1  A: 

If it makes sense to represent something as a directed graph, why not just use a graph class? Python-graph offers simple pure-python graph representations. NetworkX has a slightly harder to use C implementation.

Salim Fadhley
A: 

RDFLIB is a mature implementation of a triple store, with plenty of documentation.

However, this library worked for me only for smaller projects. For example there is a nice RDF/XML catalog of the Gutenberg Project Library, which i wasn't able to hack around with (on my dual-core, 2GBRAM machine), because it's simply too large (~ 100M) - even Java/Protege had a tendency to stall on this filesizes. It's a pity.

Alternative: http://seth-scripting.sourceforge.net/

The MYYN