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-dev] Protege-API 3.5 - Help me please

Naruepon Panawong jnaruepon.p at gmail.com
Wed Feb 26 00:28:08 PST 2014


Dear Martin

       I write this rule (Tourist(?x) ∧ hasAgeRank(?x, Age19-25) ∧
Waterfall(?a) →  hasAttraction(?x, ?a)) in Protege Editor. I run jess and
result (waterfall) show in tourist. but I use rule in program that return
all data. (see also attachment file).

Thank you and Best Regards.
Naruepon.p


2014-02-26 10:45 GMT+07:00 Martin O'Connor <martin at zippyrate.com>:

>
> Sorry - I don’t understand. Can you show me what output you are getting
> (and what you are expecting).
>
> Martin
>
> On Feb 23, 2014, at 7:09 PM, Naruepon Panawong <jnaruepon.p at gmail.com>
> wrote:
>
> Thank you for your jar file (fixed)
>
> I still confuse about rule becase I write rule and Program show all Data
> in my Ontology.
> I want to show Waterfall only. I test my rule in Protege Editor that it
> work.
>
> Some code
>                 OWLNamedClass touristClass =
> owlModel.getOWLNamedClass("Tourist");
>  OWLObjectProperty ageProperty =
> owlModel.getOWLObjectProperty("hasAgeRank");
>  OWLIndividual individual1 =
> touristClass.createOWLIndividual("Naruepon.p");
>  individual1.setPropertyValue(ageProperty, "Age19-25");
>  SWRLFactory factory = new SWRLFactory(owlModel);
>  factory.enableAll();
>  SWRLImp imp = factory.createImp("Tourist(?x) ^ hasAgeRank(?x,Age19-25) ^
> Waterfall(?a) -> hasAttraction(?x,?a)");
>  imp.enable();
>  ruleEngine.infer();
>
> Thank you and Best Regards.
> Naruepon.p
>
>
> 2014-02-23 11:43 GMT+07:00 Naruepon Panawong <jnaruepon.p at gmail.com>:
>
>> Thank you for your jar file (fixed)
>>
>> I still confuse about rule becase I write rule and Program show all Data
>> in my Ontology.
>> I want to show Waterfall only. I test my rule in Protege Editor that it
>> work.
>>
>> Some code
>>                 OWLNamedClass touristClass =
>> owlModel.getOWLNamedClass("Tourist");
>> OWLObjectProperty ageProperty =
>> owlModel.getOWLObjectProperty("hasAgeRank");
>>  OWLIndividual individual1 =
>> touristClass.createOWLIndividual("Naruepon.p");
>>  individual1.setPropertyValue(ageProperty, "Age19-25");
>>  SWRLFactory factory = new SWRLFactory(owlModel);
>> factory.enableAll();
>>  SWRLImp imp = factory.createImp("Tourist(?x) ^ hasAgeRank(?x,Age19-25)
>> ^ Waterfall(?a) -> hasAttraction(?x,?a)");
>>  imp.enable();
>>  ruleEngine.infer();
>>
>> Thank you and Best Regards.
>> Naruepon.p
>>
>>
>> 2014-02-23 3:22 GMT+07:00 Martin O'Connor <martin at zippyrate.com>:
>>
>>
>>> I think this may be a bug. I enclose a JAR with a fix. Copy it to your
>>> Protege-OWL plugins directory (e.g., /Applications/Protege_3.5/plugins/edu.stanford.smi.protegex.owl)
>>> and restert Protege.
>>>
>>> Let me know if this works.
>>>
>>> Martin
>>>
>>>
>>>
>>
> _______________________________________________
> protege-dev mailing list
> protege-dev at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-dev
>
>
>
> _______________________________________________
> protege-dev mailing list
> protege-dev at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20140226/43674ab6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exam.doc
Type: application/msword
Size: 372736 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20140226/43674ab6/attachment-0001.doc>


More information about the protege-dev mailing list