An Introduction To The Semantic Web
470 likes | 591 Vues
Dive into the world of the Semantic Web, an innovative evolution of the current web that aims to provide structured data with well-defined meanings. By enabling machine-to-machine communication and improving data interoperability, the Semantic Web allows for more efficient information access and sharing. This introduction covers key concepts such as URIs, RDF, ontologies, and schemas, and illustrates how these elements help computers and people collaborate more effectively. Join us in exploring this transformative vision that extends far beyond traditional web applications.
An Introduction To The Semantic Web
E N D
Presentation Transcript
Information Access on the Web Find an mp3 of a song that was on the Billboard Top Ten that features a cowbell. The Cowbell Project - http://www.geekspeakweekly.com/cowbell/
The Semantic Web • A Vision Of Possibilities • “The Semantic Web is an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation.” • -- Tim Berners-Lee, James Hendler and OraLassila, The Semantic Web, Scientific American, May 2001
Importance Of URIs • The Semantic Web will build on the distributed nature of the Web: • No central naming authority • Schema definitions: • Not implied in applications (cf. Web browsers and HTML DTD) • Accessible in a machine-understandable format using a URI
What’s Needed • Semantics Shared schemas: conventions about declaring meaning Agreed ontologies (both terms and ‘rules’ as to how terms relate) Agreed data model (RDF) • Infrastructure Schema Registries to share schemas Common syntax (XML) • The Web for connectivity: URI, HTTP...
So what is the Semantic Web? • The semantic web is like the regular web, but its main unit is data, not pages • Data is online • Can link to other data in the same file or in other places on the web
What are the basic units? • URIs • Triples • subject – predicate – object • Ontology • Used for reasoning about data
Semantic Web • In the Semantic Web we will need: • Machines talking to machines – semantics need to be unambiguously declared • Joined-up data – enabling complex tasks based on information from various sources • Wide scope – from, say, home to government to commerce • Trust – both in data and who is saying it • This is not going to be easily achieved
How do we represent them? • History • XML, SHOE, DAML, OIL, DAML+OIL • RDF, RDFS, OWL
Standardization • World Wide Web Consortium (W3C) • http://w3.org
Classes • Concepts • Hierarchies • Multiple Inheritance allowed
Properties • (aka predicates) • Properties of classes • Object properties (connect instances of classes) • Datatype properties (connects an instance of a class to a literal value)
Instances • Instances of a class • The class is its type • Properties are used on instances • Can be of multiple types
Ontologies • Generally considered a collection of classes and properties • Files can contain any combination of instances, classes, and properties
Common Ontologies • Dublin Core • Word Net
Exercise 1 • List 10 things about yourself • Demographic info, job, age, personal info – whatever you like
Using rdf:about • To describe a resource: • <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”> • Ending a description • <rdf:Description rdf:about=“ http://www.example.com/example.rdf#foo”></rdf:Description> • <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”/>
Using rdf:ID • rdf:ID is a local definition instead of a global one • <rdf:Description rdf:about=“foo”>
Properties • To create a property <rdf:Property rdf:ID=“hasTitle”/> <rdf:Property rdf:about=“http://www.example.com/employment.rdf#hasTitle”/>
Exercise 2 • Create descriptions of the things and properties for the attributes in your list of info • <rdf:Description rdf:about=“http://www.example.com/example.rdf#foo”> <rdf:Property rdf:about=“http://www.example.com/employment.rdf#hasTitle”/>
Property With a literal (String) <rdf:Description rdf:ID=“Jen”> <hasTitle>Professor</hasTitle> </rdf:Description>
Property: With a resource as the object <rdf:Description rdf:ID=“Jen”> <hasTitle rdf:resource=“http://www.example.com/employment.rdf#Professor”/> </rdf:Description> OR • <rdf:Description rdf:ID=“Jen”> • <hasTitle rdf:resource=“#Professor”/> • </rdf:Description>
Striping <rdf:Description> <ex:editor> <rdf:Description> <ex:homePage> <rdf:Description> </rdf:Description> </ex:homePage> </rdf:Description> </ex:editor> </rdf:Description>
Benefits • Anyone can talk about any other resource (using rdf:about) • Allows for annotation and expansion of existing resources • New statements are joined into the graph
Purpose of RDF Schema • The purpose of RDF Schema is to provide an XML vocabulary to: • express classes and their (subclass) relationships. • define properties and associate them with classes. • The benefit of an RDF Schema is that it facilitates inferencing on your data, and enhanced searching.
Schema and Inference • With definitions of classes, domains, and ranges, information about a resource that is not explicit can be inferred from the data
RDFS Classes • Classes are categories into which resources can be grouped • Members of classes are instances • subClasses create a hierarchy of classes • Multiple inheritance is allowed
Properties • RDFS adds domains and ranges • Limit what types of objects can be the subject of a property and what types can be the object • SubProperty adds inheritance to properties • E.g. hasMother is a SubProperty of hasParent
Multiple Domains and Ranges • Multiple domains or ranges on a property are treated as intersection • Example: the property hasMother has a range of Female and also a range of Parent. That means the object of the property must be both a Parent and Female
Mapping and Aggregability • Instances of the same class can easily be aggregated from separate files • Using proper inferences, an instance does not need to be created as the proper type • Example: Find all the Females • Jen is a Female • Irene is a Parent • Jen hasMother Irene • We now know Irene is a Female because all objects of hasMother must be female
Other Additions • Rdfs:Container, a super class of the RDF containers • Labels and comments • rdfs:label - commonly used to give a real-world name to the resource being described • rdfs:comment - can be any text that you want to relate to the resource
Foundations • XML • RDF • RDFS • DAML+OIL • OWL
OWL • Three Species • OWL Lite • OWL DL • OWL Full
Equality • equivalentClass • equivalentProperty • sameAs • differentFrom • allDifferent
Example • ZipCode equivalentClass PostalCode • If zip code and postal code are supposed to be different - e.g. zip is for american addresses and postal is for foreign ones - then we can say they are different • ZipCode differentFrom PostalCode <owl:Class rdf:ID=“ZipCode”> <owl:differentFrom rdf:resource=“http://example.com/ont.owl#PostalCode/> </owl:Class>
Property Characteristics • inverseOf • hasParent is the inverseOf hasChild • TransitiveProperty • E.g. - ancestorOf - if Bob is an ancestorOf Joe and Joe is an ancestorOf Fred, then Bob is an ancestorOf Fred • SymmetricProperty • E.g. if Tom is marriedTo Michelle, then Michelle is marriedTo Tom • FunctionalProperty (unique value) • Wine hasMaker - hasMaker is functional (there can be only one) • InverseFunctionalProperty • The inverse of a functional property - makesWine is the inverse of hasMaker and is an inverseFunctionalProperty
Restrictions • Property Type Restrictions • allValuesFrom • The hasMother property has allValuesFrom the class Woman • someValuesFrom • The hasChild property has someValuesFrom the class Woman • Restricted Cardinality (can be 0 or 1 in Lite) • minCardinality • maxCardinality • Cardinality
Local Restrictions on Property Ranges • Instead of setting a range for a property, each class can have its own range • E.g. The range of eats for vegetarians is different than for non-vegetarians • Done with subclasses and a restriction <owl:Class rdf:ID="Vegetarian"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#eats"/> <owl:allValuesFrom rdf:resource="#VegetarianFood"/> </owl:Restriction> </rdfs:subClassOf>…
Combinations • unionOf (uses ParseType) • E.g. European Union Citizenship is the unionOf the citizenship of the member states • intersectionOf (uses ParseType) • E.g. Fire engines are found in the intersection of RedThings and Trucks • complementOf (used like subClassOf) • E.g. the complementOf livingThings are all things that are non-living • disjointWith (used like subClassOf) • E.g. Man and Woman are disjoint classes <owl:Class rdf:ID=“Man”/> <owl:Class rdf:ID=“Woman”> <owl:disjointWith rdf:resource=”#Man”/> </owl:Class>
Intersection Example <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class> <owl:equivalentClass rdf:resource="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#Food-Beverage-and-Tobacco-Products"/> </owl:Class> <owl:Class> <owl:equivalentClass rdf:resource="http://www.ksl.stanford.edu/projects/DAML/UNSPSC.daml#Meat"/> </owl:Class> </owl:intersectionOf> </owl:Class>
ComplementOf Example <owl:Class> <owl:intersectionOf> <owl:Class rdf:resource=”#Food"/> <owl:Class> <owl:complementOf> <owl:Class rdf:resource="#Meat"/> </owl:complementOf> </owl:Class> </owl:intersectionOf > </owl:Class>