Practical knowledge modeling based on Protege

1. Introduction, uses and characteristics
of Protege 1. Introduction to Protege
Protege is an ontology editing and ontology development tool developed based on Java by the Bioinformatics Research Center of Stanford University School of Medicine. It is also a knowledge-based editor and is an open source software. This software is mainly used for the construction of ontologies in the Semantic Web. It is the core development tool for ontology construction in the Semantic Web. The version used in the following operations is 5.5.0.

2.Protege use

  • Protege is a set of free and open source tool software for building domain models and knowledge-based ontology applications.
  • Protege provides a large number of knowledge model architectures and actions for creating, visualizing, and manipulating ontologies in various forms of expression.
  • Domain-friendly (domain-specific) support can be implemented through user customization for creating knowledge models and populating data.
  • Protege can be extended in two ways: plugins and Java-based API.
  • Compared with other local construction tools, the biggest advantage of Protege is that it supports Chinese. On the plug-in, OntoGraf can be used to display Chinese relationships.

3.Protege features

  • Class modeling: Protege provides a graphical user interface to model classes (domain concepts) and their attributes and relationships.
  • Instance editing: From these classes, Protege automatically generates interactive forms, making effective instance editing possible for all users or domain experts.
  • Model processing: Protege has some plug-in libraries that can define semantics, answer queries, and define logical behaviors.
  • Model exchange: The final model (classes and instances) can be loaded and saved in a variety of formats, including XML, UML, and Resource Description Framework RDF.

2. Protege case:
The basic operations of Protege are introduced through simple examples, including establishing ontology, constructing classes, establishing subclasses, constructing relationships between classes, establishing object attributes, establishing data attributes, creating instances, saving ontology, visualization and reasoning. For specific kgexample-v2.owl file download, please refer to [2].

1. Create an ontology.
After opening Protege, you will see the interface for creating a new ontology, as shown below:

2. Build classes.
On the Entities page, select the Class tab, right-click owl:Thing, and select to add subcategories "People" and "Places".

3. Create a subcategory.
Right-click "Character" and add the subcategory "Zen Master", as shown below:

4. Build relationships between classes
Because characters and places are different things, that is, they are mutually exclusive (owl:disjoinWith). First select "People", click the + after DisjointWith in the Description on the right side of Entities, expand owl:Thing in the pop-up interface, select "Place" and confirm.

5. Create object properties
. Tag Entities->Object properties->right-click owl:topObjectProperty->Add Sub-properties->Zengzhu:

Add domain and range attribute values ​​​​to the properties, as shown below:

6. Create data properties
. First Entities->Data properties->owl:topDataProperty->Add Sub-properties->method number, then select the method number->Description->Range->Built in datatypes->xsd:string: Description

: Limit the value range of the "Fa No." attribute to a string.

7. Create an instance.
First label Entities->Individuals->click the diamond icon->Foyin Zen Master, then Entities->Description->Types->Class Hierarchy->Zen Master. In this way, the instance has type constraints, as shown below:

Add the relationship between instances, select "Foyin Zen Master"->Property assertions->Object property assertions->click ±>enter the object property name (Zengzhu)- >Enter the instance name (Zhenjiang Jinshan Temple). In this way, "Foyin Zen Master" and "Zhenjiang Jinshan Temple" are related through "Zeng Live", as shown below:

Add attribute value to the instance, select "Su Shi"->Property assertions->Data property assertions->+:

This will be "Su Shi" "Instance attribute "alias" adds specific values, namely Su Dongpo, Dongpo.

8. Save the ontology. Press
Ctrl+S to save the ontology. Select the "RDF/XML Syntas" file format and save it as kgexample.owl. As follows:

9. Visualize
Windows->Tabs->OntoGraf, as shown below:

10. Reasoning
Reasoner->HermiT->Start reasoner, the information obtained by reasoning will be displayed with a yellow background in the corresponding description. Pei Xiu is Pei Wende's father. The father's domain is the character, and the range is the man. It is inferred that Pei Xiu is an instance of the man, as shown below:

For the derived information, if you want to know why it was derived by the inference engine, you can click behind the derived information. question mark and the reason for the explanation will be displayed in a new dialog box.

References:
[1]Protege plug-in library: https://protegewiki.stanford.edu/wiki/Protege_Plugin_Library
[2]kgexample-v2.owl: https://url39.ctfile.com/f/2501739-934982316-535253? p=2096 (access password: 2096)

Guess you like

Origin blog.csdn.net/shengshengwang/article/details/132866903