subclassing imported/external ontology

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

subclassing imported/external ontology

Wetz Peter

I did not find an OWL specific mailing list, but since I work with Protege, I will ask this here:

 

let's say there is this external ontology called ‘External’ with class ‘Car’. this ontology has 2 subclasses ‘FastCar‘ and ‘SlowCar‘. Now, I am building my own Ontology where I want to define a class called ‘MyCar‘.‘MyCar‘ should be allowed to be of type both ‘FastCar‘ or ‘SlowCar‘.

 

Initially I thought this can be achieved by just importing ‘External‘ into my new ontology and creating the class ‘MyCar‘ which is a subclass of the external's ontology class ‘Car‘. Is this the correct way to do this?

 

My example is simplified, but basically explains my real problem: I have a huge ontology which contains a class called ‘Property’. This class has many subclasses. In my own ontology, I want my own class to be able to be any of these ‘many subclasses’. This is what I want to achieve.

 

Thanks and kind regards,

Peter


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

samsontu

On Dec 16, 2014, at 1:16 AM, Wetz Peter <[hidden email]> wrote:

I did not find an OWL specific mailing list, but since I work with Protege, I will ask this here:
 
let's say there is this external ontology called ‘External’ with class ‘Car’. this ontology has 2 subclasses ‘FastCar‘ and ‘SlowCar‘. Now, I am building my own Ontology where I want to define a class called ‘MyCar‘.‘MyCar‘ should be allowed to be of type both ‘FastCar‘ or ‘SlowCar‘.
 
Initially I thought this can be achieved by just importing ‘External‘ into my new ontology and creating the class ‘MyCar‘ which is a subclass of the external's ontology class ‘Car‘. Is this the correct way to do this?

It depends on what you mean by "MyCar‘ should be allowed to be of type both ‘FastCar‘ or ‘SlowCar’.” 

What you did allows MyCar to be FastCar, SlowCar, or cars that are neither fast nor slow. If MyCar can only be FastCar or SlowCar, then you should define MyCar as a subclass of the union of FastCar and SlowCar. If your domain of discourse requires a car to be either slow or fast, then you can define Car to be that union.

With best regards,
Samson





_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

Wetz Peter

Let me be more precise: What I really want to achieve is, that a user of my ontology, should be able to instantiate (or: create an individual) of MyCar. At the same time MyCar should be allowed to be of type/class SlowCar or FastCar. So for instance, user 1 decides to instantiate MyCar as SlowCar and user 2 decides to instantiate MyCar as FastCar.

 

How can this be achieved?

Best,

Peter

 

Von: protege-user [mailto:[hidden email]] Im Auftrag von Samson Tu
Gesendet: Dienstag, 16. Dezember 2014 19:00
An: User support for WebProtege and Protege Desktop
Betreff: Re: [protege-user] subclassing imported/external ontology

 

 

On Dec 16, 2014, at 1:16 AM, Wetz Peter <[hidden email]> wrote:

 

I did not find an OWL specific mailing list, but since I work with Protege, I will ask this here:

 

let's say there is this external ontology called ‘External’ with class ‘Car’. this ontology has 2 subclasses ‘FastCar‘ and ‘SlowCar‘. Now, I am building my own Ontology where I want to define a class called ‘MyCar‘.‘MyCar‘ should be allowed to be of type both ‘FastCar‘ or ‘SlowCar‘.

 

Initially I thought this can be achieved by just importing ‘External‘ into my new ontology and creating the class ‘MyCar‘ which is a subclass of the external's ontology class ‘Car‘. Is this the correct way to do this?

 

It depends on what you mean by "MyCar‘ should be allowed to be of type both ‘FastCar‘ or ‘SlowCar’.” 

 

What you did allows MyCar to be FastCar, SlowCar, or cars that are neither fast nor slow. If MyCar can only be FastCar or SlowCar, then you should define MyCar as a subclass of the union of FastCar and SlowCar. If your domain of discourse requires a car to be either slow or fast, then you can define Car to be that union.

 

With best regards,

Samson

 

 

 

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

samsontu

On Dec 19, 2014, at 2:02 AM, Wetz Peter <[hidden email]> wrote:

Let me be more precise: What I really want to achieve is, that a user of my ontology, should be able to instantiate (or: create an individual) of MyCar. At the same time MyCar should be allowed to be of type/class SlowCar or FastCar. So for instance, user 1 decides to instantiate MyCar as SlowCar and user 2 decides to instantiate MyCar as FastCar.
 
How can this be achieved?

Suppose that user 1 instantiates myCar1 (an individual of type MyCar), he/she can make an additional assertion stating that myCar1 has type SlowCar (or FastCar as the case may be).

There is no magic in OWL. You state as axioms what you want to have in your ontology.

With best regards,
Samson


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

Csongor Nyulas-2
Administrator
Another way would be to make SlowCar and FastCar subclasses of MyCar. Then the user1 can instantiate FastCar (which will be a MyCar) and user2 can instantiate a SlowCar (which, again, will be a SlowCar).

Or have the following hierarchy:
- MyCar
    - MyFastCar
    - MySlowCar
- FastCar
    - MyFastCar
- SlowCar
    - MySlowCar
If user1 instantiates MyFastCar that would be both MyCar and FastCar. If user2 instantiates MySlowCar that would be both MyCar and SlowCar.

You could also add 2 types for your individuals.

You really need to think deeply about the relationships between your classes if you want to model your domain correctly.

Csongor

On 12/19/2014 10:35 AM, Samson Tu wrote:

On Dec 19, 2014, at 2:02 AM, Wetz Peter <[hidden email]> wrote:

Let me be more precise: What I really want to achieve is, that a user of my ontology, should be able to instantiate (or: create an individual) of MyCar. At the same time MyCar should be allowed to be of type/class SlowCar or FastCar. So for instance, user 1 decides to instantiate MyCar as SlowCar and user 2 decides to instantiate MyCar as FastCar.
 
How can this be achieved?

Suppose that user 1 instantiates myCar1 (an individual of type MyCar), he/she can make an additional assertion stating that myCar1 has type SlowCar (or FastCar as the case may be).

There is no magic in OWL. You state as axioms what you want to have in your ontology.

With best regards,
Samson



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

Rafael Gonçalves
On top of Samson’s and Csongor’s replies, I’d like to add the following: you can say that an instance is of type T1, T2, …, as mentioned before, and/or you can define an instance (solely) based on its attributes, and then rely on defined classes and reasoning to do the rest for you. Example:

Car  SubClassOf  hasOwner.Thing and hasSpeed.Speed
MyCar  EquivalentTo  Car and hasOwner.Me

SlowCar  EquivalentTo  Car and hasSpeed.Slow
FastCar  EquivalentTo  Car and hasSpeed.Fast

MyFastCar  EquivalentTo  MyCar and FastCar
MySlowCar  EquivalentTo  MyCar and SlowCar

- On the data side: 

instance1  types  Car and hasSpeed.Fast and hasOwner.Me
- this implies that: instance1  types  {Car, FastCar, MyCar, MyFastCar}

instance2  types  Car and hasSpeed.Slow and hasOwner.Me
- this implies that: instance2  types  {Car, SlowCar, MyCar, MySlowCar}


This will get you to the hierarchy that Csongor suggested, and it is easier to maintain and extend; you don’t have to specify each and every class your instance is a type of, instead you just describe the attributes of this car instance and reasoning will infer the types for you. It’s a design choice, you’ll have to see what’s most suitable for the context.

About reusing: You mentioned you only intend to use a fraction of a huge ontology; I would recommend extracting a module for the terms you wish to reuse from that ontology, and import this module into your new ontology. You could import the whole ontology of course, but it seems unnecessary.

Hope this helps.

Rafael


On Dec 19, 2014, at 11:56, Csongor Nyulas <[hidden email]> wrote:

Another way would be to make SlowCar and FastCar subclasses of MyCar. Then the user1 can instantiate FastCar (which will be a MyCar) and user2 can instantiate a SlowCar (which, again, will be a SlowCar).

Or have the following hierarchy:
- MyCar
    - MyFastCar
    - MySlowCar
- FastCar
    - MyFastCar
- SlowCar
    - MySlowCar
If user1 instantiates MyFastCar that would be both MyCar and FastCar. If user2 instantiates MySlowCar that would be both MyCar and SlowCar.

You could also add 2 types for your individuals.

You really need to think deeply about the relationships between your classes if you want to model your domain correctly.

Csongor

On 12/19/2014 10:35 AM, Samson Tu wrote:

On Dec 19, 2014, at 2:02 AM, Wetz Peter <[hidden email]> wrote:

Let me be more precise: What I really want to achieve is, that a user of my ontology, should be able to instantiate (or: create an individual) of MyCar. At the same time MyCar should be allowed to be of type/class SlowCar or FastCar. So for instance, user 1 decides to instantiate MyCar as SlowCar and user 2 decides to instantiate MyCar as FastCar.
 
How can this be achieved?

Suppose that user 1 instantiates myCar1 (an individual of type MyCar), he/she can make an additional assertion stating that myCar1 has type SlowCar (or FastCar as the case may be).

There is no magic in OWL. You state as axioms what you want to have in your ontology.

With best regards,
Samson



_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: subclassing imported/external ontology

Wetz Peter
In reply to this post by samsontu

Okay, thanks. that makes sense. so in your example below, the instance myCar1 would be of type MyCar and of type SlowCar, right?

 

best,

Peter

 

Von: protege-user [mailto:[hidden email]] Im Auftrag von Samson Tu
Gesendet: Freitag, 19. Dezember 2014 19:36
An: User support for WebProtege and Protege Desktop
Betreff: Re: [protege-user] subclassing imported/external ontology

 

 

On Dec 19, 2014, at 2:02 AM, Wetz Peter <[hidden email]> wrote:

 

Let me be more precise: What I really want to achieve is, that a user of my ontology, should be able to instantiate (or: create an individual) of MyCar. At the same time MyCar should be allowed to be of type/class SlowCar or FastCar. So for instance, user 1 decides to instantiate MyCar as SlowCar and user 2 decides to instantiate MyCar as FastCar.

 

How can this be achieved?

 

Suppose that user 1 instantiates myCar1 (an individual of type MyCar), he/she can make an additional assertion stating that myCar1 has type SlowCar (or FastCar as the case may be).

 

There is no magic in OWL. You state as axioms what you want to have in your ontology.

 

With best regards,

Samson

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user