Presentation is loading. Please wait.

Presentation is loading. Please wait.

Knowledge Management through Ontologies. Web Today: Rich Information Source for Human Manipulation /Interpretation Human.

Similar presentations

Presentation on theme: "Knowledge Management through Ontologies. Web Today: Rich Information Source for Human Manipulation /Interpretation Human."— Presentation transcript:

1 Knowledge Management through Ontologies

2 Web Today: Rich Information Source for Human Manipulation /Interpretation Human

3 Web Tomorrow: Rich Information Source for Agent Manipulation / Interpretation Human Agent

4 Semantic Web Berners-Lee et al. [2001] envisioned Semantic Web. “The Semantic Web is not a separate Web but an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation.”

5 Semantic Web : Single Stack Architecture Berners-Lee et al. [2001]

6 What is Ontology? Controlled vocabulary that describes objects and the relations between them. Has grammar for using the vocabulary terms to express something meaningful. Together with set of individual instances of classes constitutes a Knowledgebase. Classes describe concepts in the domain.

7 Ontologies Gruber [1993] defined ontology as “an explicit specification of a conceptualization”. Borst [1997] extended the Gruber’s definition in view of the reuse of ontologies as “A formal specification of a shared conceptualization”. Arpirez [2000] combined the above two definitions to give the definition of ontology as “A formal explicit specification of a shared conceptualization”

8 Ontologies “ An ontology is a formal, explicit specification of a shared conceptualization” Abstract model and simplified view of some phenomenon in the world that we want to represent Concepts, properties relations, constraints, axioms, are explicitly defined Consensual Knowledge Machine Readable

9 XML Allows users to define their own elements. Primary purpose to help information systems share structured data. Clear, simple syntax and unambiguous structure. Offers many ways to check the quality of document. Basic syntax for one element is: el_content

10 RDF Encoding knowledge for the semantic web. Builds on existing XML and URI technologies. URIs used to identify resources and make statements about them. Statement consist of RDF triples.

11 RDF Machine-understandable information Properties of WWW resources Examples: resource discovery, cataloging, content rating, intellectual property rights RDF statements specify the properties and values of Web resources RDF is encoded in XML

12 RDF Triple [resource][property][value] Department hasfaculty [subject][predicate][object] Department has Faculty

13 RDF Tags Defined triples can be encoded in RDF/XML. RDF/XML syntax: rdf:Description - define a Triple. rdf:about – define subject of triple. Properties are defined by their URI as tag using xml namespace. Value of property tag can be plain/typed literal or a resource. rdf:resource – defines value of a property if it is a resource. rdf:datatype – defines data type of literals. Only for describing resources not for specifying the semantics

14 Web resources Real resources: anything named by an URL (HTML pages, email addresses, Telnet sessions) Proxy resources: electronic representations of Real World things (checking accounts, persons, books, workstations)

15 Properties The relationship between a Web resource and a value (which can be either a string or another resource) Properties of a book: author, title, publisher, copyright date, subject, length Properties of a bank check: account title, address, date, payee, amount, routing code, account number, check number, memo

16 RDF Terminology has a creator whose value is John Smith the RDF terms for the various parts of the statement are: the subject is the URL the predicate is the word "creator" the object is the phrase "John Smith"

17 Machine Processable a system of machine-processable identifiers for identifying a subject, predicate, or object in a statement without any possibility of confusion with a similar-looking identifier - Uniform Resource Identifier (URI). a machine-processable language for representing these statements and exchanging them between machines - Extensible Markup Language (XML).

18 The RDF Model how RDF uses URIs to make statements about resources : has a creator whose value is John Smith could be represented by an RDF statement having: a subject a predicate and an object

19 Advantages of using URIrefs The identification of the statement's subject can be more precise Since there is a URIref to refer to John Smith, he is a full-fledged resource, and additional information can be recorded about him, simply by adding additional RDF statements with John's URIref as the subject

20 RDF's Graph Model Fundamental to RDF is the Graph Model of the statements A statement is represented by: – a node for the subject – a node for the object – an arc for the predicate, directed from the subject node to the object node

21 RDF's Graph Model Objects in RDF statements may be either URIrefs, or constant values (called literals) Literals may not be used as subjects or predicates in RDF statements.

22 Alternative to Graph- Triples Each statement in the graph is written as a simple triple of subject, predicate, and object, in that order. Each triple corresponds to a single arc in the graph, complete with the arc's beginning and ending nodes Triples for Previous Graph:. "August 16, 1999". "en"

23 Structured Property Values

24 Typed Literals so far, all constant values that serve as objects in RDF statements have been represented by plain (untyped) literals, even when the intent is probably for the value of the property to be a number (e.g., the value of a year or age property) or some other kind of more specialized value.

25 In RDF, typed literals are used to provide this kind of information. An RDF typed literal is formed by pairing a string with a URIref that identifies a particular datatype "27"^^. Or exstaff:85740 exterms:age "27"^^xsd:integer.

26 RDF has no built-in set of datatypes of its own, such as datatypes for integers, reals, strings, or dates. Instead, RDF typed literals simply provide a way to explicitly indicate, for a given literal, what datatype should be used to interpret it. The datatypes used in typed literals are defined externally to RDF, and identified by their datatype URIs. There is one exception: RDF defines a built-in datatype with the URIref rdf:XMLLiteral to represent XML content as a literal value

27 RDF/XML 1999-08-16 …

28 28 RDF Namespaces RDF namespace uses “ rdf ” prefix by convention RDF Schema namespace uses “ rdfs ” prefix by convention Properties are declared in other namespaces, so they are Web-unique

29 Other RDF Tags xml:base=" ducts"> … Rdf:type - can also be implied by using a special element instead of a Description element like

30 30 Attributes instead of elements A property/value pair can be expressed as an attribute instead of a sub-element if: The value is a string There is only one value for the property

31 31 Nested descriptions When a value is a proxy resource, it may be placed inside the property element..

32 32 Containers Proxy resources that hold one or more values (Web resources or strings) Bag: a simple collection with no ordering Seq: a collection with implicit ordering Alt: a set of alternatives (first one preferred) Elements are properties named _1, _2, _3, etc.

33 33 Container examples Bag: committee members, documents in a folder Seq: chapters in a book, items in an agenda Alt: document home and mirrors, translations of a document

34 34 A Bag, the hard way Jack Robinson John Doe Richard Roe

35 35 A Bag, the easy way Jack Robinson John Doe Richard Roe Using an “ rdf:Bag ” element means the value of “ type ” is “ /02/22-rdf-syntax-ns#Bag ”

36 Collections Container limitation – no way to close them describe groups containing only the specified members by RDF collections

37 Collection

38 38 Reified statements We reify statements so that we can talk about them rather than asserting them “ Charles Dickens is the author of Bleak House ” asserts a property of Charles Dickens “ Jack believes that Charles Dickens is the author of War and Peace ” asserts a property of Jack, not Charles Dickens

39 39 Reification properties Charles Dickens reifies as: Charles Dickens

40 40 RDF Schemas provides a type system for RDF Are expressed in RDF Are not to be confused with XML Schemas (eventual DTD replacements)

41 RDFS Describe groups of related RDF resources and the relationships between them Defines allowable properties that can be assigned to RDF resources Allows creating classes of resources that share common properties Resources defined as instances of classes Class is a resource Any class can be a subclass of another 41

42 42 RDF Classes Are groups/categories of Web resources Have URIs to identify them The special class “ rdfs:Literal ” consists of all possible RDF string values In typical, each class specifies completely what properties it has and what their types are In RDF classes, each property specifies what classes of subjects and objects it relates Therefore, new properties can be added to a class without modifying the class

43 43 Specifying Classes and Properties To specify a class, create an RDF resource of type rdfs:Class To specify a property, create an RDF resource of type rdfs:Property


45 45 Useful properties “ rdf:type ” relates any resource to its class “ rdfs:subClassOf ” relates a subclass to its superclass (multiple inheritance is OK) “ rdfs:subPropertyOf ” relates a subproperty to its superproperty

46 46 Useful properties “ rdfs:seeAlso ” relates a resource to another resource explaining it (use a subproperty to specify the nature of the explanation) “ rdfs:isDefinedBy ” is a subproperty of “ rdfs:seeAlso ” and relates a resource to its definition, typically an RDF schema

47 47 Useful properties “ rdfs:domain ” specifies the domain of a property (the classes of its subjects); if unknown, anything can be a subject “ rdfs:range ” specifies the range of a property (the single class of its objects); if unknown, anything can be an object

48 48 Useful properties “ rdf:subject ” is the property relating a reified statement to its subject (resource) “ rdf:predicate ” is the property relating a reified statement to its predicate (property) “ rdf:object ” is the property relating a reified statement to its object (value)

49 49 Useful properties “ rdfs:label ” specifies a human-readable name for this Class, Property,etc. “ rdfs:comment ” specifies human-readable documentation Multiple values are useful for specifying multiple languages

50 50 Useful classes “ rdfs:Resource ” is the class of all resources “ rdfs:Literal ” is the class of all strings “ rdfs:Class ” is the class of all classes “ rdfs:Property ” is the class of all properties “ rdf:Statement ” is the class of all asserted RDF statements

51 51 Useful classes “ rdfs:Container ” is the superclass of all container classes “ rdf:Bag ”, “ rdf:Seq ”, “ rdf:Alt ” are the classes of Bags, Seqs, and Alts (Any other class that is a subclass of “ rdfs:Container ” can be used in RDF syntax in place of a standard container)

52 RDFS RDFS tags: rdfs:Class : define a class in RDFS. rdfs:subClassOf : assign a class its parent class. rdf:Property :define a property. rdfs:subPropertyOf : assign a property its parent property. rdfs:domain and rdfs:range : schema properties to describe application specific properties. rdfs:Resource : RDFS defines all the classes as subclass of this class 52

53 Web Ontology Language (OWL ) Builds upon RDF and RDFS Uses XML to indicate hierarchies and relationships between different resources Has three sub languages: OWL Lite, OWL DL, and OWL Full

54 Need for OWL over RDFS Classes can be defined as Boolean combinations of other classes. It can be stated that the two classes (with different URI) are same. Cardinality restrictions can be specified for properties. It can be specified that a property is transitive, symmetric, Functional, inverseOf, or InverseFunctional Property.

55 Protégé Free, open-source platform which provides tools to construct domain models and knowledge-based applications. Supports the creation, visualization, and manipulation of ontologies. Protégé-OWL is tightly integrated with Jena.

56 Protégé Protégé platform supports two main ways of modeling ontologies. The Protégé-Frames editor enables users to build and populate ontologies that are. frame-based. The Protégé–OWL editor enables users to build ontologies for the Semantic Web in particular in the W3C's Web Ontology Language (OWL).

57 Protégé The Protégé-OWL editor enables users to: Load and save OWL and RDF ontologies. Edit and visualize classes, properties, and restrictions. Define logical class characteristics as OWL expressions. Edit OWL individuals.

58 Crop Ontology  Crop Ontology is the Knowledgebase of the presented Expert System.  It contains various classes, properties, restrictions and individuals related to  Crop Names  Varieties 58

59 Window showing class hierarchy

60 CROP Ontology… class and sub - class  Class is simply a name and collection of properties that describe a set of individuals and individuals are the members of those sets. 60

61 Creating a subclass ( Cereals ) of owl:Thing.

62 Crop Ontology… properties Properties, assert general facts about the members of classes and specific facts about individuals. Datatype properties: relations between instances of classes and RDF literals and XML Schema datatypes (like xsd:integer, xsd:string etc.). Object properties: relations between instances of two classes. To restrict the relationship between classes or between classes and RDF literals the domain and range can be specified for the property. 62

63 Window showing Data Property

64 All the Object properties defined for crop ontology

65 Window showing object properties

66 Ontology… properties Fig 4. An Example of Datatype Property 66

67 Ontology… properties Fig 3. An Example of Object Property 67

68 Crop Ontology… 68

69 Crop Ontology… individuals An individual is introduced by declaring it to be a member of a class. Individuals have properties of their class. Fig 2. Individuals of class Variety in Crop Ontology 69 These are all individuals of class Variety

70 Crop Ontology…  Common Classes with Individuals for Variety Selection Sequence (3) Tree (3) Question (15) Crops Cereals Maize (1) Picture (361) 70

71 Crop Ontology…  Classes with Individuals for Variety Selection Variety (39) Location State (29) Other_locations (8) Union_Territories (7) Grain_type (4) Grain_color (4) Maturity_type (4) 71

72 SPARQL SPARQL is a recursive acronym stands for SPARQL Protocol and RDF Query Language. SPARQL is a syntactically-SQL-like language for querying RDF graphs. It provides facilities to:  extract information in the form of URIs, blank nodes, plain and typed literals.  extract RDF sub-graphs.  construct new RDF graphs based on information in the queried graphs. 72

73 SPARQL Query SPARQL query to find the orders in soil ontology is: SELECT ?order WHERE {?order rdfs:subClassOf :Order } SELECT clause identifies the variables to appear in the query results, and the WHERE clause provides the basic graph pattern to match against the data graph. 73

74 Other Queries SL No. Query SPARQL Syntax Result 1 Find the sequence or sequences under the class tree. SELECT ?tree WHERE {?tree :has_sequence ?sequence. ?tree :has_language "english"} Disease_diagnosis Variety_Selection Pest_Identification 2 Find the number of questions in pest_sequence. SELECT ?num ?sequence WHERE{:Pest_Identification :has_sequence ?sequence. ?sequence :no_of_ques ?num} 5 3 Find out the parts that the flowering Stage of maize has. SELECT distinct ?Parts_Affected WHERE { ?probable_pest :attacks:Maize. :Maize :has_stage:Flowering. :Flowering:hasParts?Parts_Affected. ?Parts_Affected :has_language "english".} Stems Leaves Stalk Root Ear 74

75 Adding restrictions for class diseases

76 Creating an individual of class Nematodes

77 JENA Java framework for building Semantic Web applications. It provides a programmatic environment for RDF, RDFS and OWL, including a rule-based inference engine. An ontology model is an extension of the Jena RDF model.

78 JENA Interface Model: a set of statements. Statement: a triple of {R,P,O}. Resource: subject, URI. Property: “characterstic” of resource. Object: may be a resource or a literal. Literal: non-nested “object”. Container: special resource, collection of things.

79 JENA API Class : ModelFactory Package: com.hp.hpl.jena.rdf.model public class ModelFactory extends ModelFactoryBase Methods: 1.Model createDefaultModel () Answer a fresh Model with the default specification and Standard reification style.

80 2. Model read(java.lang.String url, java.lang.String base, java.lang.String lang) Read into this model the RDF at url, using baseURI as the base URI if it is non-null. 3.createMemModelMaker() Answer a ModelMaker that constructs memory-based Models that do not persist past JVM termination

81 Class : Query Package: com.hp.hpl.jena.rdql.Query public class Query extends java.lang.Object The data structure for a query. Once a query is built, it can be passed to a query engine. Methods: 1.Void setSource(Model m) The data target for the query as a Jena model. 2.QueryResults exec() Executes a query.

82 Interface : QueryExecution Pacakage: com.hp.hpl.jena.rdql Interface for query execution engines. The normal sequence is: QueryExecution qe = new.... ; qe.init() ; QueryResults qres = qe.exec() ;.... qres.close() ; qe.end() ; Methods: execSelect() Execute a SELECT query.

83 Interface: QueryResults Package: com.hp.hpl.jena.rdql public interface QueryResults extends java.util.Iterator Results from a query in a "ResultSet"-like manner. Each row corresponds to a set of bindings which fulfill the conditions of the query. Access to the results is by variable name. Method: Void close() Close the results iterator and stop query evaluation as soon as convenient.

84 Class : QueryFactory Package: com.hp.hpl.jena.query.QueryFactory public class QueryFactory extends java.lang.Object Method : create (java.lang.String queryString) Create a SPARQL query from the given string by calling the parser.

85 Class : QueryExecutionFactory Package:com.hp.hpl.jena.query.QueryExecutionFactory public class QueryExecutionFactory extends java.lang.Object Place to make QueryExecution objects from Query objects or a string. Method : create (java.lang.String queryStr, com.hp.hpl.jena.rdf.model.Model model) Create a QueryExecution to execute over the Model.

86 Comparing Reasoners

87 FaCT Implements DIG Interface which prescribes a simple communication protocol through the exchange of XML requests and responses over HTTP. FaCT implements optimized complete and sound algorithms to solve the subsumption problem in the DL. FaCT’s lack of support for inference in the ABox renders it inappropriate for OWL. Besides the lack of support for ABox and data types, the system is also syntactically incompatible with OWL.

88 FaCT++ It is a re-implementation of FaCT in C++, featuring however greater expressivity, aiming ultimately to support OWL DL. Full support for concrete domains is added. FaCT++ document version could only run in Linux and provides no communication interface with other applications.

89 Racer Inference engine for very expressive DLs. First system in its category to support reasoning in ABox as well as TBox. Process ontology written in XML, RDF, RDFS, DAML+OIL and OWL. Deals with the main problem that prevents full compatibility with OWL DL. RACER deals with nominals by creating a new concept for each of them.

90 Pellet Pellet has been the first reasoner to support all of OWL-DL. It offers panoply of features including conjunctive query answering, rule support etc. Pellet seems to be closer to the expressiveness needed by the OBES.

91 Pellet as an OWL-DL Reasoner A complete and capable OWL-DL Reasoner with acceptable to very good performance. It is the first implementation of the full decision procedure for OWL-DL (including Instances) Queries about instances that are written in languages such as RDQL or SPARQL. Pellet also implements the reasoner interfaces defined in those toolkits to answer queries. Pellet includes different sub modules that can load ontologies from these different representations.

92 KM Tool for Development of Online Expert Systems for Crops Sudeep Marwaha, Hari Om Agarwal, Pal Singh, V.K. Yadav

93 Introduction AgriDaksh is an online tool for developing crop based expert systems. It provides information and expert advice to the farmers and extension workers at Krishi Vigyan Kendra’ s according to their needs & available resources. For example: - On the basis of symptoms supplied by the farmer, diseases affecting the crop can be detected According to the geographical locations or climate, best variety can be suggested etc.

94 Ontology Based Expert System In earlier systems, a vast amount of knowledge was stored in the knowledgebase as rules. Rules were extracted manually and stored in the expert system. In our OBES, domain knowledge is stored in ontology, which is easy to create using available GUI editors.


96 OBES contd.. OBES have the advantage of distributive development and maintaining of knowledgebase over traditional expert systems. The application has been implemented in Java and Java Server Pages (JSP). The application allows users to: Classify the crop ontology and checking its Consistency.

97 Disease Diagnosis module

98 Structure of an Expert System USER Knowledge Acquisition Knowledgebase Inference Engine Explanatory Interface EXPERT Databases

99 Knowledge Acquisition Process Knowledge Engineer Text Books Domain Expert Knowledge- base Research Findings Knowledge, Concepts, Solutions Structured Knowledge Technical & Extension Bulletins Facts Data, Problems, Questions

100 N-Tier System Architecture Client Request Response Web Server Application Server JSP JENA Knowledgebase JESS

101 N-Tier System Architecture Software Requirements At Server Side Net Beans IDE 6.0 onwards Server – Tomcat 5.0 onwards or Glassfish Application Server Back End – SQL Server 5.0 onwards Browser – Internet Explorer 6.0 or above, Firefox etc. Protégé / WebProtégé JENA API JESS API At Client Side Any O.S. Any Browser, full compatibility with Internet Explorer 6.0 or above

102 N-Tier System Architecture Hardware Requirements At Server Side A server class machine with windows/Unix/Linux O.S. as a web server. A server class machine with SQL Server 2005 or above at windows 2003 Server or above Suitable backup mechanism At Client Side A desktop machine / laptop / mobile with GPRS (General Packet Radio Service) capability RAM – 256 MB or above

103 N-Tier SYSTEM ARCHITECTURE Application Logic Layer Java Server Pages (JSP) Java Servlets JDBC Java Bean Java Expert System Shell (JESS) JENA

104 AgriDaksh Features One system for all crops with ability to create knowledge models for new crops Location specific variety information with the ability to add multiple pictures for each variety Comprehensive plant protection sub module with – Diseases – Insects – Weeds – Nematodes – Physiological disorders

105 Ability for domain experts to define problems and create decision trees to solve the problems Ontology based diseases and insects identification and variety selection Ability to add static web pages Powerful administrative module Full featured online help Semantic Web compliant Built on robust, platform independent Java technology using n-tier web architecture AgriDaksh Features

106 AgriDaksh Modules Keeping in mind the user friendliness, AgriDaksh has been designed in the following modules: Knowledge Model Creation Knowledge Acquisition Problem Identification Knowledge Retrieval Ask Questions to Experts Administration

107 Maize AgriDaksh – Collaborated with Directorate of Maize Research – DMR Scientists are domain experts – AgriDaksh is a base technology

108 Home Page

109 Knowledge Model Creation First step for building an expert system of a crop through AgriDaksh is to build its knowledge model. Knowledge model can be build by selecting the desired attributes from the Attributes List and moving them to Selected Attribute List. Once, the desired attributes are chosen, domain experts can enter the values of these attributes for each and every variety of the crop.

110 Knowledge Model Creation Selected Attributes Attributes

111 Knowledge Acquisition Knowledge Acquisition module is used for entering knowledge about various entities such as Crop varieties, Diseases, Insect-pests, Weeds, Nematodes, Physiological disorders Post harvest technology.

112 Knowledge Acquisition – Variety Management

113 Problem Identification This module has two sub modules: Rule based problem identification First sub module allows the domain experts to define the problem and develop decision tree to solve the problem. Once the tree is developed, farmers can get the solution about the problem in their situation. Ontology based problem identification The second sub module allows the farmers to identify the diseases and insects affecting their crops as well as select varieties according to their location and conditions.








121 Ontology based Problem Identification


123 Knowledge Retrieval  Knowledge Retrieval module is the most important module as far as farmers are concerned.  Through this module, a farmer can get information about each and every thing that domain experts have entered  e.g., plant protection sub module allows farmers to retrieve knowledge about diseases, insects, weeds, nematodes and physiological disorders.

124 Knowledge Retrieval

125 Ask Questions to Experts Using this module a farmer can ask question directly to domain experts. The system transfers the question to relevant domain experts and sends answer to the farmer thorough email. The same is displayed in the system for the benefit of other farmers.

126 Administration This module is for the administrator for controlling the overall functionality of the system. Using this module administrator can create different type of users such as end users, domain experts, domain expert validators, and crop administrator. One can add a new crop and assign a crop administrator for that crop.

127 Thank you!

Download ppt "Knowledge Management through Ontologies. Web Today: Rich Information Source for Human Manipulation /Interpretation Human."

Similar presentations

Ads by Google