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] Comparing individuals (with SWRL)

Martin O'Connor martin.oconnor at stanford.edu
Tue Aug 7 08:25:38 PDT 2007


cf. http://protege.cim3.net/cgi-bin/wiki.pl?SWRLLanguageFAQ#nid8JM

for information on using sameAs and differentFrom in SWRL.

swrlb:notEquals accepts only ordered types such as integers and  
strings - sameAs and differentFrom should be used to compare OWL  
individuals in SWRL.

Martin

Quoting Ely Edison Matos <ely.matos at ufjf.edu.br>:

> Hi,
> following the thread "Comparing individuals" i'm trying to use SWRL   
> to compare two individuals, using a common property. I've tried:
>
> Unit(?x1)  ?  measures(?x1, ?y1)  ?  Unit(?x2)  ?  measures(?x2,   
> ?y1) ? isSameAs(?x1, ?x2)
>
> and Jess asserted correctly that Unit(meter) isSameAs   
> Unit(metre)...but Unit(meter) also isSameAs Unit(meter)....
>
> To avoid a individual isSameAs itself, i tried:
>
> Unit(?x1)  ?  measures(?x1, ?y1)  ?  Unit(?x2)  ?  measures(?x2,   
> ?y1)  ?  differentFrom(?x1, ?x2) ? isSameAs(?x1, ?x2)
>
> but Jess, now, asserted nothing...
>
> Then i tried
>
> Unit(?x1)  ?  measures(?x1, ?y1)  ?  Unit(?x2)  ?  measures(?x2,   
> ?y1)  ?  swrlb:notEqual(?x1, ?x2) ? isSameAs(?x1, ?x2)
>
> but Jess give a error:
>   Message: Error invoking built-in from Jess: exception thrown by   
> built-in 'swrlb:notEqual' in rule 'Def-isSameAs': Expecting ordered   
> type, got individual with name 'volt' for argument #0.
>
> Any help?
>
> Thanks,
> Ely
>





More information about the protege-owl mailing list