Interlinking Discovery #SPARQL


Here is a Quick and Dirty quide how to discover interlinking between two datasets. To begin with, You must install Fuseki SPARQL server. . Create a directory in fuseki directory, for instance : mydata. Then start your SPARQL SERVER service

java -jar fuseki-server.jar --port 8000 --update --loc=data /mydata &

For the following example, we will use two datasets: Sider and Diseasome which are stored in different graphs.

s-put http://localhost:8000/ds/data http://localhost/sider sider.nt
s-put http://localhost:8000/ds/data http://localhost/diseasome diseasome.nt

Note that, you should know the list of classes of each dataset in advance before querying it. Consider an example, we know class side_effects in the sider dataset and class disease in the diseasome dataset, then we can execute the following query :

select * {
GRAPH <http://localhost/sider&gt;
{
?sideeffect a <http://www4.wiwiss.fu-berlin.de/sider/resource/sider/side_effects&gt; .
?sideeffect ?p1 ?disease .
}
GRAPH <http://localhost/diseasome&gt;
{
?disease a <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseasome/diseases&gt; .
}
}

Results :
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| sideeffect | p1 | disease |
========================================================================================================================================================================================
| <http://www4.wiwiss.fu-berlin.de/sider/resource/side_effects/C0027947&gt; | <http://www.w3.org/2002/07/owl#sameAs&gt; | <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/833&gt; |
| <http://www4.wiwiss.fu-berlin.de/sider/resource/side_effects/C0917801&gt; | <http://www.w3.org/2002/07/owl#sameAs&gt; | <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/613&gt; |
| <http://www4.wiwiss.fu-berlin.de/sider/resource/side_effects/C0009951&gt; | <http://www.w3.org/2002/07/owl#sameAs&gt; | <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/265&gt; |
| <http://www4.wiwiss.fu-berlin.de/sider/resource/side_effects/C0042514&gt; | <http://www.w3.org/2002/07/owl#sameAs&gt; | <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/1171&gt; |
| <http://www4.wiwiss.fu-berlin.de/sider/resource/side_effects/C0004134&gt; | <http://www.w3.org/2002/07/owl#sameAs&gt; | <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/117&gt; |

……

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s