[Pellet-users] swrl Rule problem
Alexander Musidlowski
musidlow at informatik.hu-berlin.de
Wed Apr 16 11:03:38 UTC 2008
Hi,
on Wednesday, April 16, 2008 at 12:32 martin pego wrote:
> Hi Alex,
> so I have to define new datatype property hasWeight? Because Weight is
> datatype property in Domain Man with range int.
This sounds like Weight is the same as what i meant with hasWeight,
so you don´t have to create it.
> So when I create instance
> of Man I fill property weight so I tought that
> swrlb:greaterThan(weight,100) is ok but now I don't know how to do?
You have to create an instance of man. Then you have to create a
instance of the property Weight. This property has two arguments, the
first one has to be referred to the instance of the man you created and
the second has to be his weight as integer.
> hasWeigt has to be no datatype but object property, no? Sorry for ma
> questions but this is my firs work.
An object property connects to objects, for example isMarriedTo
relates an instance of man and an instance of woman. (today it could
be also a man ;-)
An datatype property connects an object to an datatype, which can be
a literal, for example hasWeight connects a person (or man) to an
integer. This could also be a string.
The big difference is that an onject always has an URI so you can use
the same object different times. You can also model the weight 100kg
as object because there are more than one person who has a weight of
100 kg.
Please see the documentation for P4 [1] and tutorials [2]
There is also a good tutorial with an pizza ontology for P3. This
helps a lot to understand how things work. At the momentan i can not
find the link.
[1]http://protegewiki.stanford.edu/index.php/Protege4UserDocs
[2]http://www.co-ode.org/resources/tutorials/ProtegeOWLTutorial-p4.0.pdf
> Thanks
> Matoo
>> Hi Matoo,
>>
>> your model is not properly set up. How do you know to which man the
>> weight belongs?
>> It should be something like this:
>>
>> Man(?x) and
>> hasWeight(?x,?y) and
>> swrlb:greaterThan(?y, 100)
>> => ObeseMan(?x)
>>
>> hasWeight has to be a datatype property.
>>
>> Hope this helps.
>>
>> --
>> Bye
>> Alex
>>
>> on Monday, April 14, 2008 at 12:33 martin pego wrote:
>>
>>> Helo,
>>
>>> I am beginner in creating Ontology and SWRL rules. I use Protege
>>> 3.4beta
>>> to create ontology and rule and in application Jena+Pellet. I create in
>>> my ontology class Man and int datatype property "weight" and subClass
>>> ObeseMan.
>>> In SWRL I tried create rule:
>>> Man(?x) "conjuct" swrlb:greaterThan(weight, 100) => ObeseMan(?x)
>>> Then I create some instance of Man which realized this rule and in my
>>> application I tried print to output instance of ObeseMan and results are
>>> nothing. I don't know how activates this my SWRL rule in my application
>>> and if it's correct?
>>
>>> Could you help me, please
>>
>>> Thanks
>>
>>> Matoo
>>
>>
>>> _______________________________________________
>>> Pellet-users mailing list
>>> Pellet-users at lists.owldl.com
>>> http://lists.owldl.com/mailman/listinfo/pellet-users
>>> _______________________________________________
>>
>>> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pellet-users mailing list
>> Pellet-users at lists.owldl.com
>> http://lists.owldl.com/mailman/listinfo/pellet-users
>> _______________________________________________
>>
>> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 183 bytes
Desc: not available
Url : http://lists.owldl.com/pipermail/pellet-users/attachments/20080416/2adbf1da/attachment.pgp
More information about the Pellet-users
mailing list