You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mohammed Alrokaimi <m7...@gmail.com> on 2015/01/23 21:15:18 UTC
Question
Hello dears,
I please wonder if i can turn the database table below into a graph using
Jena and how ??
*user*
*content_id*
*tag*
0
21
simulator
0
21
simulation
0
21
p2p
0
22
phone
0
22
t_easy
0
22
manual
0
22
c214
Where each content_id will be represented as node, tag will be properties
in nodes. where tow nodes will be connected if they have tags in common.
After that i wanna transverse this graph.
Is Jena support that ? if yes how is that please ?
RE: Question
Posted by "John A. Fereira" <ja...@cornell.edu>.
I am the maintainer of a project called "vivo-harvester", a suite of tools for ingesting data from a variety of formats into the VIVO semantic web application, but it could be used for just transforming and loading data into a triple store. Using a couple of tools one can ingest data in CSV, JSON, XML from a file or URL (or from a few specific web services) into a jena TDB. It can also D2RQ. It can be downloaded from: https://github.com/vivo-project/VIVO-Harvester Check out the develop branch.
-----Original Message-----
From: Andy Seaborne [mailto:andy@apache.org]
Sent: Friday, January 23, 2015 3:33 PM
To: users@jena.apache.org
Subject: Re: Question
On 23/01/15 20:22, Claude Warren wrote:
> Your data did not come through in a table format.
>
> Is the table really in a database or is it a CSV file or just how is
> it stored?
>
> In general, most conversions convert each column to a property and
> create a URI for each row. Then you can link them together by
> whatever property values are the same.
If just one table, as a CSV file, then jena-csv may help.
http://jena.apache.org/documentation/csv/
Otherwise look at tools such as D2RQ for database to RDF.
Andy
>
> Claude
>
> On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi
> <m7...@gmail.com>
> wrote:
>
>> Hello dears,
>> I please wonder if i can turn the database table below into a graph
>> using Jena and how ??
>>
>> *user*
>>
>> *content_id*
>>
>> *tag*
>>
>> 0
>>
>> 21
>>
>> simulator
>>
>> 0
>>
>> 21
>>
>> simulation
>>
>> 0
>>
>> 21
>>
>> p2p
>>
>> 0
>>
>> 22
>>
>> phone
>>
>> 0
>>
>> 22
>>
>> t_easy
>>
>> 0
>>
>> 22
>>
>> manual
>>
>> 0
>>
>> 22
>>
>> c214
>>
>>
>>
>>
>>
>> Where each content_id will be represented as node, tag will be
>> properties in nodes. where tow nodes will be connected if they have tags in common.
>> After that i wanna transverse this graph.
>> Is Jena support that ? if yes how is that please ?
>>
>
>
>
Re: Question
Posted by Andy Seaborne <an...@apache.org>.
On 23/01/15 20:22, Claude Warren wrote:
> Your data did not come through in a table format.
>
> Is the table really in a database or is it a CSV file or just how is it
> stored?
>
> In general, most conversions convert each column to a property and create a
> URI for each row. Then you can link them together by whatever property
> values are the same.
If just one table, as a CSV file, then jena-csv may help.
http://jena.apache.org/documentation/csv/
Otherwise look at tools such as D2RQ for database to RDF.
Andy
>
> Claude
>
> On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi <m7...@gmail.com>
> wrote:
>
>> Hello dears,
>> I please wonder if i can turn the database table below into a graph using
>> Jena and how ??
>>
>> *user*
>>
>> *content_id*
>>
>> *tag*
>>
>> 0
>>
>> 21
>>
>> simulator
>>
>> 0
>>
>> 21
>>
>> simulation
>>
>> 0
>>
>> 21
>>
>> p2p
>>
>> 0
>>
>> 22
>>
>> phone
>>
>> 0
>>
>> 22
>>
>> t_easy
>>
>> 0
>>
>> 22
>>
>> manual
>>
>> 0
>>
>> 22
>>
>> c214
>>
>>
>>
>>
>>
>> Where each content_id will be represented as node, tag will be properties
>> in nodes. where tow nodes will be connected if they have tags in common.
>> After that i wanna transverse this graph.
>> Is Jena support that ? if yes how is that please ?
>>
>
>
>
Re: Question
Posted by Mohammed Alrokaimi <m7...@gmail.com>.
Thank you,
Yes i have CSV file, and i'm not interested in users(the first column). but
i need to group tags by content id as it's shown in the figure above.
I want to inform you that my goal is to represent data of social network (i
have dataset from Bibsonomy
<http://www.kde.cs.uni-kassel.de/bibsonomy/dumps/>social network) by graph,
then i will transverse this graph and apply some algorithms (such as
Spread Activation function) over this graph to extract tags which belongs
to determine domain.
I think D2RQ is read-only RDF graphs
thanks in advance
On Fri, Jan 23, 2015 at 10:13 PM, Claude Warren <cl...@xenei.com> wrote:
> Seems like the user is all the same user. But If you have this in a CSV I
> agree with Andy, look at jena-csv.
>
> http://jena.apache.org/documentation/csv/
>
> On Fri, Jan 23, 2015 at 8:48 PM, Mohammed Alrokaimi <
> m7mdalroqimi@gmail.com>
> wrote:
>
> > I have the both two format (CSV and database table)
> > See this example about what i wanna do please
> >
> >
> > *user*
> >
> > *content_id*
> >
> > *tag*
> >
> > 0
> >
> > 21
> >
> > simulator
> >
> > 0
> >
> > 21
> >
> > simulation
> >
> > 0
> >
> > 21
> >
> > p2p
> >
> > 0
> >
> > 22
> >
> > phone
> >
> > 0
> >
> > 22
> >
> > t_easy
> >
> > 0
> >
> > 22
> >
> > manual
> >
> > 0
> >
> > 22
> >
> > c214
> >
> > 0
> >
> > 23
> >
> > Simulation
> >
> > 0
> >
> > 23
> >
> > sync
> >
> >
> >
> >
> >
> >
> > It is supposed to get this graph
> >
> > [image: Inline image 1]
> >
> > On Fri, Jan 23, 2015 at 8:22 PM, Claude Warren <cl...@xenei.com> wrote:
> >
> >> Your data did not come through in a table format.
> >>
> >> Is the table really in a database or is it a CSV file or just how is it
> >> stored?
> >>
> >> In general, most conversions convert each column to a property and
> create
> >> a
> >> URI for each row. Then you can link them together by whatever property
> >> values are the same.
> >>
> >> Claude
> >>
> >> On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi <
> >> m7mdalroqimi@gmail.com>
> >> wrote:
> >>
> >> > Hello dears,
> >> > I please wonder if i can turn the database table below into a graph
> >> using
> >> > Jena and how ??
> >> >
> >> > *user*
> >> >
> >> > *content_id*
> >> >
> >> > *tag*
> >> >
> >> > 0
> >> >
> >> > 21
> >> >
> >> > simulator
> >> >
> >> > 0
> >> >
> >> > 21
> >> >
> >> > simulation
> >> >
> >> > 0
> >> >
> >> > 21
> >> >
> >> > p2p
> >> >
> >> > 0
> >> >
> >> > 22
> >> >
> >> > phone
> >> >
> >> > 0
> >> >
> >> > 22
> >> >
> >> > t_easy
> >> >
> >> > 0
> >> >
> >> > 22
> >> >
> >> > manual
> >> >
> >> > 0
> >> >
> >> > 22
> >> >
> >> > c214
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > Where each content_id will be represented as node, tag will be
> >> properties
> >> > in nodes. where tow nodes will be connected if they have tags in
> common.
> >> > After that i wanna transverse this graph.
> >> > Is Jena support that ? if yes how is that please ?
> >> >
> >>
> >>
> >>
> >> --
> >> I like: Like Like - The likeliest place on the web
> >> <http://like-like.xenei.com>
> >> LinkedIn: http://www.linkedin.com/in/claudewarren
> >>
> >
> >
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>
Re: Question
Posted by Claude Warren <cl...@xenei.com>.
Seems like the user is all the same user. But If you have this in a CSV I
agree with Andy, look at jena-csv.
http://jena.apache.org/documentation/csv/
On Fri, Jan 23, 2015 at 8:48 PM, Mohammed Alrokaimi <m7...@gmail.com>
wrote:
> I have the both two format (CSV and database table)
> See this example about what i wanna do please
>
>
> *user*
>
> *content_id*
>
> *tag*
>
> 0
>
> 21
>
> simulator
>
> 0
>
> 21
>
> simulation
>
> 0
>
> 21
>
> p2p
>
> 0
>
> 22
>
> phone
>
> 0
>
> 22
>
> t_easy
>
> 0
>
> 22
>
> manual
>
> 0
>
> 22
>
> c214
>
> 0
>
> 23
>
> Simulation
>
> 0
>
> 23
>
> sync
>
>
>
>
>
>
> It is supposed to get this graph
>
> [image: Inline image 1]
>
> On Fri, Jan 23, 2015 at 8:22 PM, Claude Warren <cl...@xenei.com> wrote:
>
>> Your data did not come through in a table format.
>>
>> Is the table really in a database or is it a CSV file or just how is it
>> stored?
>>
>> In general, most conversions convert each column to a property and create
>> a
>> URI for each row. Then you can link them together by whatever property
>> values are the same.
>>
>> Claude
>>
>> On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi <
>> m7mdalroqimi@gmail.com>
>> wrote:
>>
>> > Hello dears,
>> > I please wonder if i can turn the database table below into a graph
>> using
>> > Jena and how ??
>> >
>> > *user*
>> >
>> > *content_id*
>> >
>> > *tag*
>> >
>> > 0
>> >
>> > 21
>> >
>> > simulator
>> >
>> > 0
>> >
>> > 21
>> >
>> > simulation
>> >
>> > 0
>> >
>> > 21
>> >
>> > p2p
>> >
>> > 0
>> >
>> > 22
>> >
>> > phone
>> >
>> > 0
>> >
>> > 22
>> >
>> > t_easy
>> >
>> > 0
>> >
>> > 22
>> >
>> > manual
>> >
>> > 0
>> >
>> > 22
>> >
>> > c214
>> >
>> >
>> >
>> >
>> >
>> > Where each content_id will be represented as node, tag will be
>> properties
>> > in nodes. where tow nodes will be connected if they have tags in common.
>> > After that i wanna transverse this graph.
>> > Is Jena support that ? if yes how is that please ?
>> >
>>
>>
>>
>> --
>> I like: Like Like - The likeliest place on the web
>> <http://like-like.xenei.com>
>> LinkedIn: http://www.linkedin.com/in/claudewarren
>>
>
>
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: Question
Posted by Mohammed Alrokaimi <m7...@gmail.com>.
I have the both two format (CSV and database table)
See this example about what i wanna do please
*user*
*content_id*
*tag*
0
21
simulator
0
21
simulation
0
21
p2p
0
22
phone
0
22
t_easy
0
22
manual
0
22
c214
0
23
Simulation
0
23
sync
It is supposed to get this graph
[image: Inline image 1]
On Fri, Jan 23, 2015 at 8:22 PM, Claude Warren <cl...@xenei.com> wrote:
> Your data did not come through in a table format.
>
> Is the table really in a database or is it a CSV file or just how is it
> stored?
>
> In general, most conversions convert each column to a property and create a
> URI for each row. Then you can link them together by whatever property
> values are the same.
>
> Claude
>
> On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi <
> m7mdalroqimi@gmail.com>
> wrote:
>
> > Hello dears,
> > I please wonder if i can turn the database table below into a graph
> using
> > Jena and how ??
> >
> > *user*
> >
> > *content_id*
> >
> > *tag*
> >
> > 0
> >
> > 21
> >
> > simulator
> >
> > 0
> >
> > 21
> >
> > simulation
> >
> > 0
> >
> > 21
> >
> > p2p
> >
> > 0
> >
> > 22
> >
> > phone
> >
> > 0
> >
> > 22
> >
> > t_easy
> >
> > 0
> >
> > 22
> >
> > manual
> >
> > 0
> >
> > 22
> >
> > c214
> >
> >
> >
> >
> >
> > Where each content_id will be represented as node, tag will be properties
> > in nodes. where tow nodes will be connected if they have tags in common.
> > After that i wanna transverse this graph.
> > Is Jena support that ? if yes how is that please ?
> >
>
>
>
> --
> I like: Like Like - The likeliest place on the web
> <http://like-like.xenei.com>
> LinkedIn: http://www.linkedin.com/in/claudewarren
>
Re: Question
Posted by Claude Warren <cl...@xenei.com>.
Your data did not come through in a table format.
Is the table really in a database or is it a CSV file or just how is it
stored?
In general, most conversions convert each column to a property and create a
URI for each row. Then you can link them together by whatever property
values are the same.
Claude
On Fri, Jan 23, 2015 at 8:15 PM, Mohammed Alrokaimi <m7...@gmail.com>
wrote:
> Hello dears,
> I please wonder if i can turn the database table below into a graph using
> Jena and how ??
>
> *user*
>
> *content_id*
>
> *tag*
>
> 0
>
> 21
>
> simulator
>
> 0
>
> 21
>
> simulation
>
> 0
>
> 21
>
> p2p
>
> 0
>
> 22
>
> phone
>
> 0
>
> 22
>
> t_easy
>
> 0
>
> 22
>
> manual
>
> 0
>
> 22
>
> c214
>
>
>
>
>
> Where each content_id will be represented as node, tag will be properties
> in nodes. where tow nodes will be connected if they have tags in common.
> After that i wanna transverse this graph.
> Is Jena support that ? if yes how is that please ?
>
--
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren