Re: Sparql commands in rules

2014-09-04 Thread Miguel Bento Alves
Ok, Thanks (and my apologies for not having remembered to search in specifications). Miguel On 04 Sep 2014, at 12:19, Andy Seaborne a...@apache.org wrote: On 03/09/14 15:02, Miguel Bento Alves wrote: Hi Andy, My idea is replace any “” by a internal valid variable, ensuring

Re: Sparql commands in rules

2014-09-03 Thread Miguel Bento Alves
? Is there any place where this is defined? Miguel On 03 Sep 2014, at 11:38, Andy Seaborne a...@apache.org wrote: On 02/09/14 23:49, Miguel Bento Alves wrote: Hi Andy, n is illegal SPARQL, ok, but that does not means that can be used to refer a outer variable? The symbol “” can appear

Re: Sparql commands in rules

2014-09-02 Thread Miguel Bento Alves
with sparql commands. To finish, I only need to define the special char to make reference to outer variables (for now, and to develop the engine, I'm using a non-valid char). Miguel On 27 Aug 2014, at 18:51, Miguel Bento Alves mbentoal...@gmail.com wrote: Hi Andy, n is illegal SPARQL

[jira] [Updated] (JENA-650) Define SPARQL commands in Jena rules

2014-08-29 Thread Miguel Bento Alves (JIRA)
[ https://issues.apache.org/jira/browse/JENA-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Miguel Bento Alves updated JENA-650: Attachment: Files_created_changed.zip SparqlCommandsInRules.md

Re: Sparql commands in rules - GSoC update

2014-08-28 Thread Miguel Bento Alves
a...@apache.org wrote: On 28/08/14 22:31, Miguel Bento Alves wrote: Hi Andy, are you talking about update in GSoC? I already did that (today) and my repo is updated (https://github.com/mbentoalves/jena) . Attached I send the file that I updated in GSoC. I'm talking about: Could you

Re: Sparql commands in rules

2014-08-27 Thread Miguel Bento Alves
a...@apache.org wrote: On 19/08/14 16:03, Miguel Bento Alves wrote: Andy, Another approach is to use a named variable, parse the SPARQL query, which identifies variables, then rewrite the parsed structure to replace occurrences of variable 'n' by a specific value.” in a first glance

Re: Sparql commands in rules

2014-08-27 Thread Miguel Bento Alves
sequence)? Miguel On 19 Aug 2014, at 16:15, Andy Seaborne a...@apache.org wrote: On 19/08/14 16:03, Miguel Bento Alves wrote: Andy, Another approach is to use a named variable, parse the SPARQL query, which identifies variables, then rewrite the parsed structure to replace

Re: Sparql commands in rules - GSoC update

2014-08-25 Thread Miguel Bento Alves
Hi Andy, done. Sorry for fail some files. Miguel On 23 Aug 2014, at 10:18, Andy Seaborne a...@apache.org wrote: Miguel,, Could you please attach a patch file to JENA-650, one with the updated license headers? Thanks Andy 2/ Please fix the headers on new files: They

Re: GSoC - Sparql in rules

2014-08-19 Thread Miguel Bento Alves
$OntTestCase.runTest:130-ontTest:603 NullPointer On 18 Aug 2014, at 21:00, Andy Seaborne a...@apache.org wrote: On 15/08/14 12:01, Miguel Bento Alves wrote: Hi Andy, I updated all my code to the new version of Jena. My repo is https://github.com/mbentoalves/jena. I have a problem in building that I

Sparql commands in rules - GSoC update

2014-08-18 Thread Miguel Bento Alves
Dear Andy, attached I send the files that I will update to GSoC. Miguel miguel_alves.tar.gz Description: GNU Zip compressed data

Sparql commands in rules

2014-08-18 Thread Miguel Bento Alves
Dear all, I will start to develop an engine to evaluate rules that combines SPARQL commands with rule terms. The purpose is to be possible to define rules like: ex:SportsMan ex:minimumSportsPlayed 1 . ex:IronMan ex:minimumSportsPlayed 3 . (?x rdf:type ?t) - ?t

GSoC - Sparql in rules

2014-08-15 Thread Miguel Bento Alves
Hi Andy, I updated all my code to the new version of Jena. My repo is https://github.com/mbentoalves/jena. I have a problem in building that I couldn’t fix, give an error when I add the jena-arq to the dependencies of jena-core in test com.hp.hpl.jena.test.TestPackage. If I remove this test,

GSoC submission

2014-08-15 Thread Miguel Bento Alves
Hi Andy, What should be submitted to GSoC? The entire jena-core or only the files that I creates/changed? Miguel

Re: extract query patterns

2014-08-12 Thread Miguel Bento Alves
Hi Andy, with your example I can extract the triples but I can’t extract the sub-queries. Is there a simple way to extract the sub-queries from a query pattern? Miguel On 08 Aug 2014, at 21:10, Andy Seaborne a...@apache.org wrote: On 08/08/14 10:15, Miguel Bento Alves wrote: Hi all

Re: Sparql in rules - How's it going?

2014-08-12 Thread Miguel Bento Alves
with rule terms, as suggested by Dave. If the project must finish until 18, I will do in the same, outside of project. Miguel On 12 Aug 2014, at 16:27, Andy Seaborne a...@apache.org wrote: On 06/08/14 16:47, Miguel Bento Alves wrote: ... There is one piece of wrapping up which is to make sure

Re: Sparql in rules - How's it going?

2014-08-12 Thread Miguel Bento Alves
, Miguel Bento Alves wrote: Hi Andy, I finished the coding. I’m preparing the documentation and I will prepare the patch. In schedule that I presented in my document, the forecast for the end of the project was 29. In the remaining time, I wish to implement an engine to evaluate rules

extract query patterns

2014-08-08 Thread Miguel Bento Alves
Hi all, In a Sparql query, we can extract the query pattern ( q.getQueryPattern() ). For instance, in the sparql command: Select ?x ?p ?z where {?x ?p ?y . ?x eg:p ?z.} we can extract: { ?x ?p ?y . ?x eg:p ?z } Is there anyway to extract as TriplePattern?

Sparql in rules

2014-08-08 Thread Miguel Bento Alves
Hi All, I couldn't implement the hook between a Sparql command and rules terms. In my opinion, only make sense hook a Sparql command and rules terms if in the sparql command we can invoke variables from rules terms. Something like: (?x eg:p ?y), (\\\sparql Select ?z where {y

Re: Sparql in rules

2014-08-08 Thread Miguel Bento Alves
. It is possible but, as also mentioned, it might be better to start over with a fresh engine in that case. Dave On 08/08/14 11:23, Miguel Bento Alves wrote: Hi All, I couldn't implement the hook between a Sparql command and rules terms. In my opinion, only make sense hook a Sparql

Re: Sparql in rules - How's it going?

2014-08-06 Thread Miguel Bento Alves
file that captures your chnages and additions then attach to the GSoC JIRA.” Ok, I will do that. Miguel On 06 Aug 2014, at 15:28, Andy Seaborne a...@apache.org wrote: On 04/08/14 16:09, Miguel Bento Alves wrote: Hi Andy, Since my last update, I'm trying to combine term rules with sparql

Re: Sparql in rules - How's it going?

2014-08-04 Thread Miguel Bento Alves
Hi Andy, Since my last update, I'm trying to combine term rules with sparql commands in a same rule (forwardRETE mode). However, it has been very difficult, i'm not find out how I can do that. There are some issues about this that must be discussed with the community (e.g., syntax) but I will

Re: GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-24 Thread Miguel Bento Alves
Hi Andy, yes, the repo is updated. Miguel On 24 Jul 2014, at 14:15, Andy Seaborne a...@apache.org wrote: Miguel, Is github.com/mbentoalves/jena up-to-date? Andy On 22/07/14 12:45, Miguel Bento Alves wrote: Hi Andy, in a first glance, the problem stated in my email of 16

Re: GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-24 Thread Miguel Bento Alves
, Miguel Bento Alves wrote: Hi Andy, yes, the repo is updated. Miguel On 24 Jul 2014, at 14:15, Andy Seaborne a...@apache.org wrote: Miguel, Is github.com/mbentoalves/jena up-to-date? Andy On 22/07/14 12:45, Miguel Bento Alves wrote: Hi Andy, in a first glance, the problem

Re: GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-22 Thread Miguel Bento Alves
next steps, will be try to hook sparql commands with rule terms in a rule. Miguel On 21 Jul 2014, at 16:22, Andy Seaborne a...@apache.org wrote: On 19/07/14 00:10, Miguel Bento Alves wrote: Hi All, I did a new update in my repository (https://github.com/mbentoalves/jena). I implemented

GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-18 Thread Miguel Bento Alves
Hi All, I did a new update in my repository (https://github.com/mbentoalves/jena). I implemented Sparql commands in rules in hybrid and forward mode. Now, we can define sparql commands in rules in all engine modes (backward, forwardRETE, hybrid, forward). Rules with a sparql command only can

GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-16 Thread Miguel Bento Alves
Hi All, I updated again in my repository (https://github.com/mbentoalves/jena). In this version, I implemented Sparql commands in rules in forwardRETE mode. Now, I will work in the others modes (hybrid and forward). Only after that I will try to hook sparql commands with rules terms in a

GSoC - Jena 650 - Define SPARQL commands in Jena rules

2014-07-14 Thread Miguel Bento Alves
Hi All, I updated my repository (https://github.com/mbentoalves/jena). I implemented Sparql commands in rules in backward mode. For now, rules with a sparql command only can have 1 body term, the sparql command himself. My next step will be do the same for the forward mode. After that, I will

Re: GSoC : SPARQL in Rules : mid-term checkpoint

2014-06-26 Thread Miguel Bento Alves
Hi All, Below I list my report to mid-term evaluation. Miguel SPARQL commands in Jena rules - Mid-term evaluation 1. Introduction Define SPARQL commands in Jena rules is a project proposed in Apache’s JIRA, in project Apache Jena, and it goal is to allow the definition of SPARQL commands in

GSoC - Jena650 - Define SPARQL commands in Jena rules

2014-06-20 Thread Miguel Bento Alves
https://github.com/mbentoalves/jena With my last last update, a Sparql command in a rule can be parsed. Examples of valid rules with a Sparql command can be (look only to syntax, the rule doesn't have any meaning): [rule1: (\\\sparql Select ?c ?d where {?c eg:p ?d} \\\sparql) (?a eg:p ?b) (?b

Re: Using Jena with Apache Maven

2014-06-18 Thread Miguel Bento Alves
to a plugin problem with maven. Andy On 17/06/14 09:38, Andy Seaborne wrote: On 16/06/14 23:55, Miguel Bento Alves wrote: Hi all, I tried to create a maven repository in my machine as recommended in https://jena.apache.org/download/maven.html svn co https://svn.apache.org/repos/asf/jena

Using Jena with Apache Maven

2014-06-16 Thread Miguel Bento Alves
Hi all, I tried to create a maven repository in my machine as recommended in https://jena.apache.org/download/maven.html svn co https://svn.apache.org/repos/asf/jena/trunk/ Jena cd Jena mvn clean install (instead of Jena, my folder name is JenaMBA_JENA650) I got several errors in third step. I

processing of jena rules

2014-06-06 Thread Miguel Bento Alves
A doubt about processing of jena rules: new triples generated by rules are saved in the model? or processed in runtime, when the rule is invoked? for instance, I have the following triples: eg:A eg:p eg:B . eg:B eg:p eg:C . eg:C eg:p eg:D . and the rule: [rule1: (?a eg:p ?b) (?b

Re: JENA-650 - Define SPARQL commands in Jena rules (syntax)

2014-06-05 Thread Miguel Bento Alves
specific prefix in a given sparql command. Miguel On 04/06/14 10:23, Andy Seaborne a...@apache.org wrote: On 04/06/14 09:20, Miguel Bento Alves wrote: Hi Andy, I didn't foresee that cases. I will work on that. Without deep parsing you can't address all the cases

Re: JENA-650 - Define SPARQL commands in Jena rules (syntax)

2014-06-04 Thread Miguel Bento Alves
syntax. I don't have much experience in team development. How is the better way to share code with you? Miguel On 04/06/14 08:56, Andy Seaborne a...@apache.org wrote: On 03/06/14 17:15, Miguel Bento Alves wrote: Hi all, I'm working on JENA-650 - Define SPARQL commands in Jena rules, under

JENA-650 - Define SPARQL commands in Jena rules (syntax)

2014-06-03 Thread Miguel Bento Alves
Hi all, I'm working on JENA-650 - Define SPARQL commands in Jena rules, under GSoC project. Right now, I need to define the syntax to declare a SPARQL command in a rule. My proposal is to do as in rules, enclosed between parenthesis (some examples listed below). I need some feedback from you

JENA-650 - Define SPARQL commands in Jena rules

2014-05-25 Thread Miguel Bento Alves
Dear All, I'm working on JENA-650 - Define SPARQL commands in Jena rules under GSoC project. I'm starting to study and analyse the relevant libraries and the coding relevants to my work. Can anyone locate for me the libraries/classes where: a) a rule is parsed; b) a rule is executed; c) a

Re: GSoC routine

2014-05-20 Thread Miguel Bento Alves
Hi Andy, I couldn¹t begin yesterday, but I foresee this week do the following: - prepare the development environment; - prepare a first ³draft² of the work to be done with a schedule; - start to ³inspect² the code; This Friday, I will do a (small) report as you proposed.

Re: GSoC Jena 2014

2014-05-16 Thread Miguel Bento Alves
Hi Andy, Ready to start on 19th. Miguel On 25/04/14 15:28, Andy Seaborne a...@apache.org wrote: Welcome to Ying and Miguel, our GSoC students for 2014. Ying is working on JENA-625 (Data Tables, focusing on CSV-RDF support) and Miguel is working on JENA-650 (SPARQL in Jena rules)

GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-21 Thread Miguel Bento Alves
Enclosed I send my GSoC proposal to JENA-650 - Define SPARQL commands in Jena rules Miguel

Re: GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-11 Thread Miguel Bento Alves
that this idea is viable? Miguel On 11/03/14 12:59, Andy Seaborne a...@apache.org wrote: On 10/03/14 23:07, Miguel Bento Alves wrote: Hi Andy, Why not create a private word? Something like: (?r rdf:type ex:Square) - execSPARQL(select ?r where { ?r

Re: GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-10 Thread Miguel Bento Alves
) . }). Miguel On 10/03/14 15:16, Andy Seaborne a...@apache.org wrote: On 09/03/14 22:35, Miguel Bento Alves wrote: Hi Andy, I wonder if it might be better to build a new syntax for SPARQL Rules which is SPARQL inspired using BGPs Yes, it is a good possibility. You, better than me for sure, know

Re: GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-09 Thread Miguel Bento Alves
a...@apache.org wrote: On 05/03/14 10:09, Miguel Bento Alves wrote: Hi Andy, Below, a first draft how a SPARQL command can be defined in a Jena rule. In example 1) is defined that a given student is diligent in a given class if he doesn't fail more than 1 lesson of that class. As this command

Re: GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-05 Thread Miguel Bento Alves
talking about the same thing, do you have some concrete examples of what the SPARQL commands would look like? This isn't to fix the design in anyway, just to have an illustration of the ideas for the moment. Andy On 04/03/14 18:18, Miguel Bento Alves wrote: Dear all, I¹m Miguel Bento

[jira] [Created] (JENA-650) Define SPARQL commands in Jena rules

2014-03-04 Thread Miguel Bento Alves (JIRA)
Miguel Bento Alves created JENA-650: --- Summary: Define SPARQL commands in Jena rules Key: JENA-650 URL: https://issues.apache.org/jira/browse/JENA-650 Project: Apache Jena Issue Type: New

GSoC 2014 - Define SPARQL commands in Jena rules

2014-03-04 Thread Miguel Bento Alves
Dear all, I¹m Miguel Bento Alves, I¹m a Phd student in New University of Lisbon. I want to develop the project described below, that was proposed by myself, in Google Summer code 2014. I need a mentor with knowledge about how Jena is implemented to give me the guidelines to implement the project

JIRA proposal-Sparql rules

2014-03-03 Thread Miguel Bento Alves
Dear All, I'm preparing my JIRA proposal about defining SPARQL commands in rules and/or define rules based on Sparql commands. I need your help to see if there is any kind of overlapping between my proposal and JIRA proposal Jena-657 (SPARQL template queries). Is was already thought about how to

Re: Jena and Google Summer of Code

2014-02-28 Thread Miguel Bento Alves
Dear all, I'm working with jena framework, integrated with pellet, in the last months. In my opinion Jena would be more expressive if we could define SPARQL commands in rules and/or define rules based on Sparql commands. Something look alike is spin-rules, a SPARQL-based rule. I did a few tests

Jena OWL2 (and rules)

2013-12-02 Thread Miguel Bento Alves
Hi there, Jena does not provide OWL2, correct? My problem is that I want to use OWL2 inference, specifically to the qualified cardinalities inference (for instance, and is just an example, my class IronMan is defined as all sportsman that plays at least 3 sports). With Pellet I can do OWL2

Re: Jena OWL2 (and rules)

2013-12-02 Thread Miguel Bento Alves
= ... GenericRuleReasoner reasoner = new GenericRuleReasoner(rules); InfModel inf = ModelFactory.createInfModel(reasoner, myPelletModel); Dave On 02/12/13 13:57, Miguel Bento Alves wrote: Dear Dave, Thanks for your answer. Can you give a short example how I can put a jena rule-based inference model on top