Keywords

1 Introduction

The main goal of the Semantic Web is the organization of web contents as a network of linked data through a machine-readable language [2]. However, the languages used for this purpose (RDF, RDFS, OWL, etc.) have several expressive limitations and many semantic ambiguities need to be solved in order to reach the main goal. For instance, the translation of n-ary relations in RDF-based languages is inherently difficult, as they can directly express only binary relations. The proposals of the W3C Working Group for dealing with these issues [37] have several weaknesses that may be solved by devising more general and effective ontological patterns [18]. Semantic ambiguities in natural language are indeed a problem that needs to be solved in order to better classify the knowledge available on the Web and to enable an effective use, by either people or artificial agents, of the cultural and scientific contents [22]. Our approach highlights the importance of having formal tools able to supply a semantically faithful representation of a knowledge base. To this end, the semantic richness of a knowledge base expressed in natural language should be preserved in all its aspects, including those which are most difficult to deal with from a formal standpoint, such as semantic ambiguities. Indeed, a more context-sensitive and cognitive-oriented approach can help to discern not only the different linguistic phenomena included under the term “semantic ambiguities”, but also the cognitive mechanisms underlying the understanding of those phenomena. Semantic ambiguities are omnipresent in natural language, in a continuum that ranges from literal to non-literal cases. Homonymy and polysemy are indeed cases in which a word has (completely and partially) different literal meanings [38]. Figurative language uses, as metonymy and metaphor, are instead cases in which a word has a non-literal meaning and a literal one [4, 29].

A unitary framework was proposed for both polysemy and conventional metaphor [43], but still, novel metaphors cannot be included in the framework [10], as well as other figurative language uses, such as ironic metaphors, hyperbole, litotes [34]. The role of context in the disambiguation of semantic ambiguities was also discussed, ranging from the pre-semantic context required by homonymy understanding to the semantic and post-semantic context required, respectively, by conventional vs. novel metaphor comprehension [33]. Still, there is a heated debate on how context shapes the understanding of semantic ambiguities [5, 35] that pervasively occur in everyday language and in different genres of discourse [36].

This paper focuses on the disambiguation of meaning ambiguities in the Semantic Web framework. We assume that meaning ambiguities are widespread and omnipresent in the natural languages of Web users, ranging from literal to non-literal ambiguities. The problem of understanding the intended meaning is thus crucial not only for human-human interaction but also for human-machine interaction. An easy solution would be to represent in our formal language all the intended meaning of a text, allowing ambiguities to appear only in the corresponding natural language expressions. However, this solution would bypass the problem of machine understanding of natural language. In the solution proposed in this paper we presuppose only a light processing of natural language, namely the recognition of statements representing facts, that are then translated into the formal language with the support of a very simple ontology expressed in a RDF compatible ontological language (PROL, see below), and an algorithm that supplies measures of semantic proximity between concepts. These elements should then allow the machine to identify semantically ambiguous expressions in the text like metaphorical ones.

The disambiguation of meaning ambiguities, especially for non-literal cases, depends on the use of context: the finer the knowledge coming from the context, the easier the disambiguation. Knowledge representation is a central issue for Artificial Intelligence and the Semantic Web. In particular, the ontological languages used for the Semantic Web have strong limitations, crucially the fact that they are able to directly express only binary relations. This complicates the representation of the context in which a statement appears, allowing for many kinds of semantic ambiguities. A correct representation of n-ary relations, can indeed provide the amount of context needed to solve several meaning ambiguities.

We, therefore, hypothesize that an effective representation of n-ary relations in RDF-based languages, such as RDFS or OWL, can enhance the match between the semantic content of their ontological representations and the intended meaning of these representations, by providing a sufficient amount of contextual information in order to solve problems of semantic ambiguities. Devising more general and effective ontological patterns, which provide for an adequate translation of n-ary relations in RDF, is crucial to handle contextual knowledge in order to properly understand users’ intended meaning. To this extent, in Sect. 2 we briefly present PROL (Parametric Relational Ontology Language) as an alternative to the ontological patterns based on the reification model recommended by the W3C Working Group [37]. In Sect. 3, we consider metaphor and some specific features of this linguistic phenomenon that need to be addressed in order to enhance the overall quality of knowledge representation in the Semantic Web. In Sect. 4, we show how specific instances of metaphorical expressions can be represented and dealt with in PROL.

2 PROL and the Representation of Relations as Concepts

RDF is the declarative language that, together with its ontological extension RDFS (RDF Schema) and the more powerful OWL (an ontological language based on description logics and compatible with RDF), provides for formal representation of a knowledge base as a directed labeled graph. However, a strong limitation of RDF (as well as RDFS or OWL) is that its syntax can only express facts that involve binary relations. In a RDF graph, indeed, any subgraph expressing a specific fact consists of a subject-predicate-object triple. Unary relations and relations with \(n \ge 3\) places can be formalized only indirectly, by a suitable translation into binary ones. While unary relations can be easily formalized in RDF by using RDF classes and the special property rdf:type, the lack of a standard pattern for the representation of n-ary relations (namely, relations with arity \(n \ge 3\)) leads to possible ambiguities in the interpretation of the corresponding graphs. Moreover, the logical concept of a n-ary relation implies that the relation holds, or does not, for n individuals in a given order, that is to say, it holds for ordered n-tuples.Footnote 1 This logical feature of n-ary relations is either completely lost in the reification patterns proposed by the W3C Working Group [37] for representing such relations, or it is preserved but only to the cost of highly increasing their technical complexity and introducing a quite unnatural interpretation of the reified relation [18].

Fig. 1.
figure 1

PROL graph corresponding to the fact: Irene gives her Teddy Bear to Laura.

To tackle these problems (and other related ones) Giunti et al. [18] proposed PROL (Parametric Relational Ontology Language). PROL is a simple ontological language, compatible with RDF, which is designed to express an arbitrary n-ary fact (with \(n \ge 1\)) as a parametric pattern, namely, as a binary relation parameterized with respect to \(n-2\) arguments (i.e., all the arguments except the first two).Footnote 2 The vocabulary of PROL includes just 6 terms (2 RDF classes and 4 RDF properties) defined by a simple RDFS ontology. Two terms (prol:type, prol:next) serve to represent any n-ary fact as a parametric pattern. The remaining four terms (prol:Relation, prol:Domain, prol:hasPlaces, prol:represents) serve to express the ontology that (a) defines the n-ary relations involved in the facts to be represented, as well as the corresponding parametric binary relations, and (b) allows for the correct detection and interpretation of the representing parametric patterns.Footnote 3

Here we cannot give the full formal details of PROL (see [18]). However, we provide an illustration of its main features by the following paradigmatic example. Let us take the following fact: Irene gives her Teddy Bear to Laura. It is an instance of the ternary relation ()gives her()to(), namely: (Irene) gives her (Teddy Bear) to (Laura). In PROL, this is represented by means of a binary relation that is parameterized with respect to the third individual of the triple, Laura, and holds for the first two individuals, Irene and Teddy Bear.

In the corresponding graph (see Fig. 1) the grey ellipse, representing the relation, is linked via the term prol:type to the first individual of the triple (Irene). The arrow that links Irene to the second individual (Teddy Bear) includes a label representing the parametric property and it specifies the parametric path (individuated via the term prol:next) to be followed in order to fill up the remaining places of the relation. The choice of the right parametric path is obviously not determined just by the label on its first arrow, but by the definition in PROL (through its specific term prol:represents) of the parametric property “ex:_-givesHer_-to_Laura-” that represents the n-ary relation “ex:R:_-givesHer_-to_-” as a binary one. This definition specifies the parameter, namely “ex:Laura”, which indicates the next node to be found in the corresponding parametric path. Once we have such definitions of the parametric properties we need, we can express the facts of a knowledge base as parametric patterns through the terms prol:type and prol:next (for formal details see [18, §5.1]). The parametric property, indeed, ensures the right path along the individuals connected via prol:next, in order to keep distinct the fact that Irene gives her Teddy Bear to Laura from, for example, the other fact that Irene gives her Teddy Bear to Marta. The second fact, which is a different instantiation of the same relation, leads to a different parametric path with respect to the first.

It is worth noting that, differently from standard RDF-based languages (such as RDFS or OWL), in PROL any n-ary relation (\(n \ge 1\)) is thought as a concept, namely, the intensional class of all ordered n-tuples that are instances of the relation. In a standard RDF graph labeled arrows represent binary relations or, that is the same, RDF properties, while the graph nodes are either individuals or classes. This means that the only concepts represented as nodes are classes. On the contrary, a knowledge base expressed in PROL will not include only classes and individuals as separate nodes, but relations of any arity (\(n \ge 2\)) as well. The result is that the corresponding graph will contain much more semantic information with respect to a knowledge base expressed as standard RDF triples, because any node representing a unary relation (which is the PROL equivalent of a RDF class) will be surrounded by nodes representing all the n-ary (\(n \ge 1\)) relations in which the individual instances of the unary relation also take part. As said, in a PROL graph unary relations can be identified with RDF classes. A knowledge base represented in PROL, then, will include as nodes only individuals and n-ary relations of any arity \(n \ge 1\). Any node corresponding to a relation will be connected through prol:type to the first node of any parametric path that represents a n-tuple instantiating the relation (where it is intended that 1-tuples are identical to individuals).

3 Sources of Meaning Ambiguity in Metaphor Comprehension

In this paper, we focus on metaphorical expressions, as they are interesting cases of meaning ambiguities that have been proposed as a prototypical example of linguistic phenomena in the continuum ranging from literal to non-literal cases [8, 9, 42, 44]. Metaphor is usually considered as a cognitive mechanism that leads the interpreter along a path of inferences from a source conceptual domain to a target conceptual domain. In the process, some properties of the source concept are selected (while other properties are ignored) to understand the target domain [12]. Metaphor is thus a device to fill in the conceptual distance between different conceptual domains, and to improve our knowledge of the target. Thus, far from being just a linguistic phenomenon, metaphor has also a conceptual and pedagogical function, that makes it a crucially important issue to be handled for the development of the Semantic Web.Footnote 4

The conceptual distance between the source and the target can vary and can be covered by already “frozen” conceptual structures in a linguistic community and already lexicalized entries in the vocabulary of a language. This is the case of conventional metaphors, which have a status similar to polysemous terms and whose metaphorical meaning goes unnoticed by most native speakers [14, 16, 19]. Novel metaphors are rather new and creative uses of language that cannot be found in the vocabularies of languages, that create unprecedented connections between distant (or previously unthought as connected) conceptual domains. Of course, unless a metaphor is literalized [32], conventional metaphors can be revitalized, by creating new connections with some properties, while novel metaphors can “die” for overuse in a community and thus become conventional.

In their life, metaphors can thus vary in the continuum of literal to non-literal cases, depending on their use in the linguistic communities and the context where they appear. The context indeed provides useful information to select the relevant properties to be attributed to the target, especially in the case of novel metaphor, for which we do not have previous (linguistic) knowledge to rely on. The experimental literature has indeed shown that the processing of novel metaphors is rather different from that of conventional metaphors [3, 39]. Novel metaphor comprehension can involve perceptual properties coming from mental imagery [10, 26]. The information in a metaphorical expression such as “A woman is a Venice glass” would be too narrow to understand novel metaphors’ typical imagistic effect [28]. Additional semantic information coming from the context and/or background encyclopedic knowledge (ex. Venice glasses are colorful) can thus help in novel metaphor comprehension (an advantage known as “context availability effect”, see [15, 20]).

Not only the production of completely new metaphors (or new emergent properties, such as “being colorful”), but also the (i) linguistic structure of the metaphor and (ii) its directionality are challenges to be handled for the development of the Semantic Web. As to the linguistic structure of the metaphor, most of the previous literature on metaphor comprehension, especially the experimental literature, focused on nominal metaphors, especially of the form “A is B” (ex. “The actor is a dog”). Less attention has been paid to verbal metaphors (ex. “Leo grasped an idea”), whose target is not explicitly mentioned and whose metaphoricity depends on the meaning of the verb (in relation to its object, in this case).

As to the directionality of a metaphor, concerning the direction of the attribution of properties from the source to the target conceptual domain, it depends on its linguistic structure, more precisely on the order of the terms in the relation (ex. “actor” and “dog”). Thus, the metaphor “The actor is a dog” cannot be reversed in “The dog is an actor”: the latter would count as a different metaphor, as having a different source and thus different relevant properties. Of course, in specific contexts, where for instance we utter “The dog is an actor” referring to a dog who is actually an actor, the intended meaning of the latter may also be not metaphorical at all.

According to [40], the metaphorical directionality can be explained in terms of salience imbalance: the meaning of a metaphor depends on a matching process between high-salient properties of the source with low-salient properties of the target. Ortony [31] then extended Tversky’s model by defining the salience of a feature relative to the particular object of which it is an attribute: the same features may have different salience in two different objects [27, p.95]. This is especially true in the case of conventional metaphors, while novel metaphors would be more prone to be interpreted as “bidirectional” [21], precisely because of their completely new and creative use. As pointed out [6, 7, 13, 24, 25], the source and the target conceptual domains interact, creating a more complex meaning or conceptual space, when compared to the individual concepts involved in the metaphor.

4 Solving Meaning Ambiguities in PROL

Consider a knowledge base that includes the following metaphorical expression: “Quell’attore è un cane”, whose translation into English is “That actor is a dog”. In Italian, this expression has a negative meaning and indicates that the subject in question is a very bad actor. Suppose that the same knowledge base also includes the expression: “That dog is an actor”, where someone indicates an actual dog which is also an actual actor (for example, Lukas, the main character of the 2020 movie Lassie comes home). Here, we are not prone to attribute a metaphorical meaning to the statement. The attribution of a literal meaning in this case, indeed, is very likely. However, if the dog concerned is not an actual actor, then we will be forced to attribute to this utterance a metaphorical sense. Now, assume that our knowledge base has a sufficient amount of information in order to represent the concept of actor and dog via the relations in which individual actors and dogs take part. If we express the knowledge base in PROL and look at the formal properties of the corresponding graphs, would we be able to distinguish between metaphorical and literal meanings of natural language expressions? Figure 2 sketches a possible answer to this question. The two larger grey nodes correspond to the unary relations, or classes, ()is an actor and ()is a dog. Each class is surrounded by a semantic cloud formed by the relations that the individuals of that class are most likely to participate in. More precisely, the proximity of a relation to a class will be directly proportional to the number of individuals members of that class participating in the relation. For example, the two-place relation ()acted in a movie with() will have more connections with the class of actors than the two-place relation ()takes()to the vet, hence, it will be included in the semantic cloud surrounding the “actor” class.

Fig. 2.
figure 2

Schema of a PROL graph representing the semantic clouds linked to the unary relations “dog” and “actor”, and the connections between these two clouds and two individuals (in white), d (a dog) and a (an actor). Superscripts indicate the ariety of each relation, subscripts enumerate all the relations included in the same semantic cloud.

In Fig. 2 classes are connected to the respective relations via dashed lines, while the only two visible nodes representing individuals, namely “a” (the actor) and “d” (the dog), are connected via arrows to the relations or classes in which they take part. The dashed lines between the two classes ()is a dog, ()is an actor and their connected relations represent paths whose intermediate nodes are all individuals. Indeed, any path in the graph that directly links any two concepts (i.e., classes or relations) is made of two intersecting parametric paths, \(p_1\) and \(p_2\), where \(p_1\) represents an instance of one of the two concepts, and \(p_2\) represents an instance of the other concept.

The graph sketched by Fig. 2 represents the context of two different utterances (1) “That actor is a dog” and (2) “That dog is an actor”. In case (1) an individual actor (a), which is connected via arrows to the class ()is an actor and to the relations linked to that class in which the individual a takes part, is also connected to the class ()is a dog, but it is disconnected to the relations belonging to the semantic cloud of this class. This is a clue that the meaning of ()is a dog in the utterance is a non-literal (metaphoric) one: a is tightly connected to the cloud of actors, but abstractly connected to the cloud of dogs, namely, a does not take part in any of the relations relevant for the concept ()is a dog.Footnote 5 In case (2) an individual dog (d) is connected via arrows to both classes and both semantic clouds as well. This means that d takes part in the relevant relations connected to the dogs and to the actors, as well. The situation is different from (1) because, in this case, we have no abstract connection between an individual and two disconnected semantic clouds, then we can attribute literal meaning to the utterance, as in the previously mentioned case of the dog Lukas which is an actual actor.Footnote 6

Similar considerations can be made in the case of a verbal metaphor, for example (3) “Leo grasps an idea”. In this case, the metaphor is expressed by the binary relation ()grasps(). In a PROL graph, this relation would be represented as a node surrounded by a semantic cloud including all the relations in which the individuals involved in the relation ()grasps() most likely take part. This semantic cloud would include, for example, baseballs, door handles, tools, etc. The likelihood that an individual involved in the relation ()grasps() is an idea is low, because the node representing this relation is surrounded by concepts that apply to concrete objects, while the concept of an idea includes abstract objects which will thus be connected to a different cloud. The disconnection (adequately measured) between these two semantic clouds is a clue that the fact expressed by (3) has a non-literal meaning.

So far, we have proposed an intuitive idea of proximity to the central concept of a semantic cloud made of other concepts. This intuitive idea is based on a theoretical analysis of how a knowledge base is represented in PROL. But how could we formally define an adequate measure of semantic proximity? We cannot give, here, a definitive answer to this question, but we can propose a tentative definition on the basis of the previous considerations. We have seen that, from an intuitive standpoint, the semantic proximity of a concept B to the central concept A of a semantic cloud is proportional to the likelihood that an instance of A is also an instance of B. Accordingly, when both B and A are unary relations (classes), we define the semantic proximity of B to A as the ratio between the number of members of \(A \cap B\) and the total number of members of A.

In the general case, when both B and A are relations of arbitrary arity, the definition is similar, even though slightly more complex. Let B and A be relations with arity \(n \ge 1\) and \(m \ge 1\), respectively. Consider all the individuals belonging to some m-tuple which is an instance of A. By definition, these are the members of A. The members of B are defined in the same way. We then define the semantic proximity of B to A as the ratio between the number of members of A that are also members of B and the total number of members of A.

5 Conclusion

In this paper we have presented a way to solve meaning ambiguities in PROL, focusing on the distinction between metaphorical and literal expressions. We have also proposed a formal definition of semantic proximity that is likely to be useful for a deeper understanding of verbal metaphors, which to date have been less studied than nominal ones. The aim of the project is indeed to directly provide a better formal representation of natural language in all its aspects, metaphorical aspects included, without translating them into other, separate symbols in the formal representation. The translation could entail a loss of the conceptual/cognitive content of a metaphor [6], while we aim to represent metaphor as a meaning extension depending on variations of the semantic proximity of the concepts literally involved (ex. “grasp” and “idea” in “grasping an idea”). From this perspective, we deem metaphor to be crucial for the development of the Semantic Web, because it can act as a way to (re)categorize and (re)organize conceptual knowledge.