Modeling Natural Language Metaphors with an Answer Set Programming Framework J.C. Acosta-Guadarrama1 , Rogelio Dávila-Pérez2 , Mauricio Osorio3 , and Victor Hugo Zaldivar4? 1 Universidad Autónoma del Estado de México, Toluca, Estado de México, México [email protected]; 2 División de Posgrado, Universidad Autónoma de Guadalajara, Zapopan, Jal., México [email protected]; 3 Universidad de las Américas, Puebla , Cholula, Puebla, México [email protected]; 4 Departamento de Electrónica, Sistemas e Informática, Instituto Tecnológico y de Estudios Superiores de Occidente , Tlaquepaque, Jal., México [email protected]; Abstract. Metaphors are natural language constructions that play an important role in the way human beings communicate knowledge and understand the world. Some formal philosophers such as Searle and Lakoff claim that the semantic analysis of expressions that involve fictional stories and metaphors are examples of the inadequacy of using predicate logic for the analysis of the meaning of language. D’Hanis proposes that using predicate logic in combination of non-monotonic reasoning is possible to interpret metaphorical expressions. In this paper, we introduce an approach for modelling metaphorical thinking using a particular form of logic programming called answer set programming (ASP). ASP essentially enhances the logical apparatus of predicate calculus by introducing mechanisms such as negation as a failure that enable the system to accomplish non-monotonic reasoning. We show that using ASP is possible to model the meaning of some expressions involving metaphorical constructions and the implementation of metaphorical reasoning mechanisms that could be a great addition to any knowledge-based application. Key words: metaphors; metaphorical thinking; philosophical logic; nonmonotonic reasoning; answer-set programming. 1 Introduction Metaphors are not just a linguistic phenomenon or an atypical use of language. Either from a philosophical point of view, such as Wittgenstein’s family resem? Authors are listed in alphabetical order, their position does not represent their contribution to the present document. blance [1] or from a more empirical point of view such as Searle [2] and Lakoff [3, 4] , one can say that metaphors play a central role in human cognition, a role that has not been properly addressed in knowledge representation or natural language processing systems. What is a metaphor and why is it so important? According to Indurkhya [5], in a metaphor we must have a source and a target. A metaphor consists in describing the target, an object or an event, in terms of concepts that belongs to the source. A metaphor is made meaningful by interpreting the source unconventionally in the target. Metaphor interpretation is subjective, in part because the conventional meaning of words and phrases are also subjective. Moreover, metaphors are asymmetric.5 Thus, the metaphorical content of a description is a notion of degree. There are statements that are clearly metaphorical such as: “The sky is crying”. While for some others it is not clear, such as: “The chairman of the meeting plowed through the agenda”. Some authors [6] consider that the metaphorical content dissolves as the phrases are used in daily basis. This issue is an open discussion and is beyond the scope of this paper. As we can see, metaphors play a central role in the way people see the world. That is, in the way that people organize and interact with their knowledge of the world. That means that any knowledge system aiming at understanding and using metaphors must consider not only assigning a meaning to a metaphorical description, but also some metaphorical mechanisms used in building categories and reasoning with them. These metaphorical reasoning mechanisms will be a great addition to any knowledge-based application, especially those aiming at dealing with ontologies. In the following section, we introduce briefly Answer-Set Programming6 . In section 3, a formal framework is build to accomplish the analysis of metaphorical expressions. In section 4, we undertake the modeling of metaphorical expressions. In section 5, we draw some conclusions pointing out the simplicity in which this reasoning mechanism could be integrated in a knowledge-based system. 2 Preliminaries Finally, in this paper we assume that the reader is familiar with basic notions of logic programming [6] and in particular with Answer-Sets Programming, ASP. Answer-Set Programming, also known as A-Prolog [7], represents a relatively new paradigm for logic programming. ASP is a declarative knowledge representation that is implemented as a logic programming language. ASP allows solving problems with default knowledge and produce non-monotonic reasoning using the notion of negation as a failure. ASP in contrast with Prolog, covers the whole 5 6 That is, when the source and target of a metaphor are reversed, the meaning can change and the description may even cease to be a metaphor. Consider for instance “Computers are brains” vs. “Brains are Computers”. In this paper we assume that the reader is familiar with basic notions of logic programming [16] and in particular with ASP. language of predicate logic, introducing the classical negation (represented by the symbol “−” in the formulae), which is different from the symbol for negation as a failure: not. There are several popular software implementations to compute answer sets. In this work, we verified our experiments with an open source solver called dlv.7 The efficiency of such solvers has increased the practical list of applications in the areas of planning, intelligent agents and artificial intelligence. We represent knowledge by means of Answer Set Programming (ASP), as it is one of the most studied and successful semantics to reason about incomplete (unknown) information; in this section, we provide a very-short description of ASP, which is identified with other names like Stable Semantics for Logic Programming or Stable Model Semantics [8] and A-Prolog. Its formal language and some more notation are introduced in our context as follows: Definition 1 (ASP Language of logic programs, LASP ). In the following LASP is a language of propositional logic with symbols: a0 , a1 , . . . ; connectives: “,” (conjunction) and meta-connective “;”; disjunction ∨, also denoted as |; ← (also denoted as →); ¬ (negation as failure or weak negation, also denoted with the word not); “∼” (strong negation, equally denoted as “−”). The propositional symbols, Σ, are also called atoms or atomic propositions. A literal is an atom or a strong-negated atom. A rule ρ is an ordered pair h(ρ) ← b(ρ), where h(ρ) is a possibly-empty set of literals, and b(ρ) is a possibly-empty set of literals or ¬-negated literals. For convenience, we shall constrain to a finite set of literals. With the notation just introduced in Definition 1, one may construct program clauses of several forms that are well known in the literature, such as Extended Logic Program (ELP), Extended Disjunctive Logic Program (EDLP), etc. In particular we shall use EDLP, as in Definition 1. We can also have a shorthand notation when using variables in a rule, which we call a schema for the set of its ground instantiations. Finally, a logic program (or just program) is a possibly empty finite set of such rules. Informally, the semantics of such programs consists in reducing the general rules to rules without negation-as-failture “¬”, because the latter are universally well understood. For page limitation, we just skip the formal definition of such reduct, which can be easily found in the literature [8]. 3 Metaphors in ASP The modelling of metaphorical reasoning in a non-monotonic framework is proposed by D’Hanis[9]. In her paper, she models the meaning of metaphorical expressions in a formal system that she calls adaptive logic. Adaptive logic is structured in three layers: an Upper Limit Logic (ULL), a Lower Limit Logic (LLL) and an adaptive strategy . The adaptive strategy is what makes the system 7 DLV solver, could be downloaded from: http://www.dbai.tuwien.ac.at/proj/dlv non-monotonic, the logic layers are standard first order logic. Different expressions are stated at both levels and represent the before/after states of the system. Expressions are first modelled in ULL, then the adaptive strategy makes a revision of which formulae hold and which do not hold anymore leaving in LLL just the consistent formulae. Even thought the idea is quite interesting we have no evidence of any system in which this approach could be implemented for automatic reasoning. In this document we show how metaphorical expressions can be modelled in first order logic and implemented in an appealing form of logic programming called Answer Set Programming. As far as we know this is the first attempt to analyse metaphorical expressions using ASP. 3.1 Metaphors Inspired iin [10, 11], we can summarize some general characteristics of a metaphor interpretation as follows: mechanism: Metaphor is a mechanism through which we learn abstract concepts and conclude abstractions. context: Most of our conceptual system is not metaphorical. grounding: Metaphors are grounded in non-metaphorical knowledge. concretion: Metaphors allow us to understand them in terms of a more concrete ground. mapping: Metaphors are asymmetrical partial ontological relations across conceptual domains. projection: Metaphors can project source inference patterns onto target ones. invariance: This principle states that mappings from the metaphor domain structure shall be consistent with the target structure. Although very general, these characteristics should be some how featured in our following framework. 3.2 The Logical Framework In this section we define a program transformation to ensure which features one wishes to keep from a given ontology, not to rise empty models. We call ontological rule ρ an ASP rule, h(ρ) ← b(ρ), where cardinalities |h(ρ)| = |b(ρ)| = 1 and h(ρ) is called a property of b(ρ). An ontology T is a collection of ontological rules. Finally, a rhetoric theory is an EDLP, P, where T1 ⊂ P is an ontology. Formally, given an ontological rule ρ over LASP , its metaphorical form corg where α responds to rule h(ρ) ← b(ρ) ∪ {¬h(ρ)}, e = ∼α and ∼α f = α, for all LASP -atom α. In addition, a metaphorical ontology is a collection of metaphorical propositions. We can define another program transformation out of an original rhetoric theory as follows: Definition 2 (Metaphoric Program). Given a rhetoric theory P over a set of atoms Σ and its corresponding ontology T ⊆ P, its corresponding metaphoric program is (P \ T ) ∪ T 0 , where T 0 is the metaphorical ontology of T . The model of a metaphoric program corresponds to the minimal set inclusion from the answer sets of the former. Definition 3 (Metaphoric Model). Given a rhetoric theory P over a set of atoms Σ, the set M ⊆ Σ is a metaphoric model of P if and only if M is minimal with respect to set inclusion from the answer sets of the resulting metaphoric program out of P 3.3 Reasoning with Ontological Theories in ASP Language is mainly devised for communication, that is, the aim of language is to allow for transference of ideas from one individual to others. Metaphors are powerful language constructions that communicate ideas. With the background introduced in previous section and inspired with the works from [9], we can model the following story. Example 1. Consider the following scenario: 1. Mary and Paul and John work at Isaac Newton College. 2. Mary and Paul are teachers. We are interested in analysing the meaning of the two metaphoric expressions: 1. “John is a donkey”. 2. “Paul is a donkey”. In order to formalize the original scenario, we assume that we have a finite language including among other, john, mary, etc., and we have a metaphoric program, P over the language. We need to introduce some dot-separated facts, like membership M 2 to Isaac Newton College—inc: M (mary, inc). M (john, inc). M (paul, inc). We keep this list open as we do not know if there are more employees that work for the same school, who can be updated at a later state. Then we proceed to add a list of teachers, T : T (mary). T (paul). In this case, we add a closed-word assumption saying that any human x is not teacher when we have no evidence of it: ∼T (x) ← H(x), ¬T (x). Then we include the fact that “a teacher x can not be a stupid x 6∈ Ds ’ ’: ∼Ds (x) ← T (x). Then we add some facts about gender, where Gm stands for man and Gw woman: Gw (mary). Gm (paul). Gm (john). Now, some well-known facts about humans and donkeys are needed: 1. Every man and all womans are humans H, all donkeys and every human are mammals Mm , every mammal is an animal A, and every animal is something that is alive L. We can express these facts in predicate logic using properties, and in ASP introducing rules into our ontology T as: H(x) ← Gm (x). H(x) ← Gw (x). Mm (x) ← D(x). Mm (x) ← H(x). A(x) ← Mm (x). L(x) ← A(x). 2. We also have some constraints: “men are not donkeys”, or in other words: “no individual can be both a donkey and a human being”. This constrain is introduced as a rule with empty head: ∅ ← H(x), D(x) (1) which means that being a donkey and a human is a contradiction (i.e. has no model). In other words, ⊥ ← H(x), D(x) where ⊥ is our logical constant for false. But it will be worth for this proposition being stated in a more general way by considering that for any animal x for which we do not have evidence that is a donkey, we can assume that it is not a donkey: ∼D(x) ← A(x), ¬D(x). Now, when we model the meaning of the metaphoric expression “John is a donkey”: P ∪ {D(john)}. By adding this fact to the original theory, we can make some inferences in LASP : Gm (john), H(john), D(john) which leads up to a contradiction, just because of the constraint we introduced in (1): Equivalently, ∼D(john) ← H(john), which makes us conclude that both ∼D(john) and D(john)! The source of the problem is that the sentence “John is a donkey” is a metaphoric expression, which means it should not be taken literally. The general idea is as follows: There is a knowledge base P, and a new formula α ∈ / P, that you want to add up to P. Then, if the result of introducing α into P, introduces a contradiction, i.e. P ∪ {α} has no model. Then, before discarding α, we must consider the possibility that it is not a typical expression but might be a metaphoric expression. 4 Modeling Metaphorical Expressions We have a knowledge base P called rhetoric, than contains different forms of knowledge. We have to introduce a subset of P, which contains general knowledge related to the predicate donkey. By following our framework, let us call this set ontology, T ⊂ P. It contains well-known properties of a donkey that includes: 1. 2. 3. 4. Donkeys Donkeys Donkeys Donkeys have long ears, De (x) ← D(x). are stupid, Ds (x) ← D(x). are stubborn, Dm (x) ← D(x). bray, Db (x) ← D(x). These facts can be introduced as rules in ASP. Now, to analyse the metaphorical expression, “John is a donkey”, we must introduce the notion of metaphorical donkey, that is, a donkey that has certain properties that can be inherited by a human being. The metaphorical program in our approach corresponds to (P \T )∪T 0 , where P corresponds the rhetoric theory out of the ontology T and the original set of rules. The proposition that asserts that “John is a metaphorical donkey” is: D(john). We call this formula a metaphorical proposition. To interpret a rhetoric theory in our approach, we shall transform it into a metaphoric program in which we will include some properties about metaphorical donkeys T 0 —these properties are metaphoric forms of the donkey properties. Take for example: 1. Metaphorical donkeys are normally stupid. Ds (x) ← D(x), ¬ ∼Ds (x). This clause should be read as: If x is a metaphorical donkey, and there is no evidence that it is not a stupid, then we conclude that it is a stupid. 2. Similarly, metaphorical donkeys are normally stubborn: Dm (x) ← D(x), ¬ ∼Dm (x). With this example we can analyse the reasoning process: Since John is a metaphorical donkey and there is no evidence that John is not stupid and there is no evidence as well that John is not stubborn, then the extended metaphoric program in ASP concludes that John is stupid and stubborn: Ds (john).Dm (john). Now, to understand how the non-monotonic reasoning framework works, when adding to the metaphoric program the fact that “Paul is a donkey”: P 0 ∪ {D(paul)}, it concludes that he is stubborn: Dm (paul). But, why did the system not conclude that “Paul is a stupid ” as it happened with John? The reason is that “Paul is a teacher ” and the metaphoric program knows that “a teacher can not be a stupid ”. 5 Experimental Results By interpreting the principles in Section 3.1, we can introduce a generalised metaphor interpretation, µ, and encode them in a few properties as follows, which are met and can be easily verified. Given a rhetoric theory T , a possibly-empty metaphorical ontology Tm ⊂ T , any proposition ψ ∈ T and ψ ∈ / Tm , Closure: µ(T ) = Cn(µ(T )) is a rhetoric theory. Success: Tm ⊆ T . Inclusion: µ(Tm ) ⊆ Cn(T ). which correspond to the three properties listed in th previous section. 6 Conclusions and further work We have introduced some metaphorical expressions and shown possible problems with attempting an interpretation of them. Then we incorporated a new kind of entity called metaphorical entity [9], and an extension for the knowledge base that incorporates knowledge that can be applied to the target of the metaphorical expression. Then we showed how clear and easily we could formalize a system based in ASP for interpreting some metaphoric constructions with great possibilities of being part of an automatic reasoning system. The approach proposed in this document is just a first glance of what could be achieved if we combine first order predicate logic in a framework of Answer Set Programming. As far as we know this is the first attempt to analyse metaphorical expressions using ASP. Bibliography [1] Wittgenstein, L.: Philosophical Investigations. MacMillan (1953) [2] Searle, J.R.: Speech Acts. Cambridge University Press, Cambridge (1969) [3] Lakoff, G., Johnson, M.: Metaphors we live by. University of Chicago Press (1980) [4] Lakoff, G.: Women, Fire and Dangerous Things. University of Chicago Press, Chicago, USA (1987) [5] Indurkhya, B.: Metaphor and Cognition. Kluwer Academic Publishers, Dordrecht (1992) [6] Lloyd, J.W.: Foundations of Logic Programming. 2nd edn. Springer, Berlin (1987) [7] Gelfond M., K.Y.: Knowledge Representation, Reasoning, and de Design of Intelligent Agents: The Answer-Set Programming Approach. Cambridge University Press, Cambridge (2014) [8] Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In Kowalski, R.A., Bowen, K.A., eds.: Logic Programming, Proceedings of the Fifth International Conference and Symposium ICLP/SLP, Seattle, Washington, MIT Press (1988) 1070–1080 [9] D’Hanis, I.: A logical approach to the analysis of metaphors. In: Logic and Computational Aspects of Model–Based Reasoning. Volume 25 of Applied Logic Series., San Jose Ca. (2002) 21–37 [10] Ortony, A.: Metaphor and though. Cambridge University Press, Cambridge England; NY, USA (1993) [11] Gibbs, R.W.: The Cambridge handbook of metaphor and thought. Cambridge University Press, Cambridge; New York (2008)
© Copyright 2026 Paperzz