Semantic Web and Knowledge Management Ching-Long Yeh 葉葉葉 Department of Computer Science and Engineering Tatung University Taipei, Taiwan [email protected] (msn) http://www.cse.ttu.edu.tw/chingyeh
Jan 04, 2016
Semantic Web and Knowledge Management
Ching-Long Yeh 葉慶隆Department of Computer Science and Engineering
Tatung UniversityTaipei, Taiwan
[email protected] (msn)http://www.cse.ttu.edu.tw/chingyeh
Semantic Web and Knowledge Management 2
ContentContent
• Introduction – WWW: HTML, HTTP, browsers – XML and its Protocol– Business Automation: RosettaNet, ebXML– Semantic Web: WWW + metadata layer – Semantic Grid
• Semantic Web – Overview– Reasoning in Prolog– Languages: RDF, RDFS, OWL, OWL-S, SWRL, SPARQL– Ontologies:
• RSS, FOAF, iCalendar, vCard, DC(Q), musicBrainz– Semantic Web System Architecture
• Knowledge-Engineering Approach to Knowledge Management – KE methodology: CommonKADS
• Our Current Research – Lesson Learned in Project Management Based on Semantic Web – From Text to RDF
• Summary
Semantic Web and Knowledge Management 3
Web Technology OverviewWeb Technology Overview
• WWW– Infrastructure
• HTML, HTTP, URI, browsers– Services
• Search engine and directory navigation
• WWW + XML– Web Service (UDDI, WSDL, SOAP)
• SOA (Registry, provider, requester)– ebXML
• SOA for business automation– discovery, implementation, run-time phases
• Business process + message service– Semantic Web
• Meaning processing automation• WWW + metadata layer (OWL+RDF)• Services automation (WWW+OWL-S/RDF)• Semantic Grid
Semantic WebSemantic Web
Semantic Web and Knowledge Management 5
Semantic WebSemantic Web
• The Semantic Web is a vision:
the idea of having data on the web defined and linked in a way that it can be used by machines not just for display purposes, but for automation, integration and reuse of data across various applications
Semantic Web and Knowledge Management 6
Semantic WebSemantic Web
• The Semantic Web = a Web with a meaning.
"If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database“
Tim Berners-Lee, Weaving the Web, 1999
Semantic Web and Knowledge Management 7
Introduction from W3C SW ActivityIntroduction from W3C SW Activity
• The Semantic Web is a web of data.
• The Semantic Web is about two things. – Common formats for interchange of data,
• On the original Web we only had interchange of documents.
– Language for recording how the data relates to real world objects• That allows a person, or a machine, to start off in one database, and then move
through an unending set of databases which are connected not by wires but by being about the same thing.
Semantic Web and Knowledge Management 8
The Semantic Web ArchitectureThe Semantic Web Architecture
(http://www.w3.org/2001/Talks/0228-tbl/slide5-0.html)
Tim Berners-Lee:“Axioms, Architecture and Aspirations”W3C all-working group plenary Meeting28 February 2001
URI Unicode
XML Namespaces
XML Schema
Sig./Ency.
RDF M&S
RDF Schema
Ontology (OWL)
Rules (SWRL)
Logic (FOL)
Proof
Trust
I. Horrocks, et al. Semantic web architecture: Stack or two towers? In F. Fages and S. Soliman, (eds.), Principles and Practice of Semantic Web Reasoning (PPSWR 2005), number 3703 in LNCS, pages 37-41. SV, 2005. http://www.cs.man.ac.uk/~horrocks/Publications/download/2005/HPPH05.pdf
Semantic Web and Knowledge Management 9
Reasoning in Prolog Reasoning in Prolog (1)(1)
• Facts and rules about members of a family
parent(tom,bob).parent(pam,bob).parent(tom,bob).parent(tom,liz).parent(bob,ann).parent(bob,pat).parent(pat,jim).female(pam).male(tom).male(bob).female(liz).female(pat).female(ann).male(jim).
offspring(Y,X):- parent(X,Y).mother(X,Y):- parent(X,Y),female(X).grandparent(X,Z):- parent(X,Y),parent(Y,Z).sister(X,Y):- parent(Z,X),parent(Z,Y),female(X), X\==Y.predecessor(X,Z):-
parent(X,Z).predecessor(X,Z):-
parent(X,Y), predecessor(Y,Z).
Semantic Web and Knowledge Management 10
Reasoning in Prolog Reasoning in Prolog (2)(2)
• The following unlisted facts can be derived by using the rules.
offspring(bob,pam).offspring(bob,tom).offspring(liz,tom).offspring(ann,bob).offspring(pat,bob).offspring(jim,pat).
mother(pam,bob).mother(pat,jim).
grandparent(tom,ann).grandparent(tom,pat).grandparent(pam,ann).grandparent(pam,pat).grandparent(tom,ann).grandparent(tom,pat).grandparent(bob,jim).
sister(liz,bob).sister(ann,pat).sister(pat,ann).
predecessor(pam,bob).predecessor(tom,bob).predecessor(tom,liz).predecessor(bob,ann).predecessor(bob,pat).predecessor(pat,jim).predecessor(pam,ann).predecessor(pam,pat).predecessor(pam,jim).predecessor(tom,ann).predecessor(tom,pat).predecessor(tom,jim).predecessor(bob,jim).
RDF and Schema LanguagesRDF and Schema Languages
Semantic Web and Knowledge Management 12
RDF M&SRDF M&S• RDF (Resource Description Framework)
– Beyond Machine readable to Machine understandable
• RDF consists of two parts– RDF Model (a set of triples)
– RDF Syntax (different XML serialization syntaxes)
• RDF Schema for definition of Vocabularies (simple Ontologies) for RDF (and in RDF)
Semantic Web and Knowledge Management 13
RDF Data ModelRDF Data Model• Resources
– A resource is a thing you talk about (can reference)
– Resources have URI’s
– RDF definitions are themselves Resources (linkage, see requirement 1)
• Properties – slots, define relationships to other resources or atomic values
• Statements– “Resource has Property with Value”
– (Values can be resources or atomic XML data)
• Similar to Frame Systems
Semantic Web and Knowledge Management 14
A Simple ExampleA Simple Example• Statement
– “Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila”
• Structure– Resource (subject) http://www.w3.org/Home/Lassila– Property (predicate) http://www.schema.org/#Creator– Value (object) "Ora Lassila”
• Directed graph
http://www.w3.org/Home/Lassilas:Creator Ora Lassila
Semantic Web and Knowledge Management 15
EmailName
s:Creator
http://www.w3.org/Home/Lassila
Another ExampleAnother Example
• To add properties to Creator, point through an intermediate Resource.
Person://fi/654645635
Ora Lassila [email protected]
Semantic Web and Knowledge Management 16
Example:Example: Bag Bag
• The students incourse 6.001 are Amy, Tim,John, Mary,and Sue
Rdf:Bag
/Students/Amy
/Students/Tim
/Students/John
/Students/Mary
/Students/Sue
bagid1
/courses/6.001
students
rdf:type
rdf:_1
rdf:_2
rdf:_3
rdf:_4
rdf:_5
Semantic Web and Knowledge Management 17
rdf:_1
rdf:_2
rdf:_3
rdf:typesource
ftp.eu.net
ftp.cs.purdue.edu
ftp.x.org
Example:Example: Alternative Alternative
• The source code for X11 may be found at ftp.x.org, ftp.cs.purdue.edu, or ftp.eu.net
altid
rdf:Althttp://x.org/package/X11
Semantic Web and Knowledge Management 18
Representing Prolog Facts in RDFRepresenting Prolog Facts in RDF
parent(pam,bob).parent(tom,bob).parent(tom,liz).parent(bob,ann).parent(bob,pat).parent(pat,jim).female(pam).male(tom).male(bob).female(liz).female(pat).female(ann).male(jim).
Semantic Web and Knowledge Management 19
OWLOWLW3C Web Ontology LanguageW3C Web Ontology Language
• OWL provides three increasingly expressive sublanguages: OWL Lite, OWL DL, and OWL Full.
Semantic Web and Knowledge Management 20
OWLOWLW3C Web Ontology LanguageW3C Web Ontology Language
OWL Lite language constructs
RDF Schema Features: Class rdf:Property rdfs:subClassOf rdfs:subPropertyOf rdfs:domain rdfs:range Individual
(In)Equality: equivalentClass equivalentProperty sameAs differentFrom allDifferent
Property Characteristics: inverseOf TransitiveProperty SymmetricProperty FunctionalProperty InverseFunctionalProperty
Property Type Restrictions: allValuesFrom someValuesFrom
Restricted Cardinality: minCardinality (only 0 or 1) maxCardinality (only 0 or 1) cardinality (only 0 or 1)
Header Information: ontology imports
Semantic Web and Knowledge Management 21
Ontology SpectrumOntology Spectrum
What is an Ontology?What is an Ontology?
Catalog/ID
GeneralLogical
constraints
Terms/glossary
Thesauri“narrower
term”relation
Formalis-a
Frames(properties)
Informalis-a
Formalinstance
Value Restrs.
Disjointness, Inverse, part-
of…
Semantic Web and Knowledge Management 22
Creating Your Own OntologyCreating Your Own OntologyA Simple Knowledge-Engineering MethodologyA Simple Knowledge-Engineering Methodology
Step 1: Determine the domain and scope of the ontology
– Why, what, who, competency questions
Step 2: Consider reusing existing ontologies
Step 3: Enumerate important terms in the ontology
Step 4: Define the classes and the class hierarchy
Step 5: Define the properties of classes—slots
Step 6: Define the facets of the slots
Step 7: Create instances
Semantic Web and Knowledge Management 23
Obtaining RDF schema from ontology libraryObtaining RDF schema from ontology library
• SchemaWeb: http://www.schemaweb.info/default.aspx • Swoogle: http://swoogle.umbc.edu/ • DAML ontology library: http://www.daml.org/ontologies/
Semantic Web and Knowledge Management 24
Examples of RDF schemaExamples of RDF schema
• RSS 1.0: http://www.schemaweb.info/schema/SchemaDetails.aspx?id=12
• MusicBrainz: http://www.schemaweb.info/schema/SchemaDetails.aspx?id=168
• Resume: http://www.schemaweb.info/schema/SchemaDetails.aspx?id=89 • FOAF: http://www.schemaweb.info/schema/SchemaDetails.aspx?id=29
Semantic Web and Knowledge Management 25
RDFCalendar
FOAF
Semantic Web and Knowledge Management 26
OWL-S: Ontology for Semantic Web OWL-S: Ontology for Semantic Web ServicesServices
• Some motivating tasks– Automatic Web service discovery
– Automatic Web service invocation
– Automatic Web service composition and interoperation
– Automatic Web service execution monitoring
Semantic Web and Knowledge Management 27
High-level View of the Service OntologyHigh-level View of the Service Ontology
ServiceProfile
ServiceModel
ServiceGrounding
ServiceResourceprovides
presents
describedBy
supports
What the service does
How it works
How toAccess it
Semantic Web and Knowledge Management 28
Top Level of the Process OntologyTop Level of the Process Ontology
Process Profile
AtomicProcess Composite
ProcessSimpleProcess
ControlConstruct
SequenceRepeatUntil
ProcessComponent=Process U ControConstruct
ProcessComponent=Process U ControConstruct
ProcessComponent=Process U ControConstruct
hasProcesshasProfile
computedInputcomputedOutputcomputedEffect
computedPreconditioninvocab
compsedBy
expandcollapserealizes
realizedBy
hasGrounding
InputPrecondition
Outputeffect
Condition
Semantic Web and Knowledge Management 29
Grounding a Service to a Concrete Realization Grounding a Service to a Concrete Realization
Process Model
Atomic Process
Operation
DL-Based Types
Inputs/Outputs
Message
Binding to SOAP, HTTP, etc.
WSDL
OWL-S
Semantic Web and Knowledge Management 30
SWRL: Semantic Web Rule LanguageSWRL: Semantic Web Rule LanguageExamplesExamples
hasParent(?x1,?x2) hasBrother(?x2,?x3) hasUncle(?x1,?x3)∧ ⇒
Implies(Antecedent(hasParent(I-variable(x1) I-variable(x2)) hasBrother(I-variable(x2) I-variable(x3))) Consequent(hasUncle(I-variable(x1) I-variable(x3))))
Semantic Web and Knowledge Management 31
SPARQL: RDF Query LanguageSPARQL: RDF Query LanguageExamplesExamples
SELECT ?x WHERE { ?x <http://www.w3.org/2001/vcard-rdf/3.0#FN> "John Smith" }
SELECT ?x, ?fname WHERE {?x <http://www.w3.org/2001/vcard-rdf/3.0#FN> ?fname}
SELECT ?givenName WHERE { ?y <http://www.w3.org/2001/vcard-rdf/3.0#Family> "Smith" . ?y http://www.w3.org/2001/vcard-rdf/3.0#Given ?givenName . }
PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> SELECT ?givenName WHERE { ?y vcard:Family "Smith" . ?y vcard:Given ?givenName . }
PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> SELECT ?g WHERE { ?y vcard:Given ?g . FILTER regex(?g, "r", "i") }
PREFIX info <http://somewhere/peopleInfo#> SELECT ?resource WHERE { ?resource info:age ?age . FILTER (?age >= 24) }
Semantic Web System ArchitecturesSemantic Web System Architectures
Semantic Web and Knowledge Management 33
TypicalTypical System ArchitectureSystem Architecture
Semantic Web and Knowledge Management 34
Layered ArchitectureLayered Architecture
Semantic Web and Knowledge Management 35
System ArchitectureSystem Architecture
Semantic Web and Knowledge Management 36
SesameSesameA generic Architecture for Storing and Querying RDF and RDF SchemaA generic Architecture for Storing and Querying RDF and RDF Schema
Semantic Web and Knowledge Management 37
SesameSesame
Semantic Web and Knowledge Management 38
Annotea Basic Architecture Annotea Basic Architecture
Knowledge Management Based on Semantic WebKnowledge Management Based on Semantic Web
Semantic Web and Knowledge Management 40
What is knowledge management?What is knowledge management?
• Knowledge is seen as a resource
• This means for knowledge management taking care that the resource is– delivered at the right time
– available at the right place
– present in the right shape
– satisfying the quality requirements
– obtained at the lowest possible costs
• to be used in business processes
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 41
Knowledge assets
Apply yourbest knowledge
Construct newknowledge
Value chain
Continuous improvement of knowledge Continuous improvement of knowledge assetsassets
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 42
Knowledge management & knowledge Knowledge management & knowledge engineeringengineering
• Organization analysis feeds into knowledge management (and vice versa)
• Knowledge modeling provides techniques for knowledge identification and development
• Knowledge engineering focuses on common / reusable elements in knowledge work
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 43
Knowledge engineeringKnowledge engineering
• process of– eliciting,
– structuring,
– formalizing,
– operationalizing
• information and knowledge involved in a knowledge-intensive problem domain,
• in order to construct a program that can perform a difficult task adequately
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 44
Problems in knowledge engineeringProblems in knowledge engineering
• complex information and knowledge is difficult to observe
• experts and other sources differ
• multiple representations:– textbooks
– graphical representations
– heuristics
– skills
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 45
A Short History of A Short History of Knowledge SystemsKnowledge Systems
1965 19851975 1995
general-purpose search engines
(GPS)
first-generation rule-based systems
(MYCIN, XCON)
emergence of structured methods
(early KADS)
mature methodologies
(CommonKADS)
=> from art to discipline =>
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 46
CommonKADS Model SetCommonKADS Model Set
OrganizationModel
TaskModel
AgentModel
KnowledgeModel
CommunicationModel
DesignModel
Context
Concept
Artefact
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 47
Why context modeling?Why context modeling?
• Often difficult to identify profitable use of (knowledge) technology
• Laboratory is different from the ''real'' world
• Acceptability to users very important
• Fielding into ongoing process not self evident
• Often not clear what additional measures to take
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 48
Goals for context modelingGoals for context modeling
• Identify problems and opportunities
• Decide about solutions and their feasibility
• Improve tasks and task-related knowledge
• Plan for needed organizational changes
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 49
Role of knowledge systemsRole of knowledge systems
• "automation" is not the right way to look at KSs
• tasks are usually too complex
• much better view: KS as process-improvement tool
• typical role of KS: active intelligent assistant
Selected from the course slides of CommonKADS
Semantic Web and Knowledge Management 50
• Step 1: Carry out a scoping and feasibility study– Tool: Organization Model (OM)
• Step 2: Carry out impact and improvement study– Tool: Task and Agent Models (TM, AM)
• zooming in/refinement of organization model
• Each study consists of an analysis part and a “constructive” decision-making part
Context modelling processContext modelling process
Selected from the course slides of CommonKADS
Project Management Based on Semantic WebProject Management Based on Semantic Web
Semantic Web and Knowledge Management 52
Project DescriptionProject Description
Lesson Learned in PM
CommonKADS
Organization modelTask modelAgent modelKnowledge modelCommunication modelDesign models
Implementation using SW technology
System
Semantic Web and Knowledge Management 53
System Architecture
Semantic Web and Knowledge Management 54
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
SMTP
HTTPHTTP
SOAPSOAP
HTTPS
FTPFTP
RSS
Semantic Web and Knowledge Management 55
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
Security ServicesSecurity Services
Security LayerSecurity Layer
身分確認管理
存取權限管理存取權限管理
加解密
政策管理與管制政策管理與管制
Semantic Web and Knowledge Management 56
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
Security ServicesSecurity Services
Security LayerSecurity Layer
DataData IntegrationIntegration ServicesServices
Data Integration LayerData Integration Layer
資料轉換版本控制版本控制
二維關聯
資料分類與聚集資料儲存資料儲存
Semantic Web and Knowledge Management 57
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
Security ServicesSecurity Services
Security LayerSecurity Layer
DataData IntegrationIntegration ServicesServices
Data Integration LayerData Integration Layer
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration ServicesServices
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration LayerLayer
註解資訊編製
後設資料編製後設資料編製
生命週期生命週期與程序管理與程序管理
專案狀態與背景資訊管理
Semantic Web and Knowledge Management 58
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
Security ServicesSecurity Services
Security LayerSecurity Layer
DataData IntegrationIntegration ServicesServices
Data Integration LayerData Integration Layer
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration ServicesServices
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration LayerLayer
Knowledge(Info.) Knowledge(Info.) IntegrationIntegration ServicesServices
Knowledge (Info.) Knowledge (Info.) IntegrationIntegration LayerLayer語意層級導覽
專案事件管理專案事件管理專案進度呈報服務專案進度呈報服務
行事曆管理
線上審查線上審查
即時資訊即時資訊管理管理
語意層級搜尋
Semantic Web and Knowledge Management 59
客戶客戶
第三方組織第三方組織
下包廠商下包廠商
Team ATeam A
Team CTeam C
Team DTeam D
主管主管 業務業務
後勤後勤
Team BTeam B
Communication LayerCommunication Layer
Communication ServicesCommunication Services
Security ServicesSecurity Services
Security LayerSecurity Layer
DataData IntegrationIntegration ServicesServices
Data Integration LayerData Integration Layer
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration ServicesServices
Info.(Meta Data) Info.(Meta Data) IntegrationIntegration LayerLayer
Knowledge(Info.) Knowledge(Info.) IntegrationIntegration ServicesServices
Knowledge (Info.) Knowledge (Info.) IntegrationIntegration LayerLayer
System Management System Management ServicesServices
System Management System Management LayerLayer
被授權範圍內管理被授權範圍內管理
整體系統管理與管制
From Text to RDFFrom Text to RDF
Semantic Web and Knowledge Management 61
GoalGoal
• We aim at the automatic creation of metadata from documents for the Semantic Web using a low-cost natural language processing technology, i.e., information extraction.
Semantic Web and Knowledge Management 62
System architecture for System architecture for managing the metadata layer of managing the metadata layer of Semantic Web Semantic Web
Contentprovider
Contentprovider
Contentprovider
Contentprovider
Annotator EditorWrapper
InstancesOntology
Inference Engine
Conceptual Search
Social Interactions
Tailored Service
Semantic Navigation
useruser
Back end
Know
ledge-based system
Front end
Information Extractor
Semantic Web and Knowledge Management 63
Integrating information Integrating information extraction function with extraction function with Semantic Web system Semantic Web system
Search engine (google.com)
Keywords
Relevant documents
IE engine
Frame Instance Store
RDF Store
RDF store engine
Frame engine
Service front ends
User
Export
Extracted content
Back End extraction component
Service Front End
Ontology-based store
Semantic Web and Knowledge Management 64
Components in the information extraction system Components in the information extraction system
Chinese tokenizer
GazetterSentencesplitter
POStagger
Domain eventmatcher
Input documents
Extracted content
Semantic Web and Knowledge Management 65
IR vs. IEIR vs. IE
IR
IE
Semantic Web and Knowledge Management 66
Extracted Domain Events in RDFExtracted Domain Events in RDF
Semantic Web and Knowledge Management 67
Query the Extracted ContentsQuery the Extracted Contents
Semantic Web and Knowledge Management 68
A Test of the IE SystemA Test of the IE System
• We take one hundred financial news as our test data and use dozens of JAPE rules to extract the specific domain events.
• After the processing of domain events matching, we then calculate the precision rate and recall rate of our system.
• We first manually extract the target events within these financial news and we obtain 120 events of interest.
• After the domain event matching, it returns 25 results, among which 22 are correct. So the precision rate is 88%, and the recall rate is 18%.
Thank you.Thank you.