M eta P ro Online: A Computational Metaphor Processing Online System (2023)

Abstract: Metaphoric expressions are a special linguistic phenomenon, frequently appearing in everyday language. Metaphors do not take their literal meanings in contexts, which may cause obstacles for language learners to understand them. Metaphoric expressions also reflect the cognition of humans via concept mappings, attracting great attention from cognitive science and psychology communities. Thus, we aim to develop a computational metaphor processing online system, termed MetaPro Online, that allows users without a coding background, e.g., language learners and linguists, to easily query metaphoricity labels, metaphor paraphrases, and concept mappings for non-domain-specific text. The outputs of MetaPro can be directly used by language learners and natural language processing downstream tasks because MetaPro is an end-to-end system.

## introduction metaphors are frequently used in our everyday language. relevant statistics @xcite @xcite found that about one-third of sentences in corpora contain metaphors. it is possible to use approximately six metaphors during a minute of speaking @xcite . metaphors are a non-negligible linguistic phenomenon for linguistic learners and researchers. on the other hand, @xcite argued that metaphors are not just a linguistic phenomenon, because metaphors also reflect human cognition. human perceptions of love are not complete without metaphors, e.g., love is a journey, magic, attraction, madness, nurturance foot_1 , etc. there are two important research domains in computational metaphor processing: linguistic and conceptual. the former area focuses on the surface realization of metaphors, e.g., metaphor identification and interpretation. the motivation is that metaphors do not take their literal meanings in contexts, which may cause difficulties for language learners and machines to understand the real meanings of metaphors @xcite . as seen in figure 1 (a), given the metaphoric expression, "the comedian convulsed the children", a sentiment classifier yields an incorrect negative label for the sentence. in figure 1 (b), the generative ai seems to explain why such an error occurs -"the word 'convulsed' typically denotes a strong, uncontrollable movement or shaking, which is often associated with negative connotations". ai notes that "convulsed" triggers the negative prediction for the sentence based on its literal meaning. figure 1 (c ) demonstrates that literally translating a metaphor into another language may cause interpretation difficulties because of cultural differences. for example, the given sentence is translated as "the comedian caused the children convulsions" in chinese, which carries a very different meaning from the real english meaning. thus, a linguistic metaphor processing system @xcite aims to automatically identify metaphors and paraphrase them into their literal counterparts to mitigate the interpretation barrier for users. conceptual metaphor processing focuses on identifying and mapping source and target concept domains of metaphors. the motivation is to understand the cognition of humans from their metaphoric expressions. for example, given a metaphoric expression, "she attacked his argu-ment", @xcite argued that conceptually the argument concept (target domain) is mapped to a war concept (source domain). one uses war to metaphorically describe argument, reflecting strategies, attack, and defense behaviors associated with argument. @xcite also believed that these concepts naturally frame our thinking and behaviors when arguing. researchers can study cognition from metaphor concept mappings (see section 6). thus, a conceptual metaphor processing system aims to automatically generate source and target concept agents for a metaphor to represent the concept mappings. many previous works focused on metaphor identification tasks @xcite , metaphor interpretation tasks @xcite , and concept mappings @xcite . however, these methods cannot process metaphors from end to end. we proposed an end-to-end metaphor identification and interpretation method, the first version of metapro @xcite , where metaphoric single words can be paraphrased into their literal counterparts, and metaphoric multi-word expressions can be explained with clauses. however, a programming package cannot be easily used by non-programmers, e.g., language learners and linguistic researchers. on the other hand, automatic concept mappings have not been achieved on the sentence level, although we proposed a concept mapping method on the word-pair level in the work of @xcite . thus, we aim to develop a computational metaphor processing online system, metapro online, allowing users without a coding background to easily query metaphoricity labels, metaphor interpretations, and concept mappings for non-domain-specific text. as seen in figure 2 , given a query sentence, "the comedian convulsed the children", metapro can identify "convulsed" as a metaphor. then, the sentence is paraphrased as "the comedian amused the children" for interpretation. the source concept is trouble. the target concept is pleasure. then, the concept mapping is represented as pleasure is trouble. we can also observe that the sentiment analysis classifier, the generative ai, and the machine translation system can all yield satisfying outputs after using the paraphrased sentence in figure 3 . the concept mapping "pleasure is trouble", generated by metapro, implies that extreme happiness can be accompanied by trouble, e.g., causing the children convulsions. such that negotiation was a hot potato, hurting both parties. ## related work according to the survey of @xcite , there have been metaphor identification @xcite , interpretation @xcite , and concept mapping @xcite research works in the computational linguistics community, while readily used end-to-end systems for supporting downstream applications are rare. martin (1990) presented a metaphor interpretation system named metaphor interpretation, denotation, and acquisition system (midas). the system was developed to answer metaphorical queries about unix. narayanan (1997) proposed a knowledgebased action representations for metaphor and aspect (karma) system. the system is based on hand-coded executing schemes for motion-verb concept reasoning in an economic domain. barnden and lee (2002) proposed a first-order logic rule-based system for concept mapping analysis in the mental state description domain. however, the limited manual rules in the aforementioned works cannot be used for analyzing text from a broader domain. mao et al. (2022) proposed a non-domainspecific end-to-end system for metaphor identification and interpretation. they evaluated the system on a sentiment analysis task. however, it cannot generate concept mappings and does not provide a graphical user interface for non-programmers. ## metapro the user interface of metapro online is succinct. there is just an input window and a processing button (see figure 2 ). the back-end consists of three modules: metaphor identification, metaphor interpretation, and concept mappings. the overall framework can be viewed in figure 4 . first, the metaphor identification module detects metaphors on the token level, given an input sentence, e.g., "that negotiation was a hot potato, hurting both parties". next, the metaphor interpretation module paraphrases the identified metaphoric single-word expressions (e.g., "hurting" means "upsetting"). it explains metaphoric multi-word expressions with clauses (e.g., "where 'a hot potato' means that any subject which several folks are talking about and which is frequently argued"). finally, the concept mapping module abstracts the source ("ill_health") and target ("feeling") concepts of a metaphor via the lemma of the original metaphoric word ("hurt") and the lemma of its paraphrase ("upset"), respectively. the mapping is represented as "a target concept is a source concept" (e.g., feeling is ill_health). the current version of metapro online cannot paraphrase and conceptualize metaphoric multi-word expressions. thus, we explain them via clauses and omit their concept mapping generations. we introduce each module below at the concept level to help readers understand the mechanisms of metapro online. since metapro is an ensemble system combining three research outcomes, we omit the algorithmic details here. one may refer to our previous works, @xcite ; @xcite ; @xcite , to understand the technical details of metaphor identification, metaphor interpretation, and concept mapping modules, respectively. ## supporting downstream tasks metapro was used as a text pre-processing technique, where the metaphor interpretation outputs were fed into sentiment analysis classifiers instead of the original inputs. we observe that metapro improved the performance of vader @xcite , allennlp sentiment analysis foot_3 , and azure sentiment analysis foot_4 on a financial news headline sentiment analysis task @xcite by 1.5%, 2.2%, and 4.7% accuracy, respectively, compared with the results given by the original news headlines @xcite . on the other hand, we also observe that using metapro-generated concept mappings as features could bring a classifier extra gains in accuracy (+1.1% and +1.9%) for a depression detection task @xcite . the benchmarking dataset was from the work of @xcite . more importantly, the concept mapping features help the classifier explain the common concept mappings between depressed and nondepressed groups. besides the accuracy gains, this is particularly helpful for cognitive science because metapro provides an automatic solution for analyzing concept mapping patterns via metaphors at scale. detailed performance benchmarking of different technical components of metapro with state-ofthe-art baselines on diverse evaluation tasks and datasets can be viewed from the works of @xcite ; @xcite . ## evaluation besides the performance improvements and explainability enhancements in downstream tasks, we also qualitatively evaluate the practicality of metapro according to the criteria proposed by @xcite in the following sections. she proposed to evaluate a computational metaphor processing system from two aspects, namely the levels of analysis and applicability. ## use case besides the examples in figures 1 and 3 , we reported the use cases of metapro in sentiment analysis in the work of @xcite . for example, given "rio tinto ceo sam walsh rejects fears over china growth, demand", the three examined classifiers yielded incorrect "negative" predictions. this is probably because "fears" and "reject" likely appear in negative contexts. however, after metapro paraphrasing the original input as "rio tinto ceo sam walsh eliminates concerns over china growth, demand", the classifiers can yield correct "positive" predictions. @xcite reported the use cases in depression detection, where concept mappings are additional features besides the original text. they believe that metaphor concept mappings reflect the inner world of people because they were not explicitly presented in the text. for example, they found that level is importance is a representative concept mapping for depressed people. this may result in more stress, if a person frequently maps an objective measure in the level concept to a subjective feeling concept, e.g., importance. ## conclusion we proposed metapro online in this work, which is a computational metaphor processing online system. compared with previous works, metapro can identify metaphors, paraphrase them into their literal counterparts, and generate concept mappings from end to end. the system can process unrestricted and non-domain-specific english text. the user interface is very friendly to non-programmers. thus, it can help language learners to understand the real meanings of english metaphors. we also demonstrated the performance improvements of using metapro on downstream ai applications, e.g., using metapro to automatically obtain concept mappings from social media posts to study cognitive patterns exhibited by individuals diagnosed with depression. the above use cases show that metapro has huge application potential in diverse domains. however, the current version cannot paraphrase and conceptualize metaphoric multi-word expressions, which is important for sentic computing @xcite . it cannot process non-english text, extended metaphors, and metaphorical inference as well. we will fill this gap in future work and strive to enhance the precision and information processing capacities of metapro by developing more advanced algorithms, thereby providing enhanced support for linguistic and cognitive science research endeavors.