Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] a newbie question in regard to ontology population

kookaburra shaledova at gmail.com
Wed Aug 12 19:42:02 PDT 2009


Hi,

 I developed an owl ontology. I also developed a program to generate a bunch
of instances in OWL format from an existing data base. Now I want to load
the ontology as well as all those instances together.

What I tried are:

(1) simply added the instance into the created ontology OWl file . Note I
did this in the text file, not in the Protege editor!!

(2) in the generated instance text file, import this ontology by adding
lines like:
 <owl:Ontology rdf:about="">
    <owl:imports rdf:resource="file:///home/people.owl"/>
    </owl:Ontology>

But both of the two methods presented the same problems for me:
after successfully load the integrated ontology (including instances using
the above two methods) into protege 3.4, I found an extra class named
"protege:ExternalResource"  is added in the class structure and some
duplicated individuals(instances) are also added into this class as well.
(there are some occations that the protege will hangs after some navigations
over the individuals)

I know this is related to the format of the instances I generated. But I can
not determine what a proper format for the instances I should generate from
a programe to avoid this problem.

I don't want to create these instance using protege editor and I also want
to get away with using Protege OWl API. I attached the integrated OWL sample
I used  for you to duplicate this problem I have encountered.

Any tips are welcomed and appreciated!!

yy

=========================================================

<?xml version="1.0"?>
<rdf:RDF
    xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#"
    xmlns:swrlb="http://www.w3.org/2003/11/swrlb#"
    xmlns:swrl="http://www.w3.org/2003/11/swrl#"
    xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:tt="
http://proton.semanticweb.org/2005/04/protonu/Ontology1250127716.owl#"
  xml:base="
http://proton.semanticweb.org/2005/04/protonu/Ontology1250127716.owl">
  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:ID="city"/>
  <owl:Class rdf:ID="people"/>
  <owl:Class rdf:ID="company"/>
  <owl:ObjectProperty rdf:ID="workat">
    <rdfs:range rdf:resource="#company"/>
    <rdfs:domain rdf:resource="#people"/>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:ID="livein">
    <rdfs:range rdf:resource="#city"/>
    <rdfs:domain rdf:resource="#people"/>
  </owl:ObjectProperty>
  <owl:DatatypeProperty rdf:ID="name">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
    <rdfs:domain>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#people"/>
          <owl:Class rdf:about="#city"/>
          <owl:Class rdf:about="#company"/>
        </owl:unionOf>
      </owl:Class>
    </rdfs:domain>
  </owl:DatatypeProperty>
  <owl:DatatypeProperty rdf:ID="sex">
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
    <rdfs:domain rdf:resource="#people"/>
  </owl:DatatypeProperty>
  <owl:DatatypeProperty rdf:ID="age">
    <rdfs:domain rdf:resource="#people"/>
    <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#int"/>
  </owl:DatatypeProperty>

<tt:people rdf:ID="people_1">
    <tt:livein rdf:resource="city_1"/>
    <tt:workat rdf:resource="company_1"/>
    <tt:name  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">European</tt:name>
    <tt:sex  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">male</tt:sex>
</tt:people>
<tt:people rdf:ID="people_2">
    <tt:livein rdf:resource="city_2"/>
    <tt:workat rdf:resource="company_1"/>
    <tt:name  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">mike</tt:name>
    <tt:sex  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">male</tt:sex>
</tt:people>

<tt:city rdf:ID="city_1">
<tt:name  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">sydney</tt:name>
</tt:city>
 <tt:city rdf:ID="city_2">
<tt:name  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">peaking</tt:name>
</tt:city>
<tt:company rdf:ID="company_1">
<tt:name  rdf:datatype="http://www.w3.org/2001/XMLSchema#string
">CAnno</tt:name>
</tt:company>
</rdf:RDF>

<!-- Created with Protege (with OWL Plugin 3.4, Build 533)
http://protege.stanford.edu -->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20090813/831d7c4d/attachment.html>


More information about the protege-owl mailing list