18. wikp = en.wikipedia.org/wiki
dict = dictionary.reference.com/browse/
Ibdb = www.ibdb.com/production.php?id=
Long Name Short Name
wikp:
wikp:Harrison_ford
wikp:Hans_Solo
wikp:Harrison_ford_(silent_film_actor)
wikp:Duke_Nukem
dict:
22 dict:played?s=t&def=22
26 dict:played?s=t&def=26
27 dict:played?s=t&def=27
ibdb:
ibdb:7057
19. Harrison Ford Played Hans Solo
wikp:Harrison_ford dict:played?s=t&def=22 wikp:Hans_Solo
Harrison Ford Played in Rolling Stones
wikp:Harrison_ford_(silent_film_actor) dict:played?s=t&def=26 ibdb:7057
Harrison Ford Played Duke Nukem
wikp:Harrison_ford dict:played?s=t&def=27 wikp:Duke_Nukem
wikp = en.wikipedia.org/wiki
dict = dictionary.reference.com/browse/
Ibdb = www.ibdb.com/production.php?id=
20. Resource Description Framework
a framework for representing information in the Web.
- W3C
a framework for describing data through the “subject > predicate >
object” relationships. Where the “predicate” and “Object” can be
subsequent “Subjects” of more detailed descriptions (RDF is the idea
of “triples”). All Subject, Predicates, and Objects are defined by either
URI or Literals
- Me
“This is admittedly a pretty odd use of the word resource, but
alternatives like entity or thing, which might be more accurate, Have
their own issues. In any case, resource is the word used In semantics
-Semantic web for the working ontologist
Jim Hendler and Dean Allemang
21. “Played in” verses “Played”
http://Dictionary.reference.com/browse/played/?s=t&def=26
“Played In”
“Portrayed an character in”
“Played”
i n”
y ed
“ Pla
for
o m
ary.c wikp:Rollingstone,_Minnesota
t io n
n Dic
g i
thi n
No
23. Make one up
http://Art-Nicewicks-URL-Used-To-Globally-Define-Terms.comPlayedIn
Ipaddress 111.222.333.444 = Art-Nicewicks-URL-Used-To-Globally-Define-Terms.com
111.222.333.444Playin
Is there a easy way for me to say what this term “Playedin” means, without
Having to put up a website? … Is there some way I could just say a little
Data about the data …. Hmm … Metadata …
Note: Tim Berneers –lee wants all URIURL assigned
24. RDF schema
RDF Schema – Metadata about the data
There is a schema definition vocabulary for triples at “www.w3.org/TR/rdf-schema/#ch_”
rdfs = www.w3.org/TR/rdf-schema/#ch_”
myTerm = Art-Nicewicks-URL-Used-To-Globally-Define-Terms.com
MyTerm:playedIn rdfs:Label “Portrayed an character in”
25. Lets also use •dict:played?s=t&def=22
RDFS:Label to make •dict:played?s=t&def=26
•dict:played?s=t&def=27
it more readable •ibdb:7057
•wikp:Duke_Nukem
I’d like to say
“dict:played?s=t&def=22” RDFS:label “Acted”
“dict:played?s=t&def=27” RDFS:label “Played a Game”
“ibdb:7057” RDFS:label “The 1918 play called Rolling Stones”
“wikp:Duke_Nukem” RDFS:label “Duke Nukem the Video Game”
26. Our Triple Store
(Ambiguous)
Subject Predicate Object
• Harrison Ford Played Hans Solo
• Harrison Ford Played in Rolling Stones
• Harrison Ford Played Duke Nukem
27. Our Triple Store(Not Ambiguous)
Subject Predicate Object
dict:played?s=t&def=22 Rdfs:label “Acted ”
dict:played?s=t&def=27 Rdfs:label “Played a Game”
myTerm:PlayedIn Rdfs:label “Portrayed an character in”
ibdb:7057 Rdfs:label “The 1918 play called Rolling Stones”
wikp:Duke_Nukem” Rdfs:label “Duke Nukem the Video Game”
wikp:Harrison_ford dict:played?s=t&def=22 wikp:Hans_Solo
wikp:Harrison_ford_
myTerm:PlayedIn ibdb:7057
(silent_film_actor)
wikp:Harrison_ford dict:played?s=t&def=27 wikp:Duke_Nukem
wikp = en.wikipedia.org/wiki
dict = dictionary.reference.com/browse/
Ibdb = www.ibdb.com/production.php?id=
rdfs = www.w3.org/TR/rdf-schema/#ch_”
myTerm = Art-Nicewicks-URL-Used-To-Globally-Define-Terms.com
28. Our Triple Store
(Not Ambiguous)
Subject Predicate Object
ibdb:7057 Rdfs:label “The 1918 play called Rolling Stones”
wikp:Duke_Nukem” Rdfs:label “Duke Nukem the Video Game”
myTerm:PlayedIn Rdfs:label “Portrayed an character in”
dict:played?s=t&def=27 Rdfs:label “Played a Game”
wikp:Harrison_ford_ Rdfs:label “Harrison Ford of silent movies”
(silent_film_actor)
wikp:Harrison_ford dict:played?s=t&def=22 wikp:Hans_Solo
wikp:Harrison_ford_ myTerm:PlayedIn ibdb:7057
(silent_film_actor)
wikp:Harrison_ford dict:played?s=t&def=27 wikp:Duke_Nukem
Harrison Ford of the silent movies portrayed an character in The 1918 play called “Rolling Stones”
40. Lets collect a little more info (“is a”)
“Played” is a type of pretending
Hans Solo is a fictional character
Star Wars is a http://dbpedia.org/ontology/Film
Hans Solo is a character in the movie “star wars”
is a character in is a participation
41. Our Graph (now we can infer)
Is a
Inference
Is a type of
Played In
Properties
A character In Have classes
Is a
Is a Is a
type of
“Participation”
42. Properties and Classes
“Show”
“Film”
Rdfs:subClassOf
“Pretending”
“Acting”
Rdfs:subPropertyOf
43. “Movie Star” “Movie”
Domain Range
“property “values of a
Instance property”
of class”
“Performs In”
(Subject)
“Rdfs:Type” “Rdfs:Type”
“Performs In”
(Property)
Subject Predicate Object Triple
<wikp:Harrison_Ford> PerformedIn StarWars
PerformedIn Rdfs:Domain MovieStars
PerformedIn Rdfs:Range StarWars
54. Lets look at Dbpedia – First we need
A Query … SPARQL ~ SQL
SELECT Subject , ?Predicate , ?Object
FROM Subject_Predicate_Object_Table
WHERE
{ Subject =
“<http://dbpedia.org/resource/Harrison_Ford>"
and Not required in
?Predicate like ‘%’ and SQL, but we’ll leave
It here to help show
?Object like ‘%’ The differences
}
55. 1. The “from” is defaulted
2. The position infers the “Subject =“
3. No Quotes around URL
4. Use “{}” instead of ()
SELECT Subject , ?Predicate , ?Object
FROM Subject_Predicate_Object_Table
WHERE
{ Subject =
“<http://dbpedia.org/resource/Harrison_Ford>"
and
?Predicate like ‘%’ and
?Object like ‘%’
}
56. 5. Only the positional values with “?” in front are
inferred in the select list
6. No comma between items in select list
7. The “and” is inferred
8. The “like ‘%’” is inferred
SELECT Subject , ?Predicate , ?Object
FROM Subject_Predicate_Object_Table
WHERE
{ Subject =
<http://dbpedia.org/resource/Harrison_Ford>
and
?Predicate like ‘%’ and
?Object like ‘%’
}
60. Sparql Queries
The movies that were written by one of Harrison Fords wives ?
SELECT ?s ?p ?o WHERE
{
{
:Harrison_Ford dbpedia2:spouse ?o.
?s <http://dbpedia.org/property/writer> ?o
}
}
order by ?s
s callret-1 o
:E.T._the_Extra-Terrestrial dbpedia2:writer :Melissa_Mathison
:Kundun dbpedia2:writer :Melissa_Mathison
:The_Black_Stallion_%28film%29
dbpedia2:writer :Melissa_Mathison
:The_Escape_Artist dbpedia2:writer :Melissa_Mathison
:Twilight_Zone:_The_Movie dbpedia2:writer :Melissa_Mathison
62. Any Other repositories
SELECT ?s owl:sameAs ?o WHERE
{:Harrison_Ford owl:sameAs ?o.}
callret-0 callret-1 o
:Harrison_Ford owl:sameAs <
http://sw.opencyc.org/concept/Mx4rvup_m5wpE
:Harrison_Ford owl:sameAs >
<http://rdf.freebase.com/ns/m/0c0k1>
:Harrison_Ford owl:sameAs <http://data.linkedmdb.org/resource/actor/755>
63. Freebase or DBPedia
Both extract structured data from Wikipedia and make it available as RDF
Freebase and dbpedia have different schemas, different identifiers, and different
goals.
Freebase imports data from a wide variety of sources, not just Wikipedia, whereas
DBPedia focuses on just Wikipedia data
DBPedia is funded by grants/sponsorships from various organisations, while
Freebase is run by Metaweb, an incorporated company.
DBpedia has strong connections to the Semantic Web research community.
Freebase has strong connections to the open data / startup community.
DBpedia tools are developed by 3rd parties and the open-source community.
Freebase tools are developed by Metaweb and the Freebase community.
DBpedia lets you query its data via a SPARQL end point
Freebase lets you query its data via an MQL API