A Multi-Perspective Architecture for Semantic Code Search
37214Authors
nan
Abstract
AbstractThe ability to match pieces of code to their corresponding natural language descriptions and vice versa is fundamental for natural language search interfaces to software repositories. In this paper, we propose a novel multi-perspective cross-lingual neural framework for code–text matching, inspired in part by a previous model for monolingual text-to-text matching, to capture both global and local similarities. Our experiments on the CoNaLa dataset show that our proposed model yields better performance on this cross-lingual text-to-code matching task than previous approaches that map code and text to a single joint embedding space.
Keywords
Full Content
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 813–822 July 5 - 10, 2020. c⃝2020 Association for Computational Linguistics 813 “The Boating Store Had Its Best Sail Ever”: Pronunciation-attentive Contextualized Pun Recognition Yichao Zhou, Jyun-yu Jiang, Jieyu Zhao, Kai-Wei Chang and Wei Wang Computer Science Department University of California, Los Angeles {yz, jyunyu, jyzhao, kwchang, weiwang}@cs.ucla.edu Abstract Humor plays an important role in human lan- guages and it is essential to model humor when building intelligence systems. Among different forms of humor, puns perform word- play for humorous effects by employing words with double entendre and high phonetic sim- ilarity. However, identifying and modeling puns are challenging as puns usually involved implicit semantic or phonological tricks. In this paper, we propose Pronunciation-attentive Contextualized Pun Recognition (PCPR) to perceive human humor, detect if a sentence contains puns and locate them in the sen- tence. PCPR derives contextualized represen- tation for each word in a sentence by captur- ing the association between the surrounding context and its corresponding phonetic sym- bols. Extensive experiments are conducted on two benchmark datasets. Results demonstrate that the proposed approach significantly out- performs the state-of-the-art methods in pun detection and location tasks. In-depth analy- ses verify the effectiveness and robustness of PCPR. 1 Introduction During the last decades, social media has promoted the creation of a vast amount of humorous web contents (Nijholt et al., 2017). Automatic recog- nition of humor has become an important task in the area of figurative language processing, which can benefit various downstream NLP applications such as dialogue systems, sentiment analysis, and machine translation (Melby and Warner, 1995; Augello et al., 2008; Ghosh et al., 2015; Bertero and Fung, 2016; Blinov et al., 2019). However, hu- mor is one of the most complicated behaviors in nat- ural language semantics and sometimes it is even difficult for humans to interpret. In most cases, un- derstanding humor requires adequate background knowledge and a rich context. Homographic Puns 1. Did you hear about the guy whose whole left side was cut off? He’s all right now. 2. I’d tell you a chemistry joke but I know I wouldn’t get a reaction. Heterographic Puns 1. The boating store had its best sail (sale) ever. 2. I lift weights only on Saturday and Sunday because Monday to Friday are weak (week) days. Table 1: Examples of homographic and heterographic puns. Puns are a form of humorous approaches us- ing the different meanings of identical words or words with similar pronunciations to explain texts or utterances. There are two main types of puns. Homographic puns rely on multiple interpretations of the same word. As shown in Table 1, the phrase all right means good condition or opposite to left; the word reaction means chemical change or ac- tion. The two meanings of the same expression are consistent with its context, which creates a hu- morous pun in both sentences when there is a clear contrast between two meanings. On the other hand, heterographic …
Content truncated to 500 words
Labeled Text
AbstractThe ability to match pieces of code to their corresponding natural language descriptions and vice versa is fundamental for natural language search interfaces to software repositories. In this paper, we propose a novel multi-perspective cross-lingual neural framework for code–text matching, inspired in part by a previous model for monolingual text-to-text matching, to capture both global and local similarities. Our experiments on the CoNaLa dataset show that our proposed model yields better performance on this cross-lingual text-to-code matching task than previous approaches that map code and text to a single joint embedding space.
Publication Details
- Paper ID:
- 37214
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan