- From: Anastasia Dimou <anastasia.dimou@ugent.be>
- Date: Mon, 26 Jan 2015 09:17:13 +0100
- To: semantic-web@w3.org, Stéphane Campinas <stephane.campinas@deri.org>
- CC: Tim Berners-Lee <timbl@w3.org>, Sebastian Samaruga <cognescent@gmail.com>
- Message-ID: <54C5F809.5030401@ugent.be>
Hi Stephane,
you could also consider RML [1], a language which allows you to map data
of any format to RDF and relies on the W3C-standardised R2RML [2].
The idea is that you use RML to define the rules to generate your
triples. The rules contain references (as your variables) to the input
(e.g. column names for CSV files) which are instantiated with values
from the input source.
The references are defined in a format relevant to the input source,
e.g. XPath expressions for XML data, and can be easily extendable for
any type of input.
There is an RML processor based on Sesame.
Kind regards,
Anastasia
[1] rml.io
[2] www.w3.org/TR/r2rml/
On Sun, Jan 25, 2015 at 6:43 PM, Sebastian Samaruga<cognescent@gmail.com
<mailto:cognescent@gmail.com>>wrote:
Why not just use PHP, JSP, Velocity or any other template engine for
the Web? After all, RDF is just some kind of markup. It then could
be processed by any kind of semantic tool and parameters to those
scripts could be used as search arguments for some kind of database
backend.
I'm currently working in a (very immature) project which takes
datasources (RDF, XML, JSON, CSV, relational databases, etc), tries
to merge similar data from those different sources (in the same or
different source formats), schema and vocabularies and exposes the
results as RDF triples, OWL ontology and an OData (www.odata.org
<http://www.odata.org/>) endpoint.
Any of those output mechanisms could use an XSL stylesheet to
accomplish the template part of the question with the advantage of
being able to populate the application with an upper-merge ontology
in which different resource terms fall and share meaning. Which is
also desired into the scope of the project application is being able
to infer when some term in some vocabulary is the same term of
another in other vocabulary. So, if I can infer that
${parameterName} is the same as "Abc Inc." it also will solve the
template question.
Work in progress:http://cognescent.googlecode.com
<http://cognescent.googlecode.com/>
Sebastian.
On Sat, Jan 24, 2015 at 6:52 PM, Tim Berners-Lee<timbl@w3.org
<mailto:timbl@w3.org>>wrote:
On 2014-05 -10, at 13:54, Stéphane Campinas
<stephane.campinas@deri.org <mailto:stephane.campinas@deri.org>>
wrote:
> Hi,
>
> Do you know of any tool that creates RDF statements based on
> some template ?
>
> For example, let's imagine I have the following template:
>
> <http://acme.org/${id}>
> <http://acme.org/$%7Bid%7D><http://acme.org/predicate1>
> <http://acme.org/predicate1>"${something}" .
> <http://acme.org/${id}>
> <http://acme.org/$%7Bid%7D><http://acme.org/predicate2>
> <http://acme.org/predicate2><http://acme.org/${person}>
> <http://acme.org/$%7Bperson%7D>.
>
>
> where/*${...}*/are variables. Then, by providing values for
> these variables, the following statements would be created:
>
> ${id} = e1 ${something} = blabla ${person} =
> john
>
> <http://acme.org/e1>
> <http://acme.org/e1><http://acme.org/predicate1>
> <http://acme.org/predicate1>"blabla" .
> <http://acme.org/e1>
> <http://acme.org/e1><http://acme.org/predicate2>
> <http://acme.org/predicate2><http://acme.org/john>
> <http://acme.org/john>.
>
You could use the cwm with n3 rules using log:uri to link
between URI string and the thing.
{ [] :id ?id; :something ?s; :person ?person .
( "http://acme.org/ <http://acme.org/$%7Bid%7D>" ?id )
string:concatenation [ is log:uri of ?e ].
( "http://acme.org/ <http://acme.org/$%7Bid%7D>" ?person
) string:concatenation [ is log:uri of ?p] .
} => {
?e <http://acme.org/predicate1>
<http://acme.org/predicate1> ?s .
?e <http://acme.org/predicate2> <http://acme.org/predicate2>
?p .
}
timbl
> Have you seen any such tool ?
>
> Thanks
> --
> Stephane Campinas
--
Anastasia Dimou
Received on Monday, 26 January 2015 08:19:11 UTC