• Keine Ergebnisse gefunden

Semantic Web Technologies:

N/A
N/A
Protected

Academic year: 2022

Aktie "Semantic Web Technologies:"

Copied!
41
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

haw-hamburg.de

Semantic Web Technologies:

Examples

• Representing Knowledge:

Modelling Thesauri and such

• Web Ontology Language for Services (OWL-S)

• The Semantic of Hyperlinks

(2)

schmidt@informatik.

haw-hamburg.de

Representing Knowledge

• In the Semantic Web we want to discover and apply knowledge …

• More specifically: we want to built ontologies from existing knowledge and use these for inference …

• Practical approach:

- Take available taxonomies, thesauri, etc. and formulate them in OWL

- Use reasoner to apply OWL model

• Inject knowledge into applications

(3)

haw-hamburg.de

Example:

ACM Computing

Classification System

(4)

schmidt@informatik.

haw-hamburg.de

Simple RDFS Approach:

ACM (XML):

<node id="B." label="Hardware">

<isComposedBy>

<node id="B.0" label="GENERAL" />

<node id="B.1" label="CONTROL STRUCTURES ">

<isComposedBy>

<node id="B.1.1" label="Control Design Styles">

Hardware

Control Structures

Control Design Styles

rdfs:subClassOF rdfs:subClassOF

OWL:

<owl:Class rdf:ID=“CONTROL STRUCTURES">

<rdfs:subClassOf rdf:resource=“#Hardware”/>

</owl:Class>

(5)

haw-hamburg.de

ACM Relations

<node id="B." label="Hardware">

<isComposedBy>

<node id="B.0" label="GENERAL" />

<node id="B.1" label="CONTROL STRUCTURES ">

<isRelatedTo>

<node id="D.3.2" label=“Languages" />

</isRelatedTo>

<isComposedBy>

<node id="B.1.1" label="Control Design Styles">

Hardware

Control Structures

Control Design Styles

rdfs:subClassOF rdfs:subClassOF

Languages ACM:isRelatedTo

(6)

schmidt@informatik.

haw-hamburg.de

Additional Property: “Relation”

• Not expressible in a class hierarchy

• Can be characterised in OWL & applied

• transitive, symmetric …

• But: class-valued (≠ rdf:type …)

⇒ OWL Full needed

⇒ Expression of simple thesauri problematic in OWL

(7)

haw-hamburg.de

A Simpler Example

Books on Lions:

:TheAfricanLionBook a :Book ;

:bookTitle "The African Lion" ; dc:subject :AfricanLion

:AfricanLion

a owl:Class;

rdfs:subClassOf :Lion

Typical problem:

:BookAboutAnimals a owl:Class ; rdfs:subClassOf

[ a owl:Restriction ;

owl:someValuesFrom :AnimalClass ; owl:onProperty dc:subject

]

(8)

schmidt@informatik.

haw-hamburg.de

OWL DL Approaches (I)

Individuals in parallel

:LionsLifeInThePrideBook a :Book ;

:bookTitle "Lions: Life in the Pride" ; dc:subject :LionSubject

Now:

:BookAboutAnimals a owl:Class ; rdfs:subClassOf

[ a owl:Restriction ;

owl:someValuesFrom :Animal ; owl:onProperty dc:subject

]

(9)

haw-hamburg.de

OWL DL Approaches (II)

Unspecified

class members

:LionsLifeInThePrideBook a :BookAboutAnimals ; [ a owl:Restriction ;

owl:onProperty dc:subject ; owl:someValuesFrom :Lion ];

:bookTitle "Lions: Life in the Pride" ;

Now:

BookAboutAnimals predefined

http://www.w3.org/TR/swbp-classes-as-values/

(10)

Use case:

ACM Computing Classification System

schmidt@informatik.

haw-hamburg.de

• ACMCCS 1998 (latest version) http://www.acm.org/class

• Widely used in classification of conference papers and articles in computer sciences.

• Structure:

– 11 first level nodes

– Each list of children for a first or second level node contains at least one General (0) node and one Miscellaneous (m) node.

– Contains ‘see also’ references between certain nodes

• Represent in processable Ontology (not OWL Full)

A.

General Literature

A.0 General

A.2 Reference

A.1

Introductory and Survey

A.m Miscellaneous

A.0.0 Biographies/

autobiographies A.0.1

Conference Proceedings

A.0.2 General literary works

(11)

haw-hamburg.de

Use case: Scenario

Idea

• Classify content according to ACMCCS98

• Enhance search mechanisms by using ACMCCS98 scheme to discover related information

ToDo

• Add classifier to content

• Build ontology representation of ACMCCS98

• Implement application logic ☺

(12)

schmidt@informatik.

haw-hamburg.de

SKOS

• SKOS = Simple Knowledge Organisation Systems (http://www.w3.org/2004/02/skos/)

• Outcome of the European SWAD project

• Meta Model for representing thesauri a.s.

• Built as RDF Schema with OWL property characteristics

• Semantic of ‘Concepts’ less restrictive than OWL classes

• Provides association of (several) words or phrases to concepts

(13)

haw-hamburg.de

SKOS

• OWL complaint framework for building concept schemes

• Basic constructs:

skos:ConceptSchemeskos:Concept

skos:narrowerskos:broaderskos:related

• Knowledge Entities are Concepts, grouped in a Concept Scheme

http://www.w3.org/2001/sw/Europe/reports/thes/1.0/guide/

(14)

schmidt@informatik.

haw-hamburg.de

Expressing ACMCCS98 in SKOS

<skos:Concept rdf:about=“C.2.6">

<skos:externalID>C.2.6</skos:externalID>

<skos:prefLabel xml:lang="en">

Internetworking

</skos:prefLabel>

<skos:inScheme rdf:resource=“." />

<skos:narrower rdf:resource="C.2.6.1" />

<skos:narrower rdf:resource="C.2.6.2" />

<skos:related rdf:resource="C.2.2" />

</skos:Concept>

(15)

haw-hamburg.de

☺ A part of the RDF data model

(16)

schmidt@informatik.

haw-hamburg.de

Code Fragments:

Obtaining an Inference Model

1. Load SKOS schema (from the web):

Model schema = ModelLoader.loadModel(

"http://www.w3.org/2004/02/skos/core.rdf");

2. Load data (ACM instances of SKOS from local file):

Model data = ModelLoader.loadModel("acmskos.rdf“);

3. Obtain reasoner (SKOS is build upon OWL, so we need an OWL- capable reasoner):

Reasoner reasoner = ReasonerRegistry.getOWLReasoner();

4. Binding schema:

reasoner = reasoner.bindSchema(schema);

5. Creating Inference Model:

InfModel infModel = ModelFactory.createInfModel(reasoner, data);

(17)

haw-hamburg.de

Getting the non-obvious

//get subject we want information on

Resource subject = infModel.getResource(

“http://www.acm.org/class/1998/B.8”);

//get type of information (only ‘related’ concepts) Property predicate = infModel.getProperty(

"http://www.w3.org/2004/02/skos/core#related");

//get iterator to all statements matching the given conditions StmtIterator it = infModel.listStatements(subject, predicate,

null);

//get perfLabel of the first statement returned String label = it.nextStatement().getProperty(

“http://www.w3.org/2004/02/skos/core#prefLabel”).getString()

(18)

schmidt@informatik.

haw-hamburg.de

Use Case:

eLearning Objects content augmentation

Idea

• LOM relations expressing connection between eLOs

• Relations are qualified

• Use LOM relations to suggest further content to the learner

ToDo

• Map LOM relations into an ontology

• Implement application logic

(19)

haw-hamburg.de

representing LOM Relations

• Relations referencing other eLearning Objects owl:ObjectProperties

• All relation qualifiers have an inverse equivalent (eg.

isBasisFor isBasedOn) owl:inverseOf

• Qualifiers could be declared as being transitive owl:TransitivProperty

<owl:ObjectProperty rdf:ID="isBasedOn">

<rdf:type rdf:resource="&owl;TransitiveProperty"/>

<rdfs:range rdf:resource="#LearningObject"/>

<rdfs:domain rdf:resource="#LearningObject"/>

</owl:ObjectProperty>

<owl:ObjectProperty rdf:ID="isBasisFor">

<owl:inverseOf rdf:resource="#isBasedOn" />

</owl:ObjectProperty>

(20)

schmidt@informatik.

haw-hamburg.de

Sample Instances

<LearningObject rdf:about="&hylos;DexteReferModel/DexteReferModel.xml">

<title>Dexter</title>

<isBasedOn rdf:resource="&hylos;MemexVBush1945/MemexVBush1945.xml"/>

<hasPart rdf:resource="&hylos;DexteDefic/DexteDefic.xml" />

</LearningObject>

<LearningObject rdf:about="&hylos;DexteStora/DexteStora.xml">

<title>Dexter Storage</title>

<isPartOf rdf:resource="&hylos;DexteReferModel/DexteReferModel.xml" />

</LearningObject>

<LearningObject rdf:about="&hylos;AmsteHyperModel/AmsteHyperModel.xml">

<title>Amsterdam Hypermedia Model</title>

<isBasedOn rdf:resource="&hylos;DexteReferModel/DexteReferModel.xml"/>

</LearningObject>

(21)

haw-hamburg.de

Comfortable Vocabularies

• Use the Jena tool

schemagen

to build vocabulary (java) classes from OWL files

(http://jena.sourceforge.net/how-to/schemagen.html)

<owl:ObjectProperty rdf:ID="isBasisFor">

<owl:inverseOf rdf:resource="#isBasedOn" />

<rdfs:comment rdf:datatype="&xsd;string">

LOM.Relations.kind is basis for

</rdfs:comment>

</owl:ObjectProperty>

/**<p>The ontology model that holds the vocabulary terms</p>*/

private static OntModel m_model =

ModelFactory.createOntologyModel(ProfileRegistry.OWL_LANG );

/** <p>LOM.Relations.kind is basis for</p> */

public static final ObjectProperty isBasisFor = m_model.createObjectProperty(

"http://hylos.fhtw-berlin.de/HylosLOM#isBasisFor" );

(22)

schmidt@informatik.

haw-hamburg.de

Getting something out of the Inference Model

1. Create Inference Model:

Model schema = ModelFactory.loadModel(“hylosLOM.owl”);

Model data = ModelFactory.loadModel(“lomData.rdf”);

Reasoner reasoner = ReasonerRegistry.createOWLReasoner();

reasoner = reasoner.bindSchema(schema);

InfModel infModel = ModelFactory.createInfModel(reasoner, data);

2. Querying the model:

Resource s = infModel.getResource(“…AmsteHyperModel.xml”);

for( StmtIterator it = infModel.listStatements(s, HylosLOMVocab.isBasedOn, null); it.hasNext(); ) {

System.out.println(PrintUtil.print(it.nextStatement());

}

(23)

haw-hamburg.de

Rules – Basis for inference

• OWL reasoner is based upon specific rules which model the OWL assertions and constraints

• Applied ruleset could be obtained from

FBRuleReasoner

via

getRules() : List

• Rules are created using

Rules.parseRule(String) : Rule

or

Rules.parseRules(String) : List

For detailed information on the inference system refer to

http://jena.sourceforge.net/inference/index.html

(24)

schmidt@informatik.

haw-hamburg.de

Rule Definition

Rule := bare-rule . or [ bare-rule ]

or [ ruleName : bare-rule ]

bare-rule := term, ... term -> hterm, ... hterm // forward rule or term, ... term <- term, ... term // backward rule

hterm := term or [ bare-rule ]

term := (node, node, node) // triple pattern

or (node, node, functor) // extended triple pattern

or builtin(node, ... node) // invoke procedural primitive functor := functorName(node, ... node) // structured literal node := uri-ref // e.g. http://foo.com/eg

or prefix:localname // e.g. rdf:type or ?varname // variable

or 'a literal' // either a string or a number or number // e.g. 42 or 25.5

(25)

haw-hamburg.de

Creating own rules

• If A is based on B and B has part C then A is also based on C

[myrule1: (?A http://hylos.fhtw-berlin.de/HylosLOM#isBasedOn

?B) (?B http://hylos.fhtw-berlin.de/HylosLOM#hasPart ?C) ->

(?A http://hylos.fhtw-berlin.de/HylosLOM#isBasedOn ?C)]

• If A is based on B and B is part of C then A is also based on C

[myrule2: (?A http://hylos.fhtw-berlin.de/HylosLOM#isBasedOn

?B) (?C http://hylos.fhtw-berlin.de/HylosLOM#isPartOf ?B) ->

(?A http://hylos.fhtw-berlin.de/HylosLOM#isBasedOn ?C)]

(26)

schmidt@informatik.

haw-hamburg.de

Extending the standard ruleset

String RULE_FILE = “own.rules”;

//load rules from file own.rules List rules =

Rule.parseRules(Util.loadResourceFile(RULE_FILE));

//add rules to the existing ruleset

((OWLFBRuleReasoner) reasoner).getRules().addAll(rules);

/*

* bind schema to reasoner

*/

• Attention: ruleset has to be loaded before the schema is bound

to the reasoner.

(27)

haw-hamburg.de

OWL-S

• Web Ontology Language for Services

• Idea: Provide a computer-interpretable description of a Web Service and any means to access it

• Ontology Standard consisting of basic classes and properties for declaring and describing services

• Originally DAML-S from DAML Initiative

• Release 1.0 by DAML (Nov 2003)

• Now: Release 1.1 – Submission to W3C

(28)

schmidt@informatik.

haw-hamburg.de

Motivation + Use Cases

Goals: Enable agents to discover, invoke, verify, interoperate, compose and monitor Web Services:

1. Automatic Web Service Discovery: Enable declarative advertisements of properties and capabilities

“Find a service, that sells skiing lift tickets for my place and accepts credit cards”

2. Automatic Web Service Invocation: Provide standard means for specifying declarative APIs and parameter semantics

“Buy me that lift ticket using my credit card”

3. Automatic Webs Service Composition and Interoperation: Provide declarative specifications of prerequisites & consequences of apps.

and a language to describe composition and data flow interaction

“ Determine the place with best snow height and then buy me the lift card”

(29)

haw-hamburg.de

Ontology Structuring for Services

Three essential types of knowledge about a service:

What does the service provide?

Profile class used to advertise services

How is it used?

ServiceModel class used

to describe the process model

How to interact with it?

ServiceGrounding class specifies

details of accessing the service

(30)

schmidt@informatik.

haw-hamburg.de

Service Profile

• A description of services as offered by providers or needed by requestors

• The profile provides a detailed description of a service to a registry, but is useless after service selection (→ ServiceModel)

• Three types of information:

- Provider information: Service Name, Contact, Description

- Functional description: Input, Output, Precondition, Effects

- Additional properties: Attributes, Parameters, Categories …

(31)

haw-hamburg.de

Service Profiles

(32)

schmidt@informatik.

haw-hamburg.de

Service Model

• Models Services as Processes

• Two types of processes: Atomic or Composite

• Describes:

- Parameters (Input, Output) & Expressions (Precondition, Effects) - Process Type

- Process composition

- Data flow and parameter binding

(33)

haw-hamburg.de

(34)

schmidt@informatik.

haw-hamburg.de

Service Grounding

• Concrete service access description

• Extends WSDL on atomic processes

• Extensions:

- WSDL message may use owl-s parameter objects

- EncodingStyle may be OWL - Process composition

- OWL-S process attribute may

be used as WSDL operation element

(35)

haw-hamburg.de

The Semantic of a Hyperlink

• Links encode relations between resources

• Problem: What is their semantic interpretation?

• Get information from

- Departure & arrival of a link

- Contextual information of the link itself

• Treat links as separate semantic statements to - Process Links in applications

- Retrieve information about resources

(36)

schmidt@informatik.

haw-hamburg.de

Linking & Anchoring

Ingredients of a link

<a href=“../dort.html#a1" target="_blank"> hier </a>

process instruction source object & link type

target object source anchor

target anchor

(37)

haw-hamburg.de

Interactivity + Relation

• Hyper references are constructed from:

– Anchors marking data chunks in documents – Links connecting anchors

• Anchors and Links need not to be stored inside the documents

• XLink (2001)

– W3C Standard for creating and describing links – Bidirectional and multidirectional links

– Semantic attributes (title, arcrole, … )

(38)

schmidt@informatik.

haw-hamburg.de

Deriving statements from Meta Data

This page is titled hamster diseases

Subject Predicat

Object

Anchors provide

additional specification

(39)

haw-hamburg.de

Building Link Semantic

• Anchored content carries (RDF-) semantics

“This part is about hamsters having hay fever”

• Simple link statement

“ ‘This part titled Hay Fever handbook’ represents

background information on ‘this part about hamsters having hay fever’ ”

• Higher order statement

“Link1 says that ‘the part titled Hay Fever Handbook’

represents background information on ‘the part

about hamsters having hay fever.‘ ”

(40)

schmidt@informatik.

haw-hamburg.de

Deriving statements from Meta Data

(41)

haw-hamburg.de

References

• Semantic Web @ W3C - http://www.w3.org/2001/sw/

• OWL Semantics & Abstract Syntax - http://www.w3.org/TR/owl-semantics/

• Representing Classes As Property Values on the Semantic Web - http://www.w3.org/TR/swbp-classes-as-values

• SKOS-Core 1.0 Guide -

http:// www.w3.org/2001/sw/Europe/reports/thes/1.0/guide

• Jena Javadoc - http://jena.sourceforge.net/javadoc/

• D. Martin et. al.: OWL-S: Semantic Markup for Web Services, W3C Submission

http://www.w3.org/Submission/2004/SUBM-OWL-S-20041122/

• DAML Services - http://www.daml.org/services/owl-s/

• P. Alesso, C. Smith: Developing Semantic Web Services, Peters, 2005

Referenzen

ÄHNLICHE DOKUMENTE

The research methodology consists in approaching the current literature, discussing the main practical aspects resulted from tests and analysis and treating the problem of quality

The present analysis is based on scheduling preferences, where the user cost is described in terms of waiting time at the station and a sched- ule delay cost given as a function of

Ce sont les jours de mars 1994 où la Grande Salle d'Epalinges accueillera l'Equipe et ses amis pour trois concerts de fête.. Entre 90

call.addParameter(&#34;bean&#34;, qname, ParameterMode.IN); //register (passed) parameter for bean call.setReturnType(qname); //specify expected return type of web

– an interface and service implementation (locator) for every service section – Client stubs for every binding

The separation of actual simulation and the generation of output enables the user to produce more detailed outputs only for those runs for which they are really needed and

Increased investment in materials technology is critical to national security, American economic competitiveness on the global stage, and our response to climate change. Investing

For more information on any product, refer to back issues of SOURCE DATA or contact your local office to see the full release in- formation on the