Appendices

A.1    ACRONYMS & ABBREVIATIONS

ABox:

Assertional Box

BFO:

Basic Formal Ontology

CIO:

Chief Information Officer

DL:

Description logic

ER:

Entity Relationship

FIBO:

Financial Industry Business Ontology

FOL:

First-Order Logic

IRI:

International Resource Identifier

OO:

Object-Oriented

OWL:

Web Ontology Language

RDF:

Resource Description Language

SPARQL:

SPARQL Protocol and RDF Query Language

SHACL:

Shapes Constraint Language

SPIN:

SPARQL Inferencing Notation

SQL:

Structured Query Language

SWRL:

Semantic Web Rule Language

TBox:

Terminological Box

URI:

Uniform Resource Identifier

UTC:

Coordinated Universal Time.

W3C:

Worldwide Web Consortium

XML:

Extensible Markup Language

A.2    E6TOOLS VISUAL OWL SYNTAX

Image

e6Tools Legend

A.3    RECOMMENDED RESOURCES FOR FURTHER LEARNING

To round out your knowledge of RDF, RDF Schema, and OWL, I recommend two books. The Semantic Web for the Working Ontologist is closest to this book, having similar goals and target audience. It covers much of the same ground in a very different way. A Semantic Web Primer is an academic text in its third edition. It has been translated into dozens of different languages.

Below are selected reference materials that you may find useful, arranged by topic.

Semantic Web Technology Stack

Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL, (2nd edition), by D. Allemang and J. Hendler. Morgan Kaufmann, 2011

A Semantic Web Primer, by G. Antoniou, P. Groth, F. van Harmelen, and R. Hoekstra. MIT Press, 2012

Learning SPARQL, by B. DuCharme, Sebastopol, CA: O’Reilly, 2011

Validating RDF Data, by J. E. L. Gayo, E. Prud’hommeaux, I. Boneva, and D. Kontokostas, Synthesis Lectures on the Semantic Web: Theory and Technology, Morgan & Claypool, 2018. DOI: 10.2200/S00786ED1V01Y201707WBE016.

“A Desription Logic Primer,” https://arxiv.org/pdf/1201.4089.pdf. An excellent introduction to description logics describing the relationship with OWL2.

W3C Standards and Submissions

OWL Related

•  XML Schema https://www.w3.org/XML/Schema

•  RDF 1.1 Primer https://www.w3.org/TR/rdf11-primer/

•  RDF 1.1 Turtle https://www.w3.org/TR/turtle/

•  RDF 1.1 Concepts and Abstract Syntax https://www.w3.org/TR/rdf11-concepts/

•  RDF Schema 1.1 https://www.w3.org/TR/rdf-schema/

•  OWL 2 Web Ontology Language Quick Reference Guide (Second Edition) https://www.w3.org/TR/owl2-quick-reference/

•  OWL 2 Web Ontology Language Document Overview (Second Edition) https://www.w3.org/TR/owl2-overview/

•  OWL 2 Web Ontology Language: Structural Specification and Functional-Style Syntax (Second Edition) https://www.w3.org/TR/owl2-syntax/

•  OWL 2 Web Ontology Language Manchester Syntax (Second Edition) https://www.w3.org/TR/owl2-manchester-syntax/

•  OWL 2 Profiles: An Introduction to Lightweight Ontology Languages, by M. Krotzsch http://korrekt.org/papers/Kroetzsch_OWL_2_Profiles_Reasoning_Web_2012.pdf

Companion Standards and Submissions:

•  SKOS Simple Knowledge Organization System Primer https://www.w3.org/TR/skos-primer/

•  SKOS Simple Knowledge Organization System Namespace Document HTML Variant https://www.w3.org/2009/08/skos-reference/skos.html

•  Using OWL and SKOS https://www.w3.org/2006/07/SWD/SKOS/skos-and-owl/master.html

•  SWRL: A Semantic Web Rule Language Combining OWL and RuleML https://www.w3.org/Submission/SWRL/

•  SPIN: Overview and Motivation https://www.w3.org/Submission/spin-overview/

•  SPARQL Query Language for RDF https://www.w3.org/TR/rdf-sparql-query/

•  R2RML: RDB to RDF Mapping Language https://www.w3.org/TR/r2rml/

•  Shapes Constraint Language https://www.w3.org/TR/shacl/

Conceptual Modeling and Ontology Engineering

Formal Ontology of Subject, by C. Welty and J. Jenkins, Data & Knowledge Engineering 31: 155–181, 1999. https://pdfs.semanticscholar.org/b93f/5ed4d27056f6a7517589b2f0c63530e1b4e0.pdf

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

Talk: Conceptual vs. Operational: A False Distinction? by M. Uschold and D. McComb https://www.slideshare.net/UscholdM/conceptual-vs-operational-a-false-distinction

“The importance of distinguishing between terms and concepts” by M. Uschold https://semanticarts.com/blog/terms-concepts-whats-important-pt-1/

“Finding and avoiding bugs in enterprise ontologies,” by M. Uschold http://ceur-ws.org/Vol-1586/codes1.pdf

Actual Ontologies

•  gist: https://www.semanticarts.com/gist/

•  Basic Formal Ontology (BFO): http://ifomis.uni-saarland.de/bfo/

•  GoodRelations http://www.heppnetz.de/ontologies/goodrelations/v1

•  Ontology for Media Resources 1.0 (by W3C) https://www.w3.org/TR/mediaont-10/

•  Financial Industry Business Ontology (FIBO) https://www.edmcouncil.org/financialbusiness

•  Talk: Putting FIBO to Use: Some Brass Tacks by M. Uschold https://www.slideshare.net/UscholdM/putting-fibo-to-use

Ontologies: What Are They and What Are They For?

•  Software Wasteland, by D. McComb https://technicspub.com/software_wasteland/ Describes problems with the state of enterprise computing that ontology and semantic technology can play a key role in addressing.

•  “A translation approach to formal cntologies,” T. Gruber. Knowledge Acquisition 5(2): 199–200, 1993. http://ksl-web.stanford.edu/KSL_Abstracts/KSL-92-71.html. The original paper that kicked off the idea of using an ontology as a computational artifact.

•  “Ontologies: principles, methods and applications,” M. Uschold, M. Gruninger, Knowledge Engineering Review 11(2),1996. The first comprehensive introduction to the emerging field of ontologies and their applications.

•  “Ontologies and semantics for seamless connectivity,” M. Gruninger and M. Uschold. SIGMOD Record, 33(4):58–64, 2004. A short paper introducing the need and nature and uses of ontologies.

•  Ontology and database schema: What’s the difference?” Uschold, M. Applied Ontology, 10(3-4) pp. 243–258, 2015. Based on a talk given in 2011: https://www.slideshare.net/UscholdM/ontologies-and-db-schema-whats-the-difference.

A.4    ANSWERS TO EXERCISES

A.4.1    CHAPTER 1

Exercise 1: Draw a diagram highlighting the key concepts and relationships for the subject of registering corporations.

Image

Exercise 2: How do you resolve the apparent contradiction that the U.S. Supreme Court’s Citizen’s United decision declared that a corporation is legally a person with the above common sense example in the ontology? Can you think about it in such a way that there is in fact no contradiction? Answer: The word “person” is being used ambiguously to mean two different things. One is a physical object and the other is a social object. Therefore, there is no contradiction.

A.4.2    CHAPTER 2

Exercise 1: First, see if you can determine which of the six kinds of assertions listed Table 2.3 are being made and which are not. Pay particular attention to whether, where and how object properties are used vs. data properties.

Answer

1.  The four instances of owl:Thing are examples of assertions described in row 1 in the table.

2.  The three links between the instances are object property assertion (row 5 in the table).

3.  The nine green boxes inside the instances are data property assertions (row 6 in the table).

Exercise 2: Start with the statement “Every PatientVisit has at least one healthcare provider” and through a series of English statements, each rephrasing the prior until you end up with: “Every PatientVisit is the subject of at least one triple where the predicate is careProvider and the object is of type Person

Answer

1.  Every PatientVisit has at least one healthcare provider.

2.  Every PatientVisit is associated with one Person who is providing care.

3.  Every PatientVisit has a careProvider relationship with at least one Person.

4.  Every PatientVisit is the subject of at least one triple where the predicate is careProvider and the object is of type Person.

Exercise 3: If you had to give that class “doe:lastName some xsd:string” a name, what might it be? What needs to be true to be a member of this class?

Answer: To be a member of the property restriction class “doe:lastName some xsd:string” an individual must have at least one last name that is a string. If you gave that class a name, “ThingWithALastNameThatIsAString” would be accurate.

Exercise 4: Can you think of other functional properties? Can someone have more than one first name? more than one last name? Can there be more than one person providing care on a given PatientVisit?

Answer: We saw that there can be multiple care providers on a single patient visit. If you count nicknames, people do have more than one first name. You might to say there is only one “official” first name, in which case the property could be functional. People can also use more than one last name. Some people choose to keep their own last name for most purposes, but use their spouse’s last name for some official purposes. Again, there might be a single “official” last name that appears on your passport that could be functional. If your ontology is to be used for names in multiple countries, the notion of first and last name does not work so well. There are a lot of variations.

Other properties that are likely to be functional in most situations include the following:

•  identifies: an identifier identifies no more than one thing.

•  hasDateOfBirth: a person has only one date of date of birth

•  hasLatitude: a place on the Earth has no more than one latitude. Other than the poles, each place only has one longitude as well. This is an edge case that you could choose to ignore and make hasLongitude functional as well.

•  hasVIN: a vehicle only has one vehicle identification number

Exercise 5: Is the property careRecipient transitive? Why or why not?

Answer: It is not. The careRecipient always links a PatientVisit to a Person, it cannot be used to link a Person to anything. For a property to be transitive, the domain and range need to be the same.

Exercise 6: Explain why this works. How can just specifying the two-high level classes being disjoint make the others also disjoint?

Answer: Restated, the question is given that person and event are disjoint, how can we conclude that every class on the left side of Figure 2.15 is disjoint from every class on the right? Let’s try to infer that cancer patient is disjoint from patient visit. We have to prove that those two classes cannot have any members in common. Let’s see what happens if we assert an individual to be both a cancer patient and a patient visit.

The meaning of rdfs:subClassOf tells us that every cancer patient is also a patient, which, in turn, is also a person. It also tells us that every patient visit is an event. So our individual is inferred to be both a person and an event. But person and event are disjoint. So it is impossible for the individual to be both a cancer patient and a patient visit. Therefore, the two classes are disjoint.

A.4.4    CHAPTER 4

Exercise 1: Can you think of examples of real world properties that might be either a subproperty or superproperty of isSubsidiaryOf?

Answer:

    Superproperty: partOf.

    Subproperty: whollyOwnedSubsidiary

Exercise 2: What would the Venn diagram in Figure 4.3 have to look like to rule out being an employee?

Answer:

The employedBy and contractorFor ovals would have no overlap.

Exercise 3: Can you think of a good name for the inverse of hasBorrower? Try filling in the blank in this sentence:

“John Doe ___________ loan contract 857466”

What about worksFor? Try filling in the blank:

“Apple ___________ Tim Cook”

Answer:

hasBorrower “John Doe is the borrower on loan contract 857466.” Thus, the inverse of hasBorrower could be isBorrowerOn.

worksFor “Apple has the worker Tim Cook.” Thus the inverse of worksFor could be has-Worker.

NOTE: Sometimes there aren’t any good names for inverse properties.

Exercise 4: Draw a Venn diagram like the one in Figure 4.9 for the property chain that goes from the care provider to the patient through the patient visit as depicted in Figure 4.11. Hint: the property chain you want is: careProviderOn o careRecipient. It will be a sub-property of gaveCareTo.

Answer:

Image

Exercise 5: Think of a few more properties in each category: symmetric, asymmetric and neither. Which categories were easy vs. hard to find properties for? Which category do you think will generally have the most properties? Why?

Hint: What needs to be true about the domain and range of a symmetric property?

Answer:

Symmetic: is exchanged for, is topically related to, owl:sameAs

Asymmetric: employed by, care provider, has borrower

Neither: has favorite colleague, tends to result in, manages

When thing mutually tend to result in the other, you have either a vicious or virtuous cycle. One person could manage another person in one area, and be managed by that same person in another area.

A symmetric property must have the same domain and range. That is why there are relatively few. Most relationships occur between different kinds of things.

Exercise 6: Answer the following three additional questions asking what we can know about the characteristics of the inverse of a property from the characteristics of the property. Specifically:

1.  If property p is functional, what can we say about whether p_inv is or is not functional?

2.  If property p is symmetric, what can we say about whether p_inv is or is not symmetric?

3.  If property p is transitive, what can we say about whether p_inv is or is not transitive?

Hint: it may help to draw some Venn diagrams representing properties as sets of pairs.

Answer:

1.  If p is functional, p_inv need not be functional. A person has only one last name, but many people can have that last name.

Similarly: If p is inverse functional, p_inv need not be inverse functional. This is for the same reason as the above.

2.  If p is symmetric, p_inv is also symmetric. This follows from the fact that a symmetric property is the inverse of itself.

3.  If p is transitive, p_inv is also transitive. This one is a bit less obvious. We can go through the following line of reasoning to convince ourselves. The transitivity of p means for every x, y, and z:

IF:     x p y and y p z

THEN: x p z.

Recall that asserting x p y is the same as asserting y p_inv x. So we can rewrite the above as:

IF:     y p_inv x and z p_inv y

THEN: z p_inv x.

Since the order in the first line does not matter we can rewrite this as:

IF:     z p_inv y and y p_inv x

THEN: z p_inv x.

This is the law of transitivity, but it is slightly hidden because the variables are not in the usual order. Let’s make it more obvious. Since x, y, and z are totally arbitrary, we can use different variable names. If we substitute u for z, v for y, and w for x, we get:

IF:     u p_inv v and v p_inv w

THEN: u p_inv w.

This is exactly what it means for p_inv to be transitive.

This sort of reasoning is sometimes needed to discover and convince yourself about the truth of some proposition. There is a way to see this more intuitively by thinking of an example. Let’s say that the property partOf is transitive. A good name for the inverse is hasPart (see the top of Figure 4.20). The question is whether the bottom figure necessarily follows. After a while, I hope you can convince yourself.

Image

Figure 4.20: Transitivity of inverse.

Exercise 7: Can you think of another example where two properties will be disjoint? Hint: think about loans, borrowers and lenders.

Answer: If a loan contract is represented as an individual, the properties hasBorrower and hasLender could connect that contract to the two main parties. Since the borrower and lender cannot be the same party on a single loan, those two properties would be disjoint.

Exercise 8: A symmetric property is its own inverse. What similarly pithy thing can be said that characterizes the essence of what it means to be an asymmetric property?

Answer: An asymmetric property is disjoint from its inverse.

A.4.5    CHAPTER 5

Exercise 1: Create Venn diagrams to convince yourself that the inferences for intersection, union and complement are justified.

Answer:

Image

Exercise 2: Spell out the inferences regarding TwoWheeledThing in a more precise notation using triples.

Answer: The following expression in Manchester syntax,

Image

sanctions the following inferences:

x rdf:type :TwoWheeledVehicle

IF AND ONLY IF

There exists two individuals w1 and w2 such that

Image

Exercise 3: Can you convince yourself that asserting a given property, p, to be functional means the same thing as asserting that owl:Thing is a subclass of the restriction (p max 1)? Hint: draw a picture of a Venn diagram.

Answer: Note: this is not an easy exercise. It may take a while to understand the answer, even after reading it. To say that owl:Thing is a subclass of (hasBiologicalMother max 1) is to say that every member of owl:Thing (i.e., every individual, period) can have no more than one biological mother. But that is exactly what it means for hasBiologicalMother to be functional.

Exercise 4: Write down in English the meaning of each of the data property restrictions.

1.  (:firstName some xsd:string)

The set of individuals with at least one first name that is a string.

The set of all individuals that are subjects of at least one triple using the predicate firstName whose object is a literal of datatype xsd:string.

2.  (:hasSSN all xsd:integer)

The set of all individuals that only have social security numbers that are integers.

The set of all individuals that are subjects of triples using the predicate hasSSN whose objects are only literals of datatype xsd:integer.

3.  (:hasDescription min 1 xsd:string)

The set of all individuals that have at least one description that is a string.

The set of all individuals that are subjects of at least one triple using the predicate hasDescription, whose object is a literal of datatype xsd:string.

4.  (:hasLicenseNumber max 1 xsd:string)

The set of all individuals that have at most one license number that is a string.

The set of all individuals that are subjects of at most one triple using the predicate hasLicenseNumber, whose object is a literal of datatype xsd:string.

5.  (:hasCodeName exactly 2 xsd:string)

The set of all individuals that have exactly two code names.

The set of all individuals that are subjects of exactly two triples using the predicate hasCodeName, whose objects are literals of datatype xsd:string.

6.  (:hasColor “red”^^xsd:string)

The set of all individuals that have color red, as a string

The set of all individuals that are subjects of triples using the predicate hasColor, whose object is the literal: “red”^^xsd:string.

A.4.6    CHAPTER 6

Exercise 1: Given our definition for a security agreement, what if all you know is the following:

:_x doe:partOf :_LoanContract_203 .

:_?b203 rdf:type :LoanContract .

What if any inferences can be made?

Answer: None. Being part of a loan contract is necessary but not sufficient to infer into the class, SecurityAgreement. The individual, _x might be one of several terms that are part of the contract. In general, the subclass usage of a restriction sanctions inferences if you know something is a member of a class, but you cannot infer into the class. For that you need to use equivalence.

Exercise 2: Draw a Venn diagram to make it easy to see why :Commitment is inferred to be a subclass of :Intention.

Answer:

Image

A.4.8    CHAPTER 8

Exercise 1: What justifies the inference of Brother into Male and Sister into Female in the examples shown in Figure 8.11.

Answer:

Top of figure: A Brother must be a brotherOf some Person. The inverse of brotherOf is hasBrother which has range of Male. This means that the domain of brotherOf is Male. Thus a Brother has to be a Male.

Bottom of figure: The inference is easier in this case. A Brother is the intersection of two classes, one of which is Male. Therefore a Brother has to always be Male.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset