ALC: define an ALC Knowledge Base - description-logic

Hello I am new to description logics and ALC and I find it confusing defining a KB.
More specifically I am trying to create an ALC KB for the first 3 sentences below and
an ALC formula φ that formalizes the last one.
Sentences:
• Anna is a person.
• The only kind of coffee that Anna drinks is latte.
• A French is a person who drinks only latte coffee.
• Anna is French.
My KB so far:
TBox T:
French ≡ Person ⊓ ∀drinks.Latte
Abox A:
Person(ANNA), drinks(ANNA, LATTE)
φ: French(ANNA)
My questions are:
Is it wrong that I considered latte as concept or I should have written ∀drinks.Coffee instead, because coffee could be considered also a concept?
Is the assertion drinks(ANNA, LATTE) redundant because in the Tbox ∀drinks.Latte exists?
Any suggestions would be appreciated. Cheers!

I think you can model Person, French, Coffee and Latte as concepts with the following axioms:
French ⊑ Person
Latte ⊑ Coffee
The axiom French ≡ Person ⊓ ∀drinks.Latte may be problematic. The reason being that the reasoner will infer whenever an individual x is a Person and x only drinks coffee, that x is French. But it is completely possible that there are people who only drink only lattes but they are not necessarily French. For that reason it is better to express it as follows:
French ⊑ Person ⊓ ∀drinks.Latte
If you now have ANNA as an individual and you assert French(ANNA), this is sufficient. I.e., the reasoner will "know" that ANNA drinks only lattes. However, if you do this in Protege (for example), the reasoner will not infer that ANNA only drinks lattes. The reason for this is that ANNA is in essence an instance of the complex concept expression Person ⊓ ∀drinks.Latte, because we said she is French. Reasoners give inferences in terms of named concepts only because in general there can be an infinite number of inferences in terms of complex concept expressions.
To see that the reasoner "knows" this. Create another sublass of Coffee class, say Expresso that is disjoint with Latte. Create an instance of Expresso, say EXPRESSO and assert drinks(ANNA, EXPRESSO). Running the reasoner now will cause an inconsistency.
As for your question regarding modeling Latte as concept or an individual: usually it is better to model as a class. I explain this for OWL in this SO question. This holds to true for ALC as well.
If you want understand more about when to use equivalence versus subsumption, I have written about this on my blog here.

Related

Translate english sentences to ALC description logic

I have the following two English sentences:
Mary is a Person.
Bulldog is a specie of dog. French bulldog is a specie of bulldog.
The only kind of dog that Mary owns is French bulldog.
I would like to know which of the following ways is the correct way to translate the third and the sentences based on the knowledge given.
1st approach
Bulldog ⊆ Dog
FrenchBulldog ⊆ Bulldog
FrenchBulldog ⊆ Dog
(∀owns.FrenchBulldog ⨅ Person)(MARY)
2nd approach
∀owns.Bulldog ⊆ ∀owns.Dog
∀owns.FrenchBulldog ⊆ ∀owns.Bulldog
(¬(∀owns.Dog⊔Bulldog) ⨅ ∀owns.FrenchBulldog ⨅ Person)(MARY) (*)
3rd approach
Bulldog ⊆ Dog
FrenchBulldog ⊆ Bulldog
(Person⨅(∀owns.FrenchBulldog⨅(∀owns.¬Dog⊔∀owns.¬Bulldog)))(MARY) (**)
I know that the first approach is correct. But I would like to re-written the third English sentence as approaches 2-(*), 3-(**).
Thanks in advance for any advice.
Your approach 1 is correct and approaches 2 and 3 are incorrect.
I assume with
(¬(∀owns.(Dog⊔Bulldog)) ⨅ ∀owns.FrenchBulldog ⨅ Person)(MARY)
by adding (¬(∀owns.(Dog⊔Bulldog)) you trying to ensure Mary only owns FrenchBulldogs, but it is achieving the opposite.
(¬(∀owns.(Dog⊔Bulldog)) ≡ ∃owns.¬(Dog⊔Bulldog) ≡ ∃owns.(¬Dog ⨅ ¬Bulldog)
Thus in essence you are saying that Mary owns only French bulldogs (∀owns.FrenchBulldog) AND you are saying she owns at least 1 thing that is not a dog and not a bulldog (∃owns.(¬Dog ⨅ ¬Bulldog)).

Formalize english question into a knowledge base using ALC formulas

I have the following four sentences:
Mary is a person.
Bulldog is a specie of dog. French bulldog is a specie of bulldog.
The only kind of dog that Mary owns is French bulldog.
A French is a person who owns only bulldog dogs.
I would like to formalize those into a Knowledge Base KB.
I will right below my approach and will also post some questions.
Concepts = Person, Dog, Bulldog
Individuals = MARY, FRENCHBULLDOG, BULLDOG
Roles = ownsDog
ABox = { Person(MARY),
Dog(BULLDOG),
Bulldog(FRENCHBULLDOG),
Person ⨅∀ ownsDog.Bulldog{FRENCHBULLDOG}(MARY), (1)
ownsDog(MARY, FRENCHBULLDOG) (2)
}
TBox = { French ≡ Person⨅∀ownsDog.Bulldog, Bulldog ⊆ Dog }
First I would like to know if the Knowledge Base is correct. And also if I should keep the axiom (1) or (2) or both of them.

Is there an API to get a full citation (such as a BibTeX or JSON citation) from an arbitrary URL?

Say I have a URL like https://www.science.org/doi/10.1126/science.abb4363, how can I get the full citation as:
#article{
doi:10.1126/science.abb4363,
author = {Sergio Almécija and Ashley S. Hammond and Nathan E. Thompson and Kelsey D. Pugh and Salvador Moyà-Solà and David M. Alba },
title = {Fossil apes and human evolution},
journal = {Science},
volume = {372},
number = {6542},
pages = {eabb4363},
year = {2021},
doi = {10.1126/science.abb4363},
URL = {https://www.science.org/doi/abs/10.1126/science.abb4363},
eprint = {https://www.science.org/doi/pdf/10.1126/science.abb4363},
abstract = {There has been much focus on the evolution of primates and especially where and how humans diverged in this process. It has often been suggested that the last common ancestor between humans and other apes, especially our closest relative, the chimpanzee, was ape- or chimp-like. Almécija et al. review this area and conclude that the morphology of fossil apes was varied and that it is likely that the last shared ape ancestor had its own set of traits, different from those of modern humans and modern apes, both of which have been undergoing separate suites of selection pressures. Science, this issue p. eabb4363 A Review describes the unique and varied morphologies in fossil and modern apes, including humans. Humans diverged from apes (chimpanzees, specifically) toward the end of the Miocene ~9.3 million to 6.5 million years ago. Understanding the origins of the human lineage (hominins) requires reconstructing the morphology, behavior, and environment of the chimpanzee-human last common ancestor. Modern hominoids (that is, humans and apes) share multiple features (for example, an orthograde body plan facilitating upright positional behaviors). However, the fossil record indicates that living hominoids constitute narrow representatives of an ancient radiation of more widely distributed, diverse species, none of which exhibit the entire suite of locomotor adaptations present in the extant relatives. Hence, some modern ape similarities might have evolved in parallel in response to similar selection pressures. Current evidence suggests that hominins originated in Africa from Miocene ape ancestors unlike any living species.}}
I was able to download the citation by visiting the link manually, but are there any programmatic APIs to convert a URL (like even a Wikipedia URL) into a formal citation? If not, I am not sure what is the recommended approach to getting these efficiently.

Can knowledge graphs deal with a sentence including a preposition or adjective

I am thinking of how suitable knowledge graphs such as "Google Knowledge Graph", "WordNet", "Yago", or "FreeBase" is for representing facts including a preposition or adjective.
For example, "Obama has a daughter" can clearly be represented by node and link relations. "Obama" and "daughter" are nodes. "has a" is a link.
However, I can not find a way to represent a sentence with a preposition or adjective by googling by several keywords.
Suppose you have a fact that "Obama has a white dog in whitehouse", it seems impossible to be represented by graph structures. Obama's dog is white, bat not all dog is white. Also, Obama's dog is kept in whitehouse, but not all dog is.
My first question is whether knowledge graph can represent this kind of fact or not. My second question is how knowledge graph can do this, if the first answer is yes.
You'd represent this is a series of facts. For example:
barackObama owns fido
fido isA dog
fido livesIn theWhiteHouse
fido hasFurColour white
i.e. you have a specific node in your graph which represents the specific object, and then assert further facts about that object. Similarly, while you could assert a single fact "barackObama hasA daughter", you'd probably assert a number of facts linking the two nodes "barackObama" and "maliaObama".
As with everything else, there is no one "right" representation of your data - it varies depending on the problem you're trying to solve.

DL QUERY : Pizza Ontology : Is there a way to get the toppings ON the pizza? [duplicate]

I'm using Protege v4.3 for making ontologies.
I have a question about OWL ontology and DL query.
For instance, in the Pizza ontology,
http://owl.cs.manchester.ac.uk/co-ode-files/ontologies/pizza.owl
I can execute the DL query
hasTopping some CheeseTopping
The result is
American, AmericanHot, Cajun,.. etc. That's OK.
Now, i tried DL query
isToppingOf some American
But the result is nothing.
Because the property isToppingOf is inverse property of hasTopping,
I expected to get the result including FourCheesesTopping, CheeseyVegetableTopping, etc. from that query(by inference). Bud it didn't.
Is there any ways automatic reasoning like that?
The class expression
hasTopping some CheeseTopping
is the set of individuals each of which is related to some CheeseTopping by the hasTopping property. In the Pizza ontology, where there are no individuals, you can still get class subclass results for this query because the definition of certain types of Pizzas (e.g., American) are such that any Pizza that is an American must have such a topping.
Now, the similarly-structured query
isToppingOf some American
is the set of individuals each of which is related to some American pizza by the isToppingOf property. However, the Pizza ontology defines no particular individuals, so there aren't any individuals as candidates. But what about classes that might be subclasses of this expression? For instance, you mentioned the FourCheeseTopping. Now, some particular instance of FourCheeseTopping, e.g., fourCheeseTopping23 could be a topping of some American pizza, e.g.:
fourCheeseTopping23 isToppingOf americanPizza72
However, fourCheeseTopping might not have been placed on any particular pizza yet. When we choose an arbitrary individual of type FourCheeseTopping, we can't infer that it is a topping of some American pizza, so we cannot infer that the class FourCheeseTopping is a subclass of
isToppingOf some American
because it's not the case that every instance of FourCheeseTopping must be the topping of some American pizza. For a similar case that might make the logical structure a bit clearer, consider the classes Employer and Person, and the object property employs and its inverse employedBy. We might say that every Employer must have some Person as an Employee (since otherwise they wouldn't be an employer):
Employer ⊑ employs some Person
However, since a person can be unemployed, it is not true that
Person ⊑ employedBy some Employer
even though employs and employedBy are inverses.
What you can do, though, if you want to know whether toppings of a particular type could be placed an pizza of a particular type, is to ask whether
PizzaType ⊓ ∃hasTopping.ToppingType
is equivalent to, or a subclass of, owl:Nothing. For instance, since an American pizza has only toppings of type TomatoTopping, MozzarellaTopping, and PeperoniTopping [sic], the class
American ⊓ ∃hasTopping.MixedSeafoodTopping
is equivalent to owl:Nothing:
On the other hand, since an American pizza must have a MozzarellaTopping, the class
American ⊓ ∃hasTopping.MozzarellaTopping
is equivalent to American:
When you ask what are the subclasses of:
isToppingOf some American
you are asking what classes contain toppings that are necessarily used on top of American pizzas. But in the pizza ontology, no such class exists. Consider cheese toppings: Are all cheese toppings on top of some American pizzas? No, some cheese toppings are on top of Italian pizzas. The same holds for all topping classes.