semantic web series 1 mohammad m. r. cowdhury unik, kjeller

18
Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Upload: samuel-blankenship

Post on 25-Dec-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Semantic Web

Series 1

Mohammad M. R. Cowdhury

UniK, Kjeller

Page 2: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Contents• Semantic Web• RDF• RDF: labeled edge• FOAF• FOAF syntax• FOAF syntax: defining group• FOAF syntax: linking two persons• FOAF syntax: merging two foaf files • Further issues

Page 3: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Semantic Web• Express the data and meaning in standard machine-readable format,

make data easier for machine to find, access and process ---- >

semantic Web approach • Semantic Web allows machines to integrate data scattered around

the web (web of data)• It provides framework to share data on the web across application

boundaries. • Summary: The Semantic Web enables computers to seek out

knowledge distributed throughout the Web, mesh it, and then take action based on it ---- > make useful for human ends.

Page 4: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

RDF• The issues are to create relations among resources (data/knowledge)

on the web and to interchange/share those data. • Resource description framework (RDF) is the W3C standard for

encoding knowledge. The most exciting uses of RDF aren't in encoding information about web resources, but information about and relations between things in the real world: people, places, concepts, etc.

• The RDF Specifications build on URI and XML technologies (XML-based syntax for encoding).

• RDF provides a general, flexible method to decompose knowledge into small pieces (triplets: subject, predicate and object), with some rules about the semantics (meaning) of those pieces.

• RDF statement is a directed, labelled graph. Each edge (in the graph) represents relation between two things/a fact.

Page 5: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

• The edge in the example from the node Mushfiq labeled Member of to the node Communication group represents the fact that Mushfiq is a member of “Communication group"

• Triplets: A fact represented this way has three parts: a subject (start of the edge: Mushfiq), a predicate (label of edge: Member of), and an object (end of the edge: Communication group).

RDF: labeled edge

Page 6: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Observation --- expectation• Mushfiq, Josef each having documents containing pictures and papers ---

decentralized

• Mushfiq, Josef members of Communication group of UniK, can access each other’s conf. papers but cant access the pictures, only family members can see these ---- partition data, add privacy

• Mushfiq knows Manav. So, Manav can see which group Mushfiq belongs to. But cant see the other members of the group (Manav not a member of Communication group). ----- add privacy

Page 7: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

FOAF• FOAF: Friend of a friend, technically it is an RDF/XML vocabulary,

FOAF uses RDF to encode its descriptions. • Community driven effort• FOAF documents are machine readable/processable web pages to

describe people (about themselves, their interests, location etc.) and relations to computers (so computers can interpret it).

• It is a useful building block/tool to manage communities (ex. Community directory ---- > if everyone in an online community submits a URL pointing to a FOAF file, it is possible to spider them into a reasonable community directory)

• In FOAF vocabulary, a FOAF file contains link (--- > see also) to other files create a unified database of information

Page 8: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

FOAF Syntax• Class

– Subclass• Property

• Class foaf:agent

• Subclass foaf:person subclass of foaf:agent represents person; all people are considered agent in FOAF. More example – foaf:document, foaf:image

• foaf:group represents a collection of individual agents (persons)

• Property foaf:name, foaf:mbox, foaf:homepage, foaf:nick (nickname), foaf:depiction properties of foaf:person

• foaf:name A name of something, simple texttual string

• foaf:mbox A personal mailbox

• foaf:mbox_Sha1sum Applying SHA1 function to a mail

• foaf:homepage A homepage for something

• Foaf:workplacehomepage A homepage of workplace of a person

• foaf:img Image of something

Page 9: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">

<foaf:Person>

<foaf:name >Edd Dumbill</foaf:name>

<foaf:mbox rdf:resource="mailto:[email protected]" />

<foaf:nick >edd</foaf:nick>

<foaf:workplacehomepage rdf:resource="http://xml.com/" />

<foaf:depiction rdf:resource="http://heddley.com/edd/images/edd-shoulders.jpg"/>

</foaf:Person>

</rdf:RDF>

Example of use of FOAF vocabulary, class, properties.

FOAF Syntax (cont.)

Page 10: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Example of defining a group in FOAF files Lets see a RDF statement ---- a labelled graph

FOAF Syntax: defining group

Libby Miller ILRT Staffmember

workplace hom

epage

hom

epag

e

Subject

http://ilrt.org/people/libby/ http://www.ilrt.bris.ac.uk/

predicate

object

Page 11: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

(rdf line is ignored)<foaf:Group>

<foaf:name>ILRT staff</foaf:name>

<foaf:member>

<foaf:Person>

<foaf:name>Libby Miller</foaf:name>

<foaf:homepage rdf:resource="http://ilrt.org/people/libby/"/>

<foaf:workplaceHomepage rdf:resource="http://www.ilrt.bris.ac.uk/"/>

</foaf:Person>

</foaf:member>

</foaf:Group>

• foaf:Group representing those people who are ILRT staff members.

• foaf:member property of the foaf:Group to indicate the agents (person) that are members of the group

• the rule is that all group members are in the ILRTStaffPerson class, which is in turn populated by all those things that are a foaf:Person and which have a foaf:workplaceHomepage of http://www.ilrt.bris.ac.uk/

Subject

predicate

object

FOAF Syntax: defining group

Page 12: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

• foaf:knows Interesting property, can be used to link two people together

”Edd knows a person who has the mailbox [email protected] and the name of the person is Simon St.Laurent.” ---- > lets see the code

FOAF Syntax: linking two persons

Page 13: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

<foaf:Person>

<foaf:name>Edd Dumbill</foaf:name>

<foaf:mbox rdf:resource="mailto:[email protected]" />

...

<foaf:knows>

<foaf:Person>

<foaf:mbox rdf:resource="mailto:[email protected]" /> <foaf:name>Simon St.Laurent</foaf:name>

</foaf:Person>

</foaf:knows>

</foaf:Person> FOAF will use the mailboxes to actually make the link to Simon, rather than

any other property. A program can link facts together by virtue of the shared foaf:mbox property.

----- > merging of two files is also possible

FOAF Syntax: linking two persons

Page 14: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">

<foaf:Person>

<foaf:name>Edd Dumbill</foaf:name>

<foaf:mbox rdf:resource="mailto:[email protected]" />

</foaf:Person>

<foaf:Person>

<foaf:name>Simon St.Laurent</foaf:name>

<foaf:mbox rdf:resource="mailto:[email protected]" />

</foaf:Person>

<foaf:Person> <foaf:name>Eric van der Vlist</foaf:name>

<foaf:mbox rdf:resource="mailto:[email protected]" />

</foaf:Person>

</rdf:RDF>

A simple description of three colleagues using individual foaf:mbox

• The next file indicating depiction of two people (Edd and Simon) --- > We will see merging/linking using foaf:mbox

FOAF Syntax: merging two foaf files

Page 15: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">

<foaf:Person>

<foaf:mbox rdf:resource="mailto:[email protected]" />

<foaf:depiction rdf:resource="http://example.org/photos/edd+simon.jpg" /> </foaf:Person>

<foaf:Person>

<foaf:mbox rdf:resource="mailto:[email protected]" />

<foaf:depiction rdf:resource="http://example.org/photos/edd+simon.jpg" /> </foaf:Person>

</rdf:RDF>

• Simon and Edd are both depicted in a particular photograph available at http://example.org/photos/edd+simon.jpg

• To process (merging of the last two FOAF files) the data, enforce the rule “If person A has the same foaf:mbox property as person B, then A and B are the same entity.”

• After this processing has been done, what the system knows --- > next page

FOAF Syntax: merging two foaf files

Page 16: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">

<foaf:Person> <foaf:name>Edd Dumbill</foaf:name> <foaf:mbox rdf:resource="mailto:[email protected]" /> <foaf:depiction rdf:resource="http://example.org/photos/edd+simon.jpg" />

</foaf:Person> <foaf:Person> <foaf:name>Simon St.Laurent</foaf:name> <foaf:mbox rdf:resource="mailto:[email protected]" /> <foaf:depiction rdf:resource="http://example.org/photos/edd+simon.jpg" />

</foaf:Person> <foaf:Person> <foaf:name>Eric van der Vlist</foaf:name> <foaf:mbox rdf:resource="mailto:[email protected]" /> </foaf:Person> </rdf:RDF>

FOAF Syntax: merging two foaf files

Page 17: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

• By aggregating and merging the FOAF files, you can achieve the same effect as operating a centralized directory service.

• Attractive features for many communities for which decentralized or developed control is requirement.

FOAF Syntax: merging two foaf files

Page 18: Semantic Web Series 1 Mohammad M. R. Cowdhury UniK, Kjeller

Further issues• How can you control the data so it stays within a community of trust?• How can you partition data so some information remains private (for

instance, ”Person X distrusts person Y”), while other information is published to the world?