You can subscribe to this list here.
2012 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
From: Jos De R. <jos...@ag...> - 2014-12-23 11:34:15
|
Hi Douglas, Nice to see you back and hope all is fine! > You wrote euler.yap initially for YAP, and then made it also > work in SWI-Prolog. Since you already created it for YAP, you > didn't need to leverage the library('semweb/rdf_db') system. > Also you support .n3 such as : > <#Socrates> <#beliefs> { <#Socrates> a <#Mortal> }. > > and rules such as: > > {?P rdfs:range ?C. ?X ?P ?Y} => {?Y a ?C}. True. > So Question: > Did you find it would have been too much work to have made > SWI-Prolog existing > SemWeb rdf_assert/3-4 a form such as? > <#Socrates> <#beliefs> { <#Socrates> a <#Mortal> }. > > Would you needed to have made a bnode for that graph? Already since 1999 when our initial prototype was made in Java, we decided to use the p(s, o) representation for triples instead of the triple(s, p, o) representation. We have kept it since then as it is compact and performant (*): the memory load is around 4 million triples per gigabyte and there are like 2 indexes, the p index and either the s or o index on JITI basis. So this is basically a totally different design than the rdf/3 of library('semweb/rdf_db'). (*) https://github.com/josd/eyebmb Kind regards, Jos Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare |
From: Jos De R. <jos...@ag...> - 2014-09-05 20:53:33
|
Hi Andreas, The wrapper is not supporting the pipe | argument. The good news is that it still supports a kind of data uri's in the form of http://localhost/.context/your_url_encoded_n3 e.g. import euler.*; public class Test { public static void main(String[] args) { String[] eyeArgs1 = {"http://localhost/.contextcPREFIX%20%3A%20%3Chttp%3A%2F%2Fexample.org%2Ftry%23%3E%0A%0A%3As%20%3Ap%20%3Ao.", "--nope", "--pass"}; ProofEngine.runProofEngine(eyeArgs1, System.out, null); } } gives Id: euler.yap 7400 2014-09-05 15:29:56Z josd SWI-Prolog 6.6.6 (x86_64-linux): Aug 26 2014, 09:48:37 starting 19 [msec cputime] 17 [msec walltime] GET file:///tmp/eye_6201543957213593076.n3 SC=1 networking 1 [msec cputime] 0 [msec walltime]#Processed by Id: euler.yap 7400 2014-09-05 15:29:56Z josd #eye /tmp/eye_6201543957213593076.n3 --nope --pass PREFIX : <http://example.org/try#> TC=0 TP=0 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0:s :p :o. reasoning 1 [msec cputime] 0 [msec walltime]#ENDS 0.017 [sec] TC=0 TP=0 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 Kind regards, Jos Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare ---...@gm... wrote: -----To: eul...@li... From: ska...@gm... Date: 09/04/2014 04:00PM Subject: Re: [Eulersharp-users] Plugin native N3 code into Eye Hi Jos, thank you for your reply. I was out of the office so I couldn't test your suggestion properly. I got it working with the Windows Powershell but I haven't found a combination of arguments to get it working with the Java Wrapper API String[] eyeArgs1 = {"\"http://example.org/try#> :s :p :o. \"", "|", "--nope", "--swipl", "-", "--pass"}; ProofEngine.runProofEngine(eyeArgs1, System.out, null); This gives me the following output: Id: euler.yap 7396 2014-09-03 09:32:07Z josd SWI-Prolog 6.6.6 (i386-win32): May 28 2014, 12:09:03 starting 31 [msec cputime] 29 [msec walltime] #Processed by Id: euler.yap 7396 2014-09-03 09:32:07Z josd #eye http://example.org/try#> :s :p :o. | --nope --swipl - --pass Exception in thread "main" java.lang.RuntimeException: ** ERROR ** http://example.org/try#> :s :p :o. ** exec_error(C:\Users\...\AppData\Local\Temp\eye\windows\bin\wget --header="Accept: text/*" --header="Cache-Control: max-age=3600" -q "http://example.org/try#> :s :p :o. " -O c:/users/.../appdata/local/temp/pl_eye_804_2) at euler.Process.execute(Process.java:58) at euler.ProofEngine.executeProofEngine(ProofEngine.java:334) at euler.ProofEngine.runProofEngine(ProofEngine.java:64) I think this line is the command line of the Euler Sharp Engine: #eye http://example.org/try#> :s :p :o. | --nope --swipl - --pass So it seems that my combination of arguments is wrong because the eye command should be after the pipeline operator not at the beginning. Can you offer some insight? Greetings ---------------------------------------------------------------------------- Hi Andreas, EYE will typically read N3 from the web or from a file but it can actually also read from stdin like follows: $ printf "PREFIX : <http://example.org/try#>\n\n:s :p :o." | eye --nope - --pass Id: euler.yap 7366 2014-08-08 13:25:21Z josd SWI-Prolog 6.6.6 (x86_64-linux): Aug 10 2014, 22:42:58 starting 33 [msec cputime] 29 [msec walltime] |:GET - SC=1 networking 1 [msec cputime] 1 [msec walltime] #Processed by Id: euler.yap 7366 2014-08-08 13:25:21Z josd #eye --nope - --pass PREFIX : <http://example.org/try#>; :s :p :o. TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 reasoning 2 [msec cputime] 1 [msec walltime] #ENDS 0.031 [sec] TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 So stdin is indicated with - The --plugin command line switch is to plugin N3 P-code which is an intermediate code. See more details in http://eulersharp.sourceforge.net/2006/02swap/eye-note.txt Thanks for testing! Kind regards, Jos Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 http://www.agfahealthcare.com http://blog.agfahealthcare.com R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer Account BE20375104592856 | ING Belgium NV, B-1000 Brussels Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/_______________________________________________ Eulersharp-users mailing list Eul...@li... https://lists.sourceforge.net/lists/listinfo/eulersharp-users |
From: <ska...@gm...> - 2014-09-04 14:00:23
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><pre style="font-size: 12px; margin-top: 0px; margin-bottom: 0px; padding: 15px; border-width: 0px 0px 0px 1px; border-left-style: solid; border-left-color: rgb(229, 229, 229); outline: 0px; vertical-align: baseline; font-family: monospace, sans-serif; overflow: auto; color: rgb(85, 85, 85); line-height: 18px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><span style="color: rgb(0, 0, 0);"><span style="font-family: verdana, geneva, sans-serif;">Hi Jos, thank you for your reply. I was out of the office so I couldn't test your suggestion properly. I got it working with the Windows Powershell but I haven't found a combination of arguments to get it working with the Java Wrapper API</span> String[] eyeArgs1 = {"\"http://example.org/try#> :s :p :o. \"", "|", "--nope", "--swipl", "-", "--pass"}; ProofEngine.runProofEngine(eyeArgs1, System.out, null); <span style="font-family: verdana, geneva, sans-serif;">This gives me the following output:</span></span><span style="color: rgb(0, 0, 0); font-family: 'courier new', courier, monospace; font-size: 13px; line-height: 1.6em;"> </span></pre> <pre style="font-size: 12px; margin-top: 0px; margin-bottom: 0px; padding: 15px; border-width: 0px 0px 0px 1px; border-left-style: solid; border-left-color: rgb(229, 229, 229); outline: 0px; vertical-align: baseline; font-family: monospace, sans-serif; overflow: auto; color: rgb(85, 85, 85); line-height: 18px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><span style="font-family: 'courier new', courier, monospace; color: rgb(0, 0, 0); font-size: 13px; line-height: 1.6em;"> Id: euler.yap 7396 2014-09-03 09:32:07Z josd </span><span style="font-family: 'courier new', courier, monospace; color: rgb(0, 0, 0); font-size: 13px; line-height: 1.6em;"> SWI-Prolog 6.6.6 (i386-win32): May 28 2014, 12:09:03</span></pre> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"> starting 31 [msec cputime] 29 [msec walltime]<br/> #Processed by Id: euler.yap 7396 2014-09-03 09:32:07Z josd<br/> #eye http://example.org/try#> :s :p :o. | --nope --swipl - --pass</span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"> </span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"> Exception in thread "main" java.lang.RuntimeException: ** ERROR ** http://example.org/try#> :s :p :o. ** </span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"> exec_error(C:\Users\...\AppData\Local\Temp\eye\windows\bin\wget --header="Accept: text/*" --header="Cache-Control: max-age=3600" -q </span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"> "http://example.org/try#> :s :p :o. " -O c:/users/.../appdata/local/temp/pl_eye_804_2)<br/> at euler.Process.execute(Process.java:58)<br/> at euler.ProofEngine.executeProofEngine(ProofEngine.java:334)<br/> at euler.ProofEngine.runProofEngine(ProofEngine.java:64)</span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"> </div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace;"><span style="font-family:verdana,geneva,sans-serif;">I think this line is the command line of the Euler Sharp Engine:</span></span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"> </div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"><span style="font-family: 'courier new', courier, monospace; font-size: 12px; line-height: 19.2000007629395px;"> #eye http://example.org/try#> :s :p :o. | --nope --swipl - --pass</span></div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"> </div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">So it seems that my combination of arguments is wrong because the eye command should be after the pipeline operator not at the beginning.</div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"> </div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">Can you offer some insight?</div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;"> </div> <div style="font-family: Verdana; font-size: 12px; line-height: 19.2000007629395px;">Greetings</div> <pre style="margin-top: 0px; margin-bottom: 0px; padding: 15px; border-width: 0px 0px 0px 1px; border-left-style: solid; border-left-color: rgb(229, 229, 229); outline: 0px; vertical-align: baseline; font-family: monospace, sans-serif; overflow: auto; color: rgb(85, 85, 85); line-height: 18px; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">---------------------------------------------------------------------------- Hi Andreas, EYE will typically read N3 from the web or from a file but it can actually also read from stdin like follows: $ printf "PREFIX : <<a href="http://example.org/try#>\n\n:s" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://example.org/try#>\n\n:s</a> :p :o." | eye --nope - --pass Id: euler.yap 7366 2014-08-08 13:25:21Z josd SWI-Prolog 6.6.6 (x86_64-linux): Aug 10 2014, 22:42:58 starting 33 [msec cputime] 29 [msec walltime] |:GET - SC=1 networking 1 [msec cputime] 1 [msec walltime] #Processed by Id: euler.yap 7366 2014-08-08 13:25:21Z josd #eye --nope - --pass PREFIX : <<a href="http://example.org/try#>" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://example.org/try#></a>; :s :p :o. TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 reasoning 2 [msec cputime] 1 [msec walltime] #ENDS 0.031 [sec] TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 So stdin is indicated with - The --plugin command line switch is to plugin N3 P-code which is an intermediate code. See more details in <a href="http://eulersharp.sourceforge.net/2006/02swap/eye-note.txt" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://eulersharp.sourceforge.net/2006/02swap/eye-note.txt</a> Thanks for testing! Kind regards, Jos Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 <a href="http://www.agfahealthcare.com/" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://www.agfahealthcare.com</a> <a href="http://blog.agfahealthcare.com/" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://blog.agfahealthcare.com</a> R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer Account BE20375104592856 | ING Belgium NV, B-1000 Brussels Click on link to read important disclaimer: <a href="http://www.agfahealthcare.com/maildisclaimer" rel="nofollow" style="margin: 0px; padding: 0px; vertical-align: baseline; outline: none; color: rgb(0, 102, 153); text-decoration: none; -webkit-tap-highlight-color: rgb(0, 119, 170); background: transparent;">http://www.agfahealthcare.com/maildisclaimer</a> </pre></div></body></html> |
From: Jos De R. <jos...@ag...> - 2014-08-11 15:13:55
|
Hi Andreas, EYE will typically read N3 from the web or from a file but it can actually also read from stdin like follows: $ printf "PREFIX : <http://example.org/try#>\n\n:s :p :o." | eye --nope - --pass Id: euler.yap 7366 2014-08-08 13:25:21Z josd SWI-Prolog 6.6.6 (x86_64-linux): Aug 10 2014, 22:42:58 starting 33 [msec cputime] 29 [msec walltime] |:GET - SC=1 networking 1 [msec cputime] 1 [msec walltime] #Processed by Id: euler.yap 7366 2014-08-08 13:25:21Z josd #eye --nope - --pass PREFIX : <http://example.org/try#> :s :p :o. TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 reasoning 2 [msec cputime] 1 [msec walltime] #ENDS 0.031 [sec] TC=1 TP=2 BC=0 BP=0 PM=0 CM=0 FM=0 AM=0 So stdin is indicated with - The --plugin command line switch is to plugin N3 P-code which is an intermediate code. See more details in http://eulersharp.sourceforge.net/2006/02swap/eye-note.txt Thanks for testing! Kind regards, Jos Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 http://www.agfahealthcare.com http://blog.agfahealthcare.com R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer Account BE20375104592856 | ING Belgium NV, B-1000 Brussels Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer "Andreas Zindel" <ska...@gm...> wrote on 11/08/2014 13:58:06: > From: "Andreas Zindel" <ska...@gm...> > To: eul...@li..., > Date: 11/08/2014 13:58 > Subject: [Eulersharp-users] Plugin native N3 code into Eye > > Hello, > > I would like to know if it is possible to plug native N3 code into > the proof engine. From the documentation it seems that the --plugin > flag is allowing this but I'm unable to get it going. > > For example this: > > String[] eyeArgs1 = {"--nope", > "--swipl", > "localhost:8080/temp/rdfGraph.n3", > "localhost:8080/temp/rdfRule.n3", > "--pass"}; > > ByteArrayOutputStream out = new ByteArrayOutputStream(); > PrintStream ps = new PrintStream(out); > ProofEngine.runProofEngine(eyeArgs1, ps, null); > > seems to work fine. When I try to safe the content of the resources > into a string and use the --plugin flag it won't produce the right > results (at least to my knowledge) > > I tried something like this: > > String rdfGraphString= this.convertStreamToString(new URL > ("localhost:8080/temp/rdfGraph.n3").openStream()); > String rdfRuleString = this.convertStreamToString("localhost:8080/ > temp/rdfRule.n3").openStream()); > > String[] eyeArgs1 = {"--nope", > "--swipl", > "--plugin " + rdfGraphString, > "--plugin " + rdfRuleString, > "--pass"}; > > ByteArrayOutputStream out = new ByteArrayOutputStream(); > PrintStream ps = new PrintStream(out); > ProofEngine.runProofEngine(eyeArgs1, ps, null); > > However this doesn't seem to work right. Can someone tell me what > I'm doing wrong? > > Any help is appreciated. > > Greetings > > > ------------------------------------------------------------------------------ > _______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users |
From: Andreas Z. <ska...@gm...> - 2014-08-11 11:58:17
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello,</div> <div> </div> <div>I would like to know if it is possible to plug native N3 code into the proof engine. From the documentation it seems that the --plugin flag is allowing this but I'm unable to get it going.</div> <div> </div> <div>For example this:</div> <div> </div> <div>String[] eyeArgs1 = {"--nope",<br/> "--swipl",<br/> "localhost:8080/temp/rdfGraph.n3", <br/> "localhost:8080/temp/rdfRule.n3",<br/> "--pass"};<br/> <br/> ByteArrayOutputStream out = new ByteArrayOutputStream(); <br/> PrintStream ps = new PrintStream(out);<br/> ProofEngine.runProofEngine(eyeArgs1, ps, null);</div> <div> </div> <div>seems to work fine. When I try to safe the content of the resources into a string and use the --plugin flag it won't produce the right results (at least to my knowledge)</div> <div> </div> <div>I tried something like this:</div> <div> </div> <div>String rdfGraphString= this.convertStreamToString(new URL("localhost:8080/temp/rdfGraph.n3").openStream());<br/> String rdfRuleString = this.convertStreamToString("localhost:8080/temp/rdfRule.n3").openStream());</div> <div> </div> <div><span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;">String[] eyeArgs1 = {"--nope",</span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"> "--swipl",</span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"> "--plugin " + rdfGraphString, </span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"> "--plugin " + rdfRuleString,</span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"> "--pass"};</span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"> </span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;">ByteArrayOutputStream out = new ByteArrayOutputStream(); </span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;">PrintStream ps = new PrintStream(out);</span><br style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;"/> <span style="font-family: Verdana; font-size: 12px; line-height: 19.200000762939453px;">ProofEngine.runProofEngine(eyeArgs1, ps, null);</span></div> <div> </div> <div>However this doesn't seem to work right. Can someone tell me what I'm doing wrong?</div> <div> </div> <div>Any help is appreciated.</div> <div> </div> <div>Greetings</div> <div> </div> <div> </div></div></body></html> |
From: Jos De R. <jos...@ag...> - 2013-08-24 21:50:43
|
The EYE maven repo is now located at https://sourceforge.net/projects/eulersharp/files/eulersharp/maven2/ Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare |
From: Jos De R. <jos...@ag...> - 2013-03-19 10:05:20
|
Hi Andrae, This was indeed not working and we fixed it last month in [Euler-2013-02] see http://eulersharp.sourceforge.net/DONE [[ - quoted literals with no datatype IRI and no language tag have datatype xsd:string (obs from Turtle W3C CR) - extending quoted literals (obs from Turtle W3C CR) ]] That file release is at http://sourceforge.net/projects/eulersharp/files/eulersharp/Euler-2013-02/ It is also working fine with the latest snapshot file release http://sourceforge.net/projects/eulersharp/files/eulersharp/Euler-2013-03/ {("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"} => {:strs4 :result true} . {("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs5 :result true} . {("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs6 :result true} . entails #Processed by Id: euler.yap 6094 2013-03-17 23:33:07Z josd :strs4 :result true. :strs5 :result true. :strs6 :result true. Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare -----Andrae Muys <and...@gm...> wrote: ----- To: Jos De Roo/AMDUS/AGFA@AGFA From: Andrae Muys <and...@gm...> Date: 03/19/2013 03:30AM Cc: Boris De Vloed/AXGZE/AGFA@AGFA, eulersharp-users <eul...@li...> Subject: Re: [Eulersharp-users] Applying str:contains to xsd:string I just tried out the str:scrape predicate, and it appears that you haven't managed to relax the type and lang check on it. Checking the results below I see the test isn't against an xsd:string: > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape > "example.org"} => {:strs1 :result true}} a :PASS. > {{("{x" "{(.)") str:scrape "x"} => {:strs2 :result true}} a :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search > ("example.org" "1995")} => {:strs3 :result true}} a :PASS. My attempt to infer the conclusion below failed: { ("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"} => {:strs1 :result true} . As did: { ("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs1 :result true} . As did: { ("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs1 :result true} . It is my understanding that, despite the obvious pragmatic concerns, these are the semantics of the new Turtle/RDF1.1 specs. Cheers, Andrae On Fri, Feb 15, 2013 at 12:12 AM, Jos De Roo <jos...@ag...> wrote: > Hi Andrae, > Hi Boris, > > Thanks for the observation and after cross testing with cwm there is now an > updated EYE: > > $ svn commit -m "relaxing type and lang check of > http://www.w3.org/2000/10/swap/string builtins (obs from Andrae Muys)" > Sending 02swap/DONE > Sending 02swap/euler.yap > Transmitting file data .. > Committed revision 5993. > > > The following unit tests for str: builtins now pass: > > $ eye --swipl --nope http://eulersharp.sourceforge.net/2007/07test/biP.n3 > --query http://eulersharp.sourceforge.net/2007/07test/biQ.n3 2> /dev/null | > grep str: > @prefix str: <http://www.w3.org/2000/10/swap/string#>. > {{("eul" "er") str:concatenation "euler"} => {:strc1 :result true}} a :PASS. > {{("€" "Ø"@en-US) str:concatenation "€Ø"} => {:strc2 :result true}} a :PASS. > {{("test " "is \"ok\"") str:concatenation "test is \"ok\""} => {:strc3 > :result true}} a :PASS. > {{("test " "is \"ok\"") str:concatenation _:sk43. (_:sk43 " again") > str:concatenation "test is \"ok\" again"} => {:strc4 :result true}} a :PASS. > {{"Rob Smith"^^xsd:string str:contains "Smith"} => {:strcn1 :result true}} a > :PASS. > {{"2012-01-01T00:00:00+02:00"^^xsd:dateTime str:contains "02"} => {:strcn2 > :result true}} a :PASS. > {{"5.98"^^xsd:decimal str:contains "."} => {:strcn3 :result true}} a :PASS. > {{"Rob Smith"@en str:contains "Smith"@fr} => {:strcn4 :result true}} a > :PASS. > {{"Tim" str:containsIgnoringCase "IM"} => {:strci1 :result true}} a :PASS. > {{"abracadabra" str:matches "(a|b|r|c|d)+"} => {:strm1 :result true}} a > :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape > "example.org"} => {:strs1 :result true}} a :PASS. > {{("{x" "{(.)") str:scrape "x"} => {:strs2 :result true}} a :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search > ("example.org" "1995")} => {:strs3 :result true}} a :PASS. > {{"euler" str:startsWith "eu"} => {:strs4 :result true}} a :PASS. > > > Kind Regards, > > Jos De Roo | Agfa HealthCare > Senior Researcher | HE/Advanced Clinical Applications Research > T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 > > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > ________________________________ > R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE > 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer > Account BE20375104592856 | ING Belgium NV, B-1000 Brussels > > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer > > > > From: Boris De Vloed/AXGZE/AGFA@AGFA > To: Andrae Muys <and...@gm...> > Cc: eulersharp-users <eul...@li...> > Date: 12/02/2013 11:46 > Subject: Re: [Eulersharp-users] Applying str:contains to xsd:string > ________________________________ > > > > Dear Andrea, > > You can get the literal from a datatyped literal via log:dtlit. > > The extra rule would make it work. > > Not that instead of ?dt you could also use xsd:string > > @prefix : <http://local#> . > > @prefix str: <http://www.w3.org/2000/10/swap/string#> . > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix log: <http://www.w3.org/2000/10/swap/log#>. > > :Bob :name "Bob Smith" . > :Rob :name "Rob Smith"^^xsd:string . > > { ?P :name ?N . > ?N str:contains "Smith" } => { ?P :bingo ?N } . > > { ?P :name ?N . > (?lit ?dt) log:dtlit ?N. > ?lit str:contains "Smith" } => { ?P :bingo ?N } . > > Kind Regards, > > Boris De Vloed | Agfa HealthCare > Software Engineer | HE/Advanced Clinical Applications Research > T +32 444 81 34 | Skype bdevloed > > Agfa HealthCare NV - Gent , Moutstraat 100, 9000 Gent , Belgium > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > ________________________________ > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer > > -----Andrae Muys <and...@gm...> wrote: ----- > To: eul...@li... > From: Andrae Muys <and...@gm...> > Date: 12/02/2013 11:34 > Subject: [Eulersharp-users] Applying str:contains to xsd:string > > I have a dataset that contains a large number of resources I need to > reconcile against various existing data. The most straight forward > approach is to do some simple string comparisons between various > literals. > > Unfortunately the literals are typed xsd:string, and the builtin > str:contains isn't working on typed literals. > > I have read everything I can find on the eulersharp builtins and the > closest I could come is to try to cast the xsd:string to a > PlainLiteral using the rdf:PlainLiteral predicate from RIF; however, > this does not appear to be supported by EulerSharp. > > Has anyone found a way to manipulate xsd:strings? Or should I resort > to preprocessing the data to strip off the datatypes? > > Any help is appreciated. > > Thanks, > Andrae > > The following .n3 file demonstrates the problem: > > @prefix : <http://local#> . > > @prefix str: <http://www.w3.org/2000/10/swap/string#> . > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > > :Bob :name "Bob Smith" . > :Rob :name "Rob Smith"^^xsd:string . > > { ?P :name ?N . > ?N str:contains "Smith" } => { ?P :bingo ?N } . > > And the result of running the above file: > > $ eye --swipl test.n3 --pass --nope > Id: euler.yap 5974 2013-02-12 00:29:00Z josd > SWI-Prolog 5.10.4 (amd64): Dec 27 2011, 08:54:16 > starting 80 [msec cputime] 78 [msec walltime] > GET file:///home/ubuntu/src/test/test.n3 SC=4 > networking 0 [msec cputime] 2 [msec walltime] > #Processed by Id: euler.yap 5974 2013-02-12 00:29:00Z josd > #eye --swipl test.n3 --pass --nope > > @prefix : <http://local#>. > @prefix str: <http://www.w3.org/2000/10/swap/string#>. > @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. > @prefix var: <http://localhost/var#>. > @prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>. > @prefix r: <http://www.w3.org/2000/10/swap/reason#>. > @prefix n3: <http://www.w3.org/2004/06/rei#>. > > :Bob :name "Bob Smith". > :Rob :name "Rob Smith"^^xsd:string. > :Bob :bingo "Bob Smith". > > TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 > reasoning 0 [msec cputime] 4 [msec walltime] > > #ENDS 0 [msec] TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 > > -- > Andrae Muys > e:and...@gm... > t:@etymon > b:http://etymon.blogspot.com > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users------------------------------------------------------------------------------ > > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users > -- Andrae Muys e:and...@gm... t:@etymon b:http://etymon.blogspot.com |
From: Andrae M. <and...@gm...> - 2013-03-19 02:30:09
|
I just tried out the str:scrape predicate, and it appears that you haven't managed to relax the type and lang check on it. Checking the results below I see the test isn't against an xsd:string: > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape > "example.org"} => {:strs1 :result true}} a :PASS. > {{("{x" "{(.)") str:scrape "x"} => {:strs2 :result true}} a :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search > ("example.org" "1995")} => {:strs3 :result true}} a :PASS. My attempt to infer the conclusion below failed: { ("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"} => {:strs1 :result true} . As did: { ("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs1 :result true} . As did: { ("http://example.org/1995/manifesto"^^xsd:string "http://([^/]+)/([^/]+)") str:scrape "example.org"^^xsd:string} => {:strs1 :result true} . It is my understanding that, despite the obvious pragmatic concerns, these are the semantics of the new Turtle/RDF1.1 specs. Cheers, Andrae On Fri, Feb 15, 2013 at 12:12 AM, Jos De Roo <jos...@ag...> wrote: > Hi Andrae, > Hi Boris, > > Thanks for the observation and after cross testing with cwm there is now an > updated EYE: > > $ svn commit -m "relaxing type and lang check of > http://www.w3.org/2000/10/swap/string builtins (obs from Andrae Muys)" > Sending 02swap/DONE > Sending 02swap/euler.yap > Transmitting file data .. > Committed revision 5993. > > > The following unit tests for str: builtins now pass: > > $ eye --swipl --nope http://eulersharp.sourceforge.net/2007/07test/biP.n3 > --query http://eulersharp.sourceforge.net/2007/07test/biQ.n3 2> /dev/null | > grep str: > @prefix str: <http://www.w3.org/2000/10/swap/string#>. > {{("eul" "er") str:concatenation "euler"} => {:strc1 :result true}} a :PASS. > {{("€" "Ø"@en-US) str:concatenation "€Ø"} => {:strc2 :result true}} a :PASS. > {{("test " "is \"ok\"") str:concatenation "test is \"ok\""} => {:strc3 > :result true}} a :PASS. > {{("test " "is \"ok\"") str:concatenation _:sk43. (_:sk43 " again") > str:concatenation "test is \"ok\" again"} => {:strc4 :result true}} a :PASS. > {{"Rob Smith"^^xsd:string str:contains "Smith"} => {:strcn1 :result true}} a > :PASS. > {{"2012-01-01T00:00:00+02:00"^^xsd:dateTime str:contains "02"} => {:strcn2 > :result true}} a :PASS. > {{"5.98"^^xsd:decimal str:contains "."} => {:strcn3 :result true}} a :PASS. > {{"Rob Smith"@en str:contains "Smith"@fr} => {:strcn4 :result true}} a > :PASS. > {{"Tim" str:containsIgnoringCase "IM"} => {:strci1 :result true}} a :PASS. > {{"abracadabra" str:matches "(a|b|r|c|d)+"} => {:strm1 :result true}} a > :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape > "example.org"} => {:strs1 :result true}} a :PASS. > {{("{x" "{(.)") str:scrape "x"} => {:strs2 :result true}} a :PASS. > {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search > ("example.org" "1995")} => {:strs3 :result true}} a :PASS. > {{"euler" str:startsWith "eu"} => {:strs4 :result true}} a :PASS. > > > Kind Regards, > > Jos De Roo | Agfa HealthCare > Senior Researcher | HE/Advanced Clinical Applications Research > T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 > > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > ________________________________ > R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE > 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer > Account BE20375104592856 | ING Belgium NV, B-1000 Brussels > > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer > > > > From: Boris De Vloed/AXGZE/AGFA@AGFA > To: Andrae Muys <and...@gm...> > Cc: eulersharp-users <eul...@li...> > Date: 12/02/2013 11:46 > Subject: Re: [Eulersharp-users] Applying str:contains to xsd:string > ________________________________ > > > > Dear Andrea, > > You can get the literal from a datatyped literal via log:dtlit. > > The extra rule would make it work. > > Not that instead of ?dt you could also use xsd:string > > @prefix : <http://local#> . > > @prefix str: <http://www.w3.org/2000/10/swap/string#> . > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > @prefix log: <http://www.w3.org/2000/10/swap/log#>. > > :Bob :name "Bob Smith" . > :Rob :name "Rob Smith"^^xsd:string . > > { ?P :name ?N . > ?N str:contains "Smith" } => { ?P :bingo ?N } . > > { ?P :name ?N . > (?lit ?dt) log:dtlit ?N. > ?lit str:contains "Smith" } => { ?P :bingo ?N } . > > Kind Regards, > > Boris De Vloed | Agfa HealthCare > Software Engineer | HE/Advanced Clinical Applications Research > T +32 444 81 34 | Skype bdevloed > > Agfa HealthCare NV - Gent , Moutstraat 100, 9000 Gent , Belgium > http://www.agfahealthcare.com > http://blog.agfahealthcare.com > ________________________________ > Click on link to read important disclaimer: > http://www.agfahealthcare.com/maildisclaimer > > -----Andrae Muys <and...@gm...> wrote: ----- > To: eul...@li... > From: Andrae Muys <and...@gm...> > Date: 12/02/2013 11:34 > Subject: [Eulersharp-users] Applying str:contains to xsd:string > > I have a dataset that contains a large number of resources I need to > reconcile against various existing data. The most straight forward > approach is to do some simple string comparisons between various > literals. > > Unfortunately the literals are typed xsd:string, and the builtin > str:contains isn't working on typed literals. > > I have read everything I can find on the eulersharp builtins and the > closest I could come is to try to cast the xsd:string to a > PlainLiteral using the rdf:PlainLiteral predicate from RIF; however, > this does not appear to be supported by EulerSharp. > > Has anyone found a way to manipulate xsd:strings? Or should I resort > to preprocessing the data to strip off the datatypes? > > Any help is appreciated. > > Thanks, > Andrae > > The following .n3 file demonstrates the problem: > > @prefix : <http://local#> . > > @prefix str: <http://www.w3.org/2000/10/swap/string#> . > @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . > > :Bob :name "Bob Smith" . > :Rob :name "Rob Smith"^^xsd:string . > > { ?P :name ?N . > ?N str:contains "Smith" } => { ?P :bingo ?N } . > > And the result of running the above file: > > $ eye --swipl test.n3 --pass --nope > Id: euler.yap 5974 2013-02-12 00:29:00Z josd > SWI-Prolog 5.10.4 (amd64): Dec 27 2011, 08:54:16 > starting 80 [msec cputime] 78 [msec walltime] > GET file:///home/ubuntu/src/test/test.n3 SC=4 > networking 0 [msec cputime] 2 [msec walltime] > #Processed by Id: euler.yap 5974 2013-02-12 00:29:00Z josd > #eye --swipl test.n3 --pass --nope > > @prefix : <http://local#>. > @prefix str: <http://www.w3.org/2000/10/swap/string#>. > @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. > @prefix var: <http://localhost/var#>. > @prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>. > @prefix r: <http://www.w3.org/2000/10/swap/reason#>. > @prefix n3: <http://www.w3.org/2004/06/rei#>. > > :Bob :name "Bob Smith". > :Rob :name "Rob Smith"^^xsd:string. > :Bob :bingo "Bob Smith". > > TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 > reasoning 0 [msec cputime] 4 [msec walltime] > > #ENDS 0 [msec] TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 > > -- > Andrae Muys > e:and...@gm... > t:@etymon > b:http://etymon.blogspot.com > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb > _______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users------------------------------------------------------------------------------ > > Free Next-Gen Firewall Hardware Offer > Buy your Sophos next-gen firewall before the end March 2013 > and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users > -- Andrae Muys e:and...@gm... t:@etymon b:http://etymon.blogspot.com |
From: Jos De R. <jos...@ag...> - 2013-02-14 14:12:59
|
Hi Andrae, Hi Boris, Thanks for the observation and after cross testing with cwm there is now an updated EYE: $ svn commit -m "relaxing type and lang check of http://www.w3.org/2000/10/swap/string builtins (obs from Andrae Muys)" Sending 02swap/DONE Sending 02swap/euler.yap Transmitting file data .. Committed revision 5993. The following unit tests for str: builtins now pass: $ eye --swipl --nope http://eulersharp.sourceforge.net/2007/07test/biP.n3 --query http://eulersharp.sourceforge.net/2007/07test/biQ.n3 2> /dev/null | grep str: @prefix str: <http://www.w3.org/2000/10/swap/string#>. {{("eul" "er") str:concatenation "euler"} => {:strc1 :result true}} a :PASS. {{("€" "Ø"@en-US) str:concatenation "€Ø"} => {:strc2 :result true}} a :PASS. {{("test " "is \"ok\"") str:concatenation "test is \"ok\""} => {:strc3 :result true}} a :PASS. {{("test " "is \"ok\"") str:concatenation _:sk43. (_:sk43 " again") str:concatenation "test is \"ok\" again"} => {:strc4 :result true}} a :PASS. {{"Rob Smith"^^xsd:string str:contains "Smith"} => {:strcn1 :result true}} a :PASS. {{"2012-01-01T00:00:00+02:00"^^xsd:dateTime str:contains "02"} => {:strcn2 :result true}} a :PASS. {{"5.98"^^xsd:decimal str:contains "."} => {:strcn3 :result true}} a :PASS. {{"Rob Smith"@en str:contains "Smith"@fr} => {:strcn4 :result true}} a :PASS. {{"Tim" str:containsIgnoringCase "IM"} => {:strci1 :result true}} a :PASS. {{"abracadabra" str:matches "(a|b|r|c|d)+"} => {:strm1 :result true}} a :PASS. {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:scrape "example.org"} => {:strs1 :result true}} a :PASS. {{("{x" "{(.)") str:scrape "x"} => {:strs2 :result true}} a :PASS. {{("http://example.org/1995/manifesto" "http://([^/]+)/([^/]+)") str:search ("example.org" "1995")} => {:strs3 :result true}} a :PASS. {{"euler" str:startsWith "eu"} => {:strs4 :result true}} a :PASS. Kind Regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research T +32 3444 7618 | F +32 3 444 8211 | M +32 494 56 03 95 http://www.agfahealthcare.com http://blog.agfahealthcare.com R.O.: Septestraat 27, B-2640 Mortsel, Belgium | RLE Antwerp | VAT BE 0403.003.524 | IBAN Operational Account BE81363012356224 | IBAN Customer Account BE20375104592856 | ING Belgium NV, B-1000 Brussels Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer From: Boris De Vloed/AXGZE/AGFA@AGFA To: Andrae Muys <and...@gm...> Cc: eulersharp-users <eul...@li...> Date: 12/02/2013 11:46 Subject: Re: [Eulersharp-users] Applying str:contains to xsd:string Dear Andrea, You can get the literal from a datatyped literal via log:dtlit. The extra rule would make it work. Not that instead of ?dt you could also use xsd:string @prefix : <http://local#> . @prefix str: <http://www.w3.org/2000/10/swap/string#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix log: <http://www.w3.org/2000/10/swap/log#>. :Bob :name "Bob Smith" . :Rob :name "Rob Smith"^^xsd:string . { ?P :name ?N . ?N str:contains "Smith" } => { ?P :bingo ?N } . { ?P :name ?N . (?lit ?dt) log:dtlit ?N. ?lit str:contains "Smith" } => { ?P :bingo ?N } . Kind Regards, Boris De Vloed | Agfa HealthCare Software Engineer | HE/Advanced Clinical Applications Research T +32 444 81 34 | Skype bdevloed Agfa HealthCare NV - Gent , Moutstraat 100, 9000 Gent , Belgium http://www.agfahealthcare.com http://blog.agfahealthcare.com Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer -----Andrae Muys <and...@gm...> wrote: ----- To: eul...@li... From: Andrae Muys <and...@gm...> Date: 12/02/2013 11:34 Subject: [Eulersharp-users] Applying str:contains to xsd:string I have a dataset that contains a large number of resources I need to reconcile against various existing data. The most straight forward approach is to do some simple string comparisons between various literals. Unfortunately the literals are typed xsd:string, and the builtin str:contains isn't working on typed literals. I have read everything I can find on the eulersharp builtins and the closest I could come is to try to cast the xsd:string to a PlainLiteral using the rdf:PlainLiteral predicate from RIF; however, this does not appear to be supported by EulerSharp. Has anyone found a way to manipulate xsd:strings? Or should I resort to preprocessing the data to strip off the datatypes? Any help is appreciated. Thanks, Andrae The following .n3 file demonstrates the problem: @prefix : <http://local#> . @prefix str: <http://www.w3.org/2000/10/swap/string#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . :Bob :name "Bob Smith" . :Rob :name "Rob Smith"^^xsd:string . { ?P :name ?N . ?N str:contains "Smith" } => { ?P :bingo ?N } . And the result of running the above file: $ eye --swipl test.n3 --pass --nope Id: euler.yap 5974 2013-02-12 00:29:00Z josd SWI-Prolog 5.10.4 (amd64): Dec 27 2011, 08:54:16 starting 80 [msec cputime] 78 [msec walltime] GET file:///home/ubuntu/src/test/test.n3 SC=4 networking 0 [msec cputime] 2 [msec walltime] #Processed by Id: euler.yap 5974 2013-02-12 00:29:00Z josd #eye --swipl test.n3 --pass --nope @prefix : <http://local#>. @prefix str: <http://www.w3.org/2000/10/swap/string#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix var: <http://localhost/var#>. @prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>. @prefix r: <http://www.w3.org/2000/10/swap/reason#>. @prefix n3: <http://www.w3.org/2004/06/rei#>. :Bob :name "Bob Smith". :Rob :name "Rob Smith"^^xsd:string. :Bob :bingo "Bob Smith". TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 reasoning 0 [msec cputime] 4 [msec walltime] #ENDS 0 [msec] TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 -- Andrae Muys e:and...@gm... t:@etymon b:http://etymon.blogspot.com ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Eulersharp-users mailing list Eul...@li... https://lists.sourceforge.net/lists/listinfo/eulersharp-users ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Eulersharp-users mailing list Eul...@li... https://lists.sourceforge.net/lists/listinfo/eulersharp-users |
From: Boris De V. <bor...@ag...> - 2013-02-12 10:46:37
|
Dear Andrea, You can get the literal from a datatyped literal via log:dtlit. The extra rule would make it work. Not that instead of ?dt you could also use xsd:string @prefix : <http://local#> . @prefix str: <http://www.w3.org/2000/10/swap/string#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix log: <http://www.w3.org/2000/10/swap/log#>. :Bob :name "Bob Smith" . :Rob :name "Rob Smith"^^xsd:string . { ?P :name ?N . ?N str:contains "Smith" } => { ?P :bingo ?N } . { ?P :name ?N . (?lit ?dt) log:dtlit ?N. ?lit str:contains "Smith" } => { ?P :bingo ?N } . Kind Regards, Boris De Vloed | Agfa HealthCare Software Engineer | HE/Advanced Clinical Applications Research T +32 444 81 34 | Skype bdevloed Agfa HealthCare NV - Gent , Moutstraat 100, 9000 Gent , Belgium http://www.agfahealthcare.com http://blog.agfahealthcare.com Click on link to read important disclaimer: http://www.agfahealthcare.com/maildisclaimer -----Andrae Muys <and...@gm...> wrote: ----- To: eul...@li... From: Andrae Muys <and...@gm...> Date: 12/02/2013 11:34 Subject: [Eulersharp-users] Applying str:contains to xsd:string I have a dataset that contains a large number of resources I need to reconcile against various existing data. The most straight forward approach is to do some simple string comparisons between various literals. Unfortunately the literals are typed xsd:string, and the builtin str:contains isn't working on typed literals. I have read everything I can find on the eulersharp builtins and the closest I could come is to try to cast the xsd:string to a PlainLiteral using the rdf:PlainLiteral predicate from RIF; however, this does not appear to be supported by EulerSharp. Has anyone found a way to manipulate xsd:strings? Or should I resort to preprocessing the data to strip off the datatypes? Any help is appreciated. Thanks, Andrae The following .n3 file demonstrates the problem: @prefix : <http://local#> . @prefix str: <http://www.w3.org/2000/10/swap/string#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . :Bob :name "Bob Smith" . :Rob :name "Rob Smith"^^xsd:string . { ?P :name ?N . ?N str:contains "Smith" } => { ?P :bingo ?N } . And the result of running the above file: $ eye --swipl test.n3 --pass --nope Id: euler.yap 5974 2013-02-12 00:29:00Z josd SWI-Prolog 5.10.4 (amd64): Dec 27 2011, 08:54:16 starting 80 [msec cputime] 78 [msec walltime] GET file:///home/ubuntu/src/test/test.n3 SC=4 networking 0 [msec cputime] 2 [msec walltime] #Processed by Id: euler.yap 5974 2013-02-12 00:29:00Z josd #eye --swipl test.n3 --pass --nope @prefix : <http://local#>. @prefix str: <http://www.w3.org/2000/10/swap/string#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix var: <http://localhost/var#>. @prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>. @prefix r: <http://www.w3.org/2000/10/swap/reason#>. @prefix n3: <http://www.w3.org/2004/06/rei#>. :Bob :name "Bob Smith". :Rob :name "Rob Smith"^^xsd:string. :Bob :bingo "Bob Smith". TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 reasoning 0 [msec cputime] 4 [msec walltime] #ENDS 0 [msec] TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 -- Andrae Muys e:and...@gm... t:@etymon b:http://etymon.blogspot.com ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Eulersharp-users mailing list Eul...@li... https://lists.sourceforge.net/lists/listinfo/eulersharp-users |
From: Andrae M. <and...@gm...> - 2013-02-12 10:33:56
|
I have a dataset that contains a large number of resources I need to reconcile against various existing data. The most straight forward approach is to do some simple string comparisons between various literals. Unfortunately the literals are typed xsd:string, and the builtin str:contains isn't working on typed literals. I have read everything I can find on the eulersharp builtins and the closest I could come is to try to cast the xsd:string to a PlainLiteral using the rdf:PlainLiteral predicate from RIF; however, this does not appear to be supported by EulerSharp. Has anyone found a way to manipulate xsd:strings? Or should I resort to preprocessing the data to strip off the datatypes? Any help is appreciated. Thanks, Andrae The following .n3 file demonstrates the problem: @prefix : <http://local#> . @prefix str: <http://www.w3.org/2000/10/swap/string#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . :Bob :name "Bob Smith" . :Rob :name "Rob Smith"^^xsd:string . { ?P :name ?N . ?N str:contains "Smith" } => { ?P :bingo ?N } . And the result of running the above file: $ eye --swipl test.n3 --pass --nope Id: euler.yap 5974 2013-02-12 00:29:00Z josd SWI-Prolog 5.10.4 (amd64): Dec 27 2011, 08:54:16 starting 80 [msec cputime] 78 [msec walltime] GET file:///home/ubuntu/src/test/test.n3 SC=4 networking 0 [msec cputime] 2 [msec walltime] #Processed by Id: euler.yap 5974 2013-02-12 00:29:00Z josd #eye --swipl test.n3 --pass --nope @prefix : <http://local#>. @prefix str: <http://www.w3.org/2000/10/swap/string#>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix var: <http://localhost/var#>. @prefix e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>. @prefix r: <http://www.w3.org/2000/10/swap/reason#>. @prefix n3: <http://www.w3.org/2004/06/rei#>. :Bob :name "Bob Smith". :Rob :name "Rob Smith"^^xsd:string. :Bob :bingo "Bob Smith". TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 reasoning 0 [msec cputime] 4 [msec walltime] #ENDS 0 [msec] TC=4 TP=8 BC=0 BP=5 PM=0 CM=0 FM=0 AM=0 -- Andrae Muys e:and...@gm... t:@etymon b:http://etymon.blogspot.com |
From: <jos...@ag...> - 2012-03-14 21:33:35
|
Hi Nathan, There is no requirement for built-ins that the list of arguments is also a bnode. The only point is that the reasoner is not automatically assembling lists terms from list descriptions. Maybe you were confused by the bnodes in the conclusion of {?l a rdf:List. ?l rdf:first ?f. ?l rdf:rest ?r} => {?l :list_literal [ rdf:first ?f; rdf:rest ?r]}. Another maybe less confusing way to assemble list terms from list descriptions is {?l a rdf:List. ?l rdf:first ?f. ?l rdf:rest ?r. ((?f) ?r) list:append ?ll} => {?l :list_literal ?ll}. Your example gives the expected output i.e. :Deck :list_literal (_:e2 _:e3 _:e4). :Not :list_literal (_:e5). and those bnodes are some things (can be one or *more* things) and there is absolutely no way for func:except to identify them. The identication is no problem when you use uniform resource identifiers (uri's): :Deck a rdf:List; rdf:first :aceOfhearts; rdf:rest (:twoOfSpades :tenOfDiamonds). :Not a rdf:List; rdf:first :tenOfDiamonds; rdf:rest rdf:nil. :aceOfhearts a :Card; :suit :hearts; :rank :ace. :twoOfSpades a :Card; :suit :spades; :rank :two. :tenOfDiamonds a :Card; :suit :diamonds; :rank :ten. {:Deck :list_literal ?f. :Not :list_literal ?n. (?f ?n) func:except ?Q} => {?Q :the :rest}. which gives the expected :Deck :list_literal (:aceOfhearts :twoOfSpades :tenOfDiamonds). :Not :list_literal (:tenOfDiamonds). (:aceOfhearts :twoOfSpades) :the :rest. or when you use list terms :Deck a rdf:List; rdf:first (:ace :hearts); rdf:rest ((:two :spades) (:ten :diamonds)). :Not a rdf:List; rdf:first (:ten :diamonds); rdf:rest rdf:nil. {:Deck :list_literal ?f. :Not :list_literal ?n. (?f ?n) func:except ?Q} => {?Q :the :rest}. which gives :Deck :list_literal ((:ace :hearts) (:two :spades) (:ten :diamonds)). :Not :list_literal ((:ten :diamonds)). ((:ace :hearts) (:two :spades)) :the :rest. Your full example looks interesting and it will work out :-) Thanks for testing! Jos Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare -----Nathan Cain <inv...@gm...> wrote: ----- To: Jos De Roo/AMDUS/AGFA@AGFA From: Nathan Cain <inv...@gm...> Date: 03/14/2012 08:41PM Cc: eul...@li... Subject: Re: Questions about Euler and list builtins Hi Jos, First, thank you for your prompt and helpful reply. If I am understanding correctly, the basic gist of it is that in order for the built-ins to consider a list node as being a list the node must also be a bnode. Is this a correct assessment? This approach certainly seems to work fine for most of the built-in predicates, but we are still running into some issues. In particular, func:except seems to have some very strange behavior. I've reduced a basic test case: :Deck a rdf:List ; rdf:first [ a :Card ; :suit cards:hearts ; :rank cards:ace ] ; rdf:rest ( [ a :Card ; :suit cards:spades ; :rank cards:two ] [a :Card ; :suit cards:diamonds ; :rank cards:ten] ) . :Not a rdf:List; rdf:first [a :Card ; :suit cards:diamonds ; :rank cards:ten]; rdf:rest rdf:nil. {:Deck :list_literal ?f. :Not :list_literal ?n. (?f ?n) func:except ?Q} => {?Q :the :rest}. This results in a list that is identical to :Deck, "(_:e7 _:e8 _:e9) :the :rest." which seems to have not removed the appropriate element. I've included below the example rule set that this small test was reduced from. The goal is to randomize the ordering of elements in the list. Again, any help/pointers you could provide would be greatly appreciated. Thanks, --Nathan Cain ####### shuffle.n3 ####### {?l a rdf:List. ?l rdf:first ?f. ?l rdf:rest ?r} => {?l :list_literal [ rdf:first ?f; rdf:rest ?r]}. (111 3) :shuffleCards :res. #base case. { (?Seed 1) :shuffleCards ?Cards . (?Seed) prolog:srandom true . :Deck :list_literal ?L2 . ?L2 prolog:length ?RCCount . (?RCCount) prolog:random ?RAND . (?L2 ?RAND) func:get ?Card . } => { ?Cards a rdf:List ; rdf:first ?Card ; rdf:rest rdf:nil . } . { (?Seed ?Count) :shuffleCards ?Cards . ?Count log:notEqualTo 1 . ?Count log:notEqualTo 0 . (?Count 1) math:difference ?Tcount . } => { (?Seed ?Tcount) :shuffleCards ?DrawnCards . } . { (?Seed ?Count) :shuffleCards ?Cards . ?Count log:notEqualTo 1 . ?Count log:notEqualTo 0 . (?Count 1) math:difference ?Tcount . (?Seed ?Tcount) :shuffleCards ?DrawnCards . :Deck :list_literal ?L2 . ?DrawnCards :list_literal ?DC. (?L2 ?DC) func:except ?RemainingCards . ?q e:findall (?SS {?Cards rdf:rest ?SS} ()). ?RemainingCards prolog:length ?RCCount . (?RCCount) prolog:random ?RAND . (?RemainingCards ?RAND) func:get ?Card . } => { ?Cards a rdf:List ; rdf:first ?Card ; rdf:rest ?DrawnCards . # :foo :bar (2 ?Count ?L2 ?DrawnCards ?RemainingCards ?RCCount) . } . |
From: <jos...@ag...> - 2012-03-13 23:29:38
|
Hi Nathan, Thanks for testing and the behavior is as expected :) All rif and prolog built-ins are working with list literals and you have to construct them explictly from list descriptions: :l a rdf:List. :l rdf:first 1. :l rdf:rest (2 3). {?l a rdf:List. ?l rdf:first ?f. ?l rdf:rest ?r} => {?l :list_literal [ rdf:first ?f; rdf:rest ?r]}. {:l :list_literal ?l. ?l prolog:length ?x} => {?x :the :answer}. which passes :l a rdf:List. :l rdf:first 1 . :l rdf:rest (2 3). :l :list_literal (1 2 3). 3 :the :answer. Hope this helps.. Jos Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare -----Nathan Cain <inv...@gm...> wrote: ----- To: Jos De Roo/AMDUS/AGFA@AGFA From: Nathan Cain <inv...@gm...> Date: 03/13/2012 10:43PM Subject: Questions about Euler and list builtins Hello, We are attempting to prototype an application using Euler for inference, and are running into a problem that I suspect may constitute a bug. It seems that built-in predicates related to lists work fine against literal lists, but fail against any "constructed" list. As an example, "{ (1 2 3) prolog:length ?x } => {?x :the :answer}." works fine, but something like ":l a rdf:List. :l rdf:first 1. :l rdf:rest (2 3). { :l prolog:length ?x } => {?x :the :answer}." fails to unify. Is this expected behavior? If so, what is the correct way to go about using the built-in predicates with a non-literal list? Thank you in advance for any assistance you can provide! --Nathan Cain |
From: Ruben V. <rub...@ug...> - 2012-02-12 13:39:06
|
Hi Jos, Thanks for the update. Works perfectly on Darwin, too! Best, Ruben On 09 Feb 2012, at 11:18, jos...@ag... wrote: > Ruben, > > W.r.t. the issue you recently had: > > $ eye --nope --pass http://notes.restdesc.org/2012/tmp/labels_en_3000.nt > a=0x100400000 > Id: euler.yap 5050 2012-02-01 16:52:17Z josd > YAP 6.2.2 (i386-darwin10.8.0): Tue Oct 4 10:34:58 CEST 2011 > starting 43 [msec cputime] 38 [msec walltime] > % > % > % YAP OOOPS: likely bug in YAP, segmentation violation. > % > % > > Exiting .... > > there was the good news that it worked with the "latest" YAP 6.2.2 > > A few days ago Vitor made some other fixes and so there is now > a new stable YAP 6.2.3 which runs fine with all EYE tests. > > > Kind regards, > > Jos De Roo | Agfa HealthCare > Senior Researcher | HE/Advanced Clinical Applications Research > http://www.agfa.com/w3c/jdroo > http://twitter.com/josderoo > > Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium > http://www.agfa.com/healthcare > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Eulersharp-users mailing list > Eul...@li... > https://lists.sourceforge.net/lists/listinfo/eulersharp-users |
From: <jos...@ag...> - 2012-02-09 16:18:47
|
Ruben, W.r.t. the issue you recently had: $ eye --nope --pass http://notes.restdesc.org/2012/tmp/labels_en_3000.nt a=0x100400000 Id: euler.yap 5050 2012-02-01 16:52:17Z josd YAP 6.2.2 (i386-darwin10.8.0): Tue Oct 4 10:34:58 CEST 2011 starting 43 [msec cputime] 38 [msec walltime] % % % YAP OOOPS: likely bug in YAP, segmentation violation. % % Exiting .... there was the good news that it worked with the "latest" YAP 6.2.2 A few days ago Vitor made some other fixes and so there is now a new stable YAP 6.2.3 which runs fine with all EYE tests. Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare |
From: <jos...@ag...> - 2012-02-05 22:28:15
|
OK Kind regards, Jos De Roo | Agfa HealthCare Senior Researcher | HE/Advanced Clinical Applications Research http://www.agfa.com/w3c/jdroo http://twitter.com/josderoo Agfa HealthCare NV, Moutstraat 100, B-9000 Gent, Belgium http://www.agfa.com/healthcare |