- From: <jos.deroo@agfa.com>
- Date: Thu, 4 Aug 2005 01:08:18 +0200
- To: public-cwm-talk@w3.org
while modeling fuzzy sets in N3, this was kind of straightforward to have fuzzy sets :Child and :Adult as @prefix math: <http://www.w3.org/2000/10/swap/math#>. @prefix fa: <fa-rules#>. @prefix : <case001#>. :Ann a :Person; :age 18.1666. {?P a :Person; :age ?A. ?A math:lessThan 17} => {?P fa:mu (:Child 1.0)}. {?P a :Person; :age ?A. ?A math:notLessThan 17; math:lessThan 19. (1.0 ((?A 17)!math:difference 2)!math:quotient) math:difference ?M} => {?P fa:mu (:Child ?M)}. {?P a :Person; :age ?A. ?A math:notLessThan 19} => {?P fa:mu (:Child 0.0)}. {?P a :Person; :age ?A. ?A math:lessThan 17} => {?P fa:mu (:Adult 0.0)}. {?P a :Person; :age ?A. ?A math:notLessThan 17; math:lessThan 19. ((?A 17)!math:difference 2) math:quotient ?M} => {?P fa:mu (:Adult ?M)}. {?P a :Person; :age ?A. ?A math:notLessThan 19} => {?P fa:mu (:Adult 1.0)}. so that query @prefix q: <http://www.w3.org/2004/ql#>. @prefix fa: <fa-rules#>. @prefix : <case001#>. [] q:select {?P fa:mu ?V}; q:where {?P fa:mu ?V}. gives answer :Ann fa:mu ( :Adult 0.5833 ), ( :Child 0.4167 ) . but I'm wondering wether this is enough context insensitive.. -- Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/
Received on Wednesday, 3 August 2005 23:08:34 UTC