Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Both sides previous revision Poprzednia wersja
Nowa wersja
Poprzednia wersja
pl:miw:2009:miw09_swrltrans:projekt [2009/05/29 17:09]
jsi08
pl:miw:2009:miw09_swrltrans:projekt [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +~~ODT~~
 ====== SWRL_XML Intro ====== ====== SWRL_XML Intro ======
 SWRL_XML jest częścią projektu [[hekate:​heart|heart]]. Dlatego też przed uruchomieniem SWRL_XML należy ściągnąć i zainstalować program heart. SWRL_XML jest częścią projektu [[hekate:​heart|heart]]. Dlatego też przed uruchomieniem SWRL_XML należy ściągnąć i zainstalować program heart.
Linia 22: Linia 23:
  
 ====== Przykłady translacji ====== ====== Przykłady translacji ======
-therm-rt.pl+Sprawdzona poprawność składniowa wygenerowanych plików przez [[http://​www.w3.org/​2001/​03/​webdata/​xsv]]:​ 
 +   ​Validation was strict, starting with type [Anonymous] 
 +   ​schemaLocs:​ http://​www.w3.org/​2003/​11/​swrlx -> http://​www.ruleml.org/​swrl/​xsd/​swrlx.xsd 
 +   The schema(s) used for schema-validation had no errors 
 +   No schema-validity problems were found in the target 
 +  
 +===== therm-rt.pl ​===== 
 +Reguły w Heart (HMR): 
 + xrule ms/1: 
 +   [month in [january,​february,​december]] 
 +   ==> 
 +   [season set summer]. 
 + xrule ms/2: 
 +   [month in [march,​april,​may]] 
 +   ==> 
 +   [season set autumn] 
 +   :os. 
 + xrule ms/3: 
 +   [month in [june,​july,​august]] 
 +   ==> 
 +   [season set winter] 
 +   :os/3. 
 + xrule ms/4: 
 +   [month in [9,10,11]] %in [september,​october,​november]] 
 +   ==> 
 +   [season set winter] 
 +   :os.
  
-examples-rt.pl+ xrule dt/1: 
 +   [day in [monday,​tuesday,​wednesday,​thursday,​friday]] 
 +   ==> 
 +   [today set workday].%,​ 
 + 
 + xrule dt/2: 
 +   [day in [saturday,​sunday]] 
 +   ==> 
 +   [today set weekend]. 
 +    
 + xrule th/1: 
 +   [today eq workday, 
 +    ​hour ​ gt 17] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/2: 
 +   [today eq weekend, 
 +    ​hour ​ eq any] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/3: 
 +   [today eq workday, 
 +    ​hour ​ lt 9] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/4: 
 +   [today eq workday, 
 +    ​hour ​ in [9 to 17]] 
 +   ==> 
 +   [operation set during_bizhours]. 
 + 
 + xrule os/1: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq summer] 
 +   ==> 
 +   [therm_set set 27]. 
 + xrule os/2: 
 +   [operation eq during_bizhours,​ 
 +    ​season eq summer] 
 +   ==> 
 +   [therm_set set 24]. 
 + xrule os/3: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq spring] 
 +   ==> 
 +   [therm_set set 15]. 
 + xrule os/4: 
 +   [operation eq during_bizhours,​ 
 +    ​season eq spring] 
 +   ==> 
 +   [therm_set set 20]. 
 + xrule os/5: 
 +   [operation eq during_bizhours,​ 
 +    ​season eq winter] 
 +   ==> 
 +   [therm_set set 18]. 
 + xrule os/6: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq winter] 
 +   ==> 
 +   [therm_set set 14]. 
 + xrule os/7: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq autumn] 
 +   ==> 
 +   [therm_set set 16]. 
 + xrule os/8: 
 +   [operation eq during_bizhours,​ 
 +    ​season eq autumn] 
 +   ==> 
 +   [therm_set set 20]. 
 + 
 +Translacja na SWRL: 
 +{{:​pl:​miw:​2009:​miw09_swrltrans:​projekt:​therm-rt-out.txt|}} 
 + 
 + 
 +===== examples-rt.pl ​=====  
 +Reguły w heart (HMR): 
 + 
 + xrule ms/1: 
 +   [month in [january,​february,​december],​ 
 +    month in [ala,​ma,​kota]] ​  
 +   ==> 
 +   [season set summer]. 
 + xrule ms/2: 
 +   [month in [march,​april,​may]] 
 +   ==> 
 +   [season set autumn] 
 +   :os. 
 + xrule ms/3: 
 +   [month in [june,​july,​august]] 
 +   ==> 
 +   [season set winter] 
 +   **> 
 +   [write(month)] 
 +   :os/3. 
 + xrule ms/4: 
 +   [month eq 5] 
 +   ==> 
 +   [season set winter] 
 +   :os. 
 + 
 + xrule dt/1: 
 +   [day in [mon,​tue,​wed,​thr,​fri]] 
 +   ==> 
 +   [today set workday] 
 +   **> 
 +   [kot,​ma,​ale]. 
 + xrule dt/2: 
 +   [day in [sat,​sun]] 
 +   ==> 
 +   [today set weekend]. 
 + 
 + xrule th/1: 
 +   [today eq workday, 
 +    hour gt 17] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/2: 
 +   [today eq weekend, 
 +    hour eq any] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/3: 
 +   [today eq workday, 
 +    hour lt 9] 
 +   ==> 
 +   [operation set not_bizhours]. 
 + xrule th/4: 
 +   [today eq workday, 
 +    ​hour ​ in [9 to 17]] 
 +   ==> 
 +   [operation set bizhours]. 
 + 
 + xrule os/1: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq summer] 
 +   ==> 
 +   [therm_set set 27]. 
 + xrule os/2: 
 +   [operation eq bizhours, 
 +    ​season eq summer] 
 +   ==> 
 +   [therm_set set 24]. 
 + xrule os/3: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq spring] 
 +   ==> 
 +   [therm_set set 15]. 
 + xrule os/4: 
 +   [operation eq bizhours, 
 +    ​season eq spring] 
 +   ==> 
 +   [therm_set set 20]. 
 + xrule os/5: 
 +   [operation eq bizhours, 
 +    ​season eq winter] 
 +   ==> 
 +   [therm_set set 18]. 
 + xrule os/6: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq winter] 
 +   ==> 
 +   [therm_set set 14]. 
 + xrule os/7: 
 +   [operation eq not_bizhours,​ 
 +    ​season eq fall] 
 +   ==> 
 +   [therm_set set 16]. 
 + xrule os/8: 
 +   [operation eq bizhours, 
 +    ​season eq fall] 
 +   ==> 
 +   [therm_set set 20]. 
 + 
 +Translacja na SWRL: 
 + 
 +{{:​pl:​miw:​2009:​miw09_swrltrans:​projekt:​examples1-rt-out.txt|}}
  
 ====== Propozycje rozszerzeń ====== ====== Propozycje rozszerzeń ======
Linia 61: Linia 265:
         </​owlx:​ObjectPropertyValue> ​         </​owlx:​ObjectPropertyValue> ​
     </​owlx:​Individual>​     </​owlx:​Individual>​
-co odpowiadałoby zapisowi:+co odpowiadałoby zapisowi ​HMR:
   xschm ms: [month] ==> [season].   xschm ms: [month] ==> [season].
  
pl/miw/2009/miw09_swrltrans/projekt.1243609765.txt.gz · ostatnio zmienione: 2019/06/27 15:57 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0