Semantically Informed Slang Interpretation (2022)

Abstract: Slang is a predominant form of informal language making flexible and extended use of words that is notoriously hard for natural language processing systems to interpret. Existing approaches to slang interpretation tend to rely on context but ignore semantic extensions common in slang word usage. We propose a semantically informed slang interpretation (SSI) framework that considers jointly the contextual and semantic appropriateness of a candidate interpretation for a query slang. We perform rigorous evaluation on two large-scale online slang dictionaries and show that our approach not only achieves state-of-the-art accuracy for slang interpretation in English, but also does so in zero-shot and few-shot scenarios where training data is sparse. Furthermore, we show how the same framework can be applied to enhancing machine translation of slang from English to other languages. Our work creates opportunities for the automated interpretation and translation of informal language.

## introduction slang is one of the most common forms of informal language, but interpreting slang can be difficult for both humans and machines. empirical studies have shown that, although it is done instinctively, interpretation and translation of unfamiliar or novel slang expressions can be quite hard for humans @xcite . similarly, slang interpretation is also notoriously difficult for state-of-the-art natural language processing (nlp) systems, which presents a critical challenge to downstream applications such as natural language understanding and machine translation. consider the sentence "i got really steamed when my car broke down". as illustrated in figure 1 , directly applying a translation system such as google translate on this raw english sentence would result in a nonsensical translation of the slang term steamed in french. this error is due partly to the underlying language model that fails to recognize the flexible extended use of the slang term from its conventional meaning (e.g., "vapor") to the slang meaning of "angry". however, if knowledge about such semantic extensions can be incorporated into interpreting the slang prior to translation, as figure 1 shows the system would be quite effective in translating the intended meaning. here we consider the problem of slang interpretation illustrated in the top panel of figure 1 . given a target slang term like steamed in a novel query sentence, we want to automatically infer its intended meaning in the form of a definition (e.g., "angry"). tackling this problem has implications in both machine interpretation and understanding of informal language within individual languages and translation between languages. one natural solution to this problem is to use contextual information to infer the meaning of a slang term. figure 2 illustrates this idea by showing the top infilled words predicted under a gpt-2 @xcite based language infill model @xcite . each of these words can be considered a candidate paraphrase for the target slang steamed conditioned on its surrounding words. although the groundtruth meaning "angry" is among the list of top candidates, this model infers "sick" as the most probable interpretation. a similar context-based approach has been explored in a previous study led by @xcite showing that a sequence-to-sequence model trained directly on a large number of pairs of slang-contained sentences along with their corresponding definitions from urban dictionary can be a useful starting point toward the automated interpretation of slang. we present an alternative approach to slang interpretation that builds on but goes beyond the context-based models. inspired by recent work on generative models of slang @xcite , we consider slang interpretation to be the inverse process of slang generation and propose a semantically informed framework that takes into account both contextual information and knowledge about slang meaning extensions (e.g., "vapor"→"angry") in inferring candidate interpretations. our framework incorporates a semantic model of slang that uses contrastive learning to capture semantic extensions that link conventional and slang meanings of words @xcite . under this framework, meanings that are otherwise far apart can be brought close, resulting in a semantic space that is sensitive to the flexible extended usages of slang. rather than using this learned semantic space to generate novel slang usages, we apply it to the inverse problem of slang interpretation by checking whether a candidate interpretation may be suitably expressed as a slang using the to-beinterpreted slang expression. for example, "sick" and "angry" can both replace the slang steamed in a given context, but "angry" may be a more appropriate meaning to be expressed using steamed in the slang context. as such, we build a computational framework that takes into account the semantic knowledge of words as well as the context of slang in the interpretation process. figure 2 illustrates the workflow of our approach. we begin with a set of candidate interpretations informed by a context-based model (e.g., a language infill model), where the set would contain a list of possible meanings that fit reasonably in the given context. we then rerank this set of candidate interpretations by selecting the meaning that is most likely to be extended as slang from the to-be-interpreted slang expression. for the scope of this work, we focus on interpreting slang expressions with existing word forms because extensive studies in slang have suggested that a high proportion of slang usages relies on the extended reuse of existing word forms @xcite @xcite . we show that our framework can enhance state-of-the-art language models in slang interpretation in english and slang translation from english to other languages. 1 2 related work ## computational framework our computational framework is comprised of three key components following the workflow illustrated in figure 2 : 1) a context-based baseline interpreter that generates an n-best list of candidate interpretations for a target slang in a query sentence; 2) a semantic model of slang that checks the appropriateness of a candidate interpretation to the slang context; 3) a reranker informed by the semantic model in 2) that re-prioritizes the candidate interpretations from the context-based interpreter in 1). we use this framework for both interpreting slang within english and translating slang from english to other languages. ## datasets we use two online english slang dictionary resources to train and evaluate our proposed slang interpretation framework: 1) the online slang dictionary (osd) 2 dataset from @xcite and 2) a collection of urban dictionary (ud) 3 entries from 1999 to 2014 collected by @xcite . each dataset contains slang gloss entries including a slang's word form, its definition, and at least one corresponding example sentence containing the slang term. we use the same training and testing split provided by the original authors and only use entries where a corresponding non-informal entry can be found in the online version of the oxford dictionary (od) for english 4 , which allows the retrieval of conventional senses for all slang expressions considered. we also filter out entries where the example usage sentence contains none or more than one exact references of the corresponding slang expression. when a definition entry has multiple example usage sentences, we treat each example sentence as a separate data entry, but all data entries corresponding to the same definition entry will only appear in the same data split. ## conclusion the flexible nature of slang is a hallmark of informal language, and to our knowledge we have presented the first principled framework for automated slang interpretation that takes into account both contextual information and knowledge about semantic extensions of slang usage. we showed that our framework is more effective in interpreting and translating the meanings of english slang terms in natural sentences in comparison to existing approaches that rely more heavily on context to infer slang meaning. future work in this area may benefit from principled approaches that model the coinage of slang expressions with novel word forms and multi-word expressions with complex formation strategies, as well as how slang terms emerge in specific individuals and groups. our current study shows promise for advancing methodologies in informal language processing toward these avenues of future research.