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] merging two ontologies

Timothy Redmond tredmond at stanford.edu
Fri Jan 1 21:04:33 PST 2010


The Protege 4 merge capability also seems to work.  I used the "Merge 
Ontologies" entry from the Refactor menu and obtained the Merged.owl 
ontology from the Other.owl and Person.owl ontologies.

Maybe I need more details on exactly what you did to replicate this problem.

-Timothy


swamy wrote:
>
> Hi Timothy,
>
> Thanks a lot for your response.
> Please see my answers below.
>
> I think that we need to start with some clarification.  For example 
> you say
> > And each .owl has 2 instances of person class.
> Does this mean that each owl file has two owl classes called person?
> That there is one Person class and there are two owl individuals in each
> class?
>
> <Swamy> Each OWL has only one Person class and has two instances of 
> Person.
>
> So part of the clarification would be to specify exactly what types of
> owl entities you are talking about.  For the purposes of this discussion
> I think you will be talking about OWL classes, OWL object properties,
> OWL data properties or OWL individuals.   How many classes are we
> talking about and how many individuals?  Also when you say
> > I have two .owl files with same properties.  eg: Person1.owl and
> > Person2.owl
> I assume that the properties you are talking about are not owl properties?
>
> <Swamy> Here two .owl files have same properties means: classes, 
> Object Properties and Data Properties.
> We have two individuals of Person in each .owl file.
>  
> The second issue that needs to be clarified is the full name of the
> classes or individuals. Thus "Person" is not a full name.  The full name
> (rdf:id) is a full uri.  If two OWL classes have the same full name then
> they are the same class.  But if the full uri is different but the short
> name is the same then they are distinct classes.  E.g. you could have
> two owl classes named
>
>   http://smi-protege.stanford.edu/ontologies/Family.owl#Person
>
> and
>
>    http://smi-protege.stanford.edu/ontologies/People.owl#Person.
>
> Since the full names are different the classes are different (though
> there could be an axiom stating that they are owl:equivalentClasses).
>
> <Swamy> Here the full names are same.
>
> http://swamyproj.googlecode.com/files/person#Person
>
> Now I want to get all the instances of two .owl files when I merge the 
> one .owl to another .owl
>  
> Hope I am clear.
>
> Thank you
> ~Swamy
>
> On Thu, Dec 31, 2009 at 1:34 AM, 
> <protege-owl-request at lists.stanford.edu 
> <mailto:protege-owl-request at lists.stanford.edu>> wrote:
>
>     Send protege-owl mailing list submissions to
>            protege-owl at lists.stanford.edu
>     <mailto:protege-owl at lists.stanford.edu>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>            https://mailman.stanford.edu/mailman/listinfo/protege-owl
>     or, via email, send a message with subject or body 'help' to
>            protege-owl-request at lists.stanford.edu
>     <mailto:protege-owl-request at lists.stanford.edu>
>
>     You can reach the person managing the list at
>            protege-owl-owner at lists.stanford.edu
>     <mailto:protege-owl-owner at lists.stanford.edu>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of protege-owl digest..."
>
>
>     Today's Topics:
>
>       1. Re: Inference of class type based on keyword      andModeling
>     data
>          types (Saiprasad, Sundar)
>       2. merging two ontologies (swamy)
>       3. Re: merging two ontologies (Timothy Redmond)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Wed, 30 Dec 2009 16:16:42 +0530
>     From: "Saiprasad, Sundar" <Sundar_Saiprasad at intuit.com
>     <mailto:Sundar_Saiprasad at intuit.com>>
>     To: "User support for the Protege-OWL editor"
>            <protege-owl at lists.stanford.edu
>     <mailto:protege-owl at lists.stanford.edu>>
>     Subject: Re: [protege-owl] Inference of class type based on keyword
>            andModeling data types
>     Message-ID:
>          
>      <1B75B268E6295D4586C218DF3C3847AC0180F503 at banex02.corp.intuit.net
>     <mailto:1B75B268E6295D4586C218DF3C3847AC0180F503 at banex02.corp.intuit.net>>
>     Content-Type: text/plain;       charset="us-ascii"
>
>     Thomas
>
>
>     Thanks a ton for your response. My use case is a bit unique. The
>     animal
>     example is an analogy for my actual use case and let me try to explain
>     it better. I will get a unique URI for an individual and a bunch of
>     keywords as input.  These keywords can be something like "Lion" ,
>     "Brown" , "500Kg" etc. I will get a bunch of keywords for each
>     individual. There can be many individuals. The keywords are
>     available as
>     "hasKeyword" property from the individual.
>
>     I have a base class called Animal in my ontology and assume that the
>     first individual that I get as input has the URI urn:animal1234. I
>     know
>     for sure that urn:annimal1234 is of type test:Animal. Every individual
>     is of type test:Animal.  There are subclasses of Animal like
>     Carnivore ,
>     BrownAnimals , HeavyAnimals etc. Based on the keywords that I get for
>     each individual , each individual becomes a member of these subclasses
>     too. Your point is very valid. I can create something like the
>     following
>
>     Test:CarnivoreText owl:equivalent [ a owl:Restriction ;
>                                      Owl:onProperty  Test:hasKeyword ;
>                                      Owl:hasValue "Lion" ]
>
>     Test:CarnivoreText rdfs:subclassof Test:Carnivore
>
>     This would mean if I get a keyword Lion for the individual , it will
>     also infer that the individual is a subclass of Carnivore.
>
>     Similar associations can be created for BrownAnimals and other classes
>     too.
>
>
>     I would like to know if there is a way to list a bunch of keywords
>     that
>     I can have as an enumerated datatype and if one of it matches ,
>     then the
>     class association is made.
>
>     Basically , I don't want my application to code these rules and
>     make the
>     associations. I want to express it in the data itself
>
>     Thanks
>     Sundar
>
>
>
>
>     -----Original Message-----
>     From: protege-owl-bounces at lists.stanford.edu
>     <mailto:protege-owl-bounces at lists.stanford.edu>
>     [mailto:protege-owl-bounces at lists.stanford.edu
>     <mailto:protege-owl-bounces at lists.stanford.edu>] On Behalf Of Thomas
>     Schneider
>     Sent: Tuesday, December 29, 2009 4:54 PM
>     To: User support for the Protege-OWL editor
>     Subject: Re: [protege-owl] Inference of class type based on keyword
>     andModeling data types
>
>
>     Hi Sundar,
>
>     On 29 Dec 2009, at 11:11, Saiprasad, Sundar wrote:
>
>     > Hi
>     >
>     > This is what I want to achieve
>     >
>     > Assume I have the following defined
>     >
>     > Test:Animal rdf:type owl:Class
>     > Test:hasKeyword rdf:type owl:DatatypeProperty Test:hasKeyword
>     > rdf:domain Test:Animal Test:hasKeyword rdf:range  xsd:string
>     > Test:Carnivore  rdfs:subclassof Test:Animal Test:Carnivore
>     > rdfs:subClassOf [ a owl:Restriction ;
>     >                                 Owl:onProperty  Test:hasKeyword ;
>     >                                 Owl:hasValue "Lion" ]
>
>     Please note that your last statement says: "everything that is a
>     carnivore has a keyword 'Lion'".
>
>     > Now if I have the following instance
>     >
>     > Test:animal1234  rdf:type Test:Animal
>     > Test:animal1234  Test:hasKeyword  "Lion"
>     >
>     > I would like to infer Test:animal1234 rdf:type Test:Carnivore. This
>     > didn't work for me. Am I missing something?
>
>     This only works if the above statement is the other way round:
>     "everything that has a keyword 'Lion' is a carnivore".
>
>     > I would like to extend this further by having a set of strings  like
>     > an enumerated type (For example , lion , tiger , wolf etc) as
>     defined
>     > in xsd and if the keyword matches one of it , the corresponding type
>     > should get inferred. I would expect a change like the following to
>     > support it :
>     > Test:Carnivore rdfs:subClassOf [ a owl:Restriction ;
>     >                                 Owl:onProperty  Test:hasKeyword ;
>     >                                 Owl:someValuesFrom  user-defined-
>     > datatype that has the enumeration of all keywords ]
>     >
>     > If the data contains Test:animal1234  Test:hasKeyword "wolf"  , then
>     > it should infer Test:animal1234 rdf:type Test:Carnivore
>     >
>     > Is this possible and if it is can it be modeled?
>
>     But why do you want to model "being a lion" via "has a keyword
>     'Lion'"?
>     Why not have classes Lion, Tiger etc., of which animal1234 may or may
>     not be an instance?
>
>     Cheers
>
>     Thomas
>
>     >
>     >
>     > How do I model such a user defined data type and refer to it?
>     >
>     >
>     > Thanks
>     > Sundar
>     >
>
>     +----------------------------------------------------------------------+
>     |  Dr Thomas Schneider                    schneider (at)
>     cs.man.ac.uk <http://cs.man.ac.uk/>  |
>     |  School of Computer Science      
>     http://www.cs.man.ac.uk/~schneidt
>     <http://www.cs.man.ac.uk/%7Eschneidt>  |
>     |  Kilburn Building, Room 2.114                 phone +44 161
>     2756136  |
>     |  University of Manchester                                      
>          |
>     |  Oxford Road                                             _///_  
>         |
>     |  Manchester M13 9PL                                      (o~o)  
>         |
>     +-----------------------------------------------------oOOO--(_)--OOOo--+
>
>     Skagway (n.)
>      Sudden outbreak of cones on a motorway.
>
>                      Douglas Adams, John Lloyd: The Deeper Meaning of Liff
>
>
>
>
>
>     ------------------------------
>
>     Message: 2
>     Date: Wed, 30 Dec 2009 19:22:03 +0530
>     From: swamy <alswamy at gmail.com <mailto:alswamy at gmail.com>>
>     To: protege-owl at lists.stanford.edu
>     <mailto:protege-owl at lists.stanford.edu>
>     Subject: [protege-owl] merging two ontologies
>     Message-ID:
>          
>      <d528380f0912300552t4431cd19kce96e18af18757ca at mail.gmail.com
>     <mailto:d528380f0912300552t4431cd19kce96e18af18757ca at mail.gmail.com>>
>     Content-Type: text/plain; charset="iso-8859-1"
>
>     Hi,
>
>     I have two .owl files with same properties.  eg: Person1.owl and
>     Person2.owl
>
>     And each .owl has 2 instances of person class.
>
>     If i merge these two .owl files, Can I get those 4 person
>     instances into one
>     .owl file ?
>
>     I tried with Protege 4x and as well as OWLOntologyMerger API, but
>     I am not
>     able to get the desired output.
>
>     I am getting the only 2 instances of Person2.owl in the final
>     merged .owl.
>
>     Can somebody help?
>
>     Thanks
>     ~Swamy
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20091230/7dc0ebfb/attachment-0001.htm>
>
>     ------------------------------
>
>     Message: 3
>     Date: Wed, 30 Dec 2009 10:01:19 -0800
>     From: Timothy Redmond <tredmond at stanford.edu
>     <mailto:tredmond at stanford.edu>>
>     To: User support for the Protege-OWL editor
>            <protege-owl at lists.stanford.edu
>     <mailto:protege-owl at lists.stanford.edu>>
>     Subject: Re: [protege-owl] merging two ontologies
>     Message-ID: <4B3B956F.6090900 at stanford.edu
>     <mailto:4B3B956F.6090900 at stanford.edu>>
>     Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
>     I think that we need to start with some clarification.  For
>     example you say
>     > And each .owl has 2 instances of person class.
>     Does this mean that each owl file has two owl classes called person?
>     That there is one Person class and there are two owl individuals
>     in each
>     class?
>
>     So part of the clarification would be to specify exactly what types of
>     owl entities you are talking about.  For the purposes of this
>     discussion
>     I think you will be talking about OWL classes, OWL object properties,
>     OWL data properties or OWL individuals.   How many classes are we
>     talking about and how many individuals?  Also when you say
>     > I have two .owl files with same properties.  eg: Person1.owl and
>     > Person2.owl
>     I assume that the properties you are talking about are not owl
>     properties?
>
>     The second issue that needs to be clarified is the full name of the
>     classes or individuals. Thus "Person" is not a full name.  The
>     full name
>     (rdf:id) is a full uri.  If two OWL classes have the same full
>     name then
>     they are the same class.  But if the full uri is different but the
>     short
>     name is the same then they are distinct classes.  E.g. you could have
>     two owl classes named
>
>       http://smi-protege.stanford.edu/ontologies/Family.owl#Person
>
>     and
>
>        http://smi-protege.stanford.edu/ontologies/People.owl#Person.
>
>     Since the full names are different the classes are different (though
>     there could be an axiom stating that they are owl:equivalentClasses).
>
>     -Timothy
>
>     swamy wrote:
>     > Hi,
>     >
>     > I have two .owl files with same properties.  eg: Person1.owl and
>     > Person2.owl
>     > And each .owl has 2 instances of person class.
>     >
>     > If i merge these two .owl files, Can I get those 4 person instances
>     > into one .owl file ?
>     >
>     > I tried with Protege 4x and as well as OWLOntologyMerger API,
>     but I am
>     > not able to get the desired output.
>     >
>     > I am getting the only 2 instances of Person2.owl in the final
>     merged .owl.
>     >
>     > Can somebody help?
>     >
>     > Thanks
>     > ~Swamy
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > protege-owl mailing list
>     > protege-owl at lists.stanford.edu
>     <mailto:protege-owl at lists.stanford.edu>
>     > https://mailman.stanford.edu/mailman/listinfo/protege-owl
>     >
>     > Instructions for unsubscribing:
>     http://protege.stanford.edu/doc/faq.html#01a.03
>     >
>
>
>
>     ------------------------------
>
>     _______________________________________________
>     protege-owl mailing list
>     protege-owl at lists.stanford.edu <mailto:protege-owl at lists.stanford.edu>
>     https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>
>     End of protege-owl Digest, Vol 41, Issue 55
>     *******************************************
>
>
>
>
> -- 
> Thanks & Regards
> ~Swamy
> ------------------------------------------------------------------------
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Other.owl
Type: application/rdf+xml
Size: 1944 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100101/1eb5ef81/attachment.owl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Person.owl
Type: application/rdf+xml
Size: 1898 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100101/1eb5ef81/attachment-0001.owl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Merged.owl
Type: application/rdf+xml
Size: 2513 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20100101/1eb5ef81/attachment-0002.owl>


More information about the protege-owl mailing list