- From: William Van Woensel <william.vanwoensel@gmail.com>
- Date: Sat, 30 Oct 2021 14:44:37 -0300
- To: Joy lix <joylix4112@outlook.com>, "public-n3-dev@w3.org" <public-n3-dev@w3.org>
- Message-ID: <7CD5ED59-6900-42B5-A819-B05B03EA139B@gmail.com>
Hi Joy In addition to what Jos shares with you, you can try out the following “pure” N3 code (not relying on Eye-specific builtins) to arbitrarily combine logical conditions: http://ppr.cs.dal.ca:3002/n3/editor/s/mEWJDvxb (It relies on N3’s ability to write rules that themselves generate new rules, and embed variables directly in the data, for instance.) Unfortunately, it only infers whether the condition of the subject “tempTest” is met (conditionMet = true), and not which resources led to it being true (e.g., temperature1 or temperature2). So, I don’t know whether it fully meets your needs. At any rate, maybe the plugin code can give you some other ideas :-) William From: Joy lix <joylix4112@outlook.com> Date: Saturday, October 23, 2021 at 5:27 AM To: "public-n3-dev@w3.org" <public-n3-dev@w3.org> Subject: How do I write this N3 statement correctly Resent-From: <public-n3-dev@w3.org> Resent-Date: Sat, 23 Oct 2021 08:27:46 +0000 Dear, all, I wrote a N3 statement as follows: PREFIX math: <http://www.w3.org/2000/10/swap/math#> :temperature1 :value -20. :temperature2 :value 42. {?temperature :value ?value. ?value math:lessThan -10} => {?temperature :value :abnormal }. {?temperature :value ?value . ?value math:greaterThan 40} => {?temperature :value :abnormal }. Is there any way to use "or" to simplify it into a single inference statement? And how do I use "else" to indicate that temperature values outside these ranges are "normal"? In addition, I use http://ppr.cs.dal.ca:3002/n3/editor/, in the deductive information of "eye", can I show only the inferred results alone? Thanks for helping. Joylix
Received on Saturday, 30 October 2021 17:44:52 UTC