江贺

个人信息Personal Information

教授

博士生导师

硕士生导师

主要任职:未来技术学院/人工智能学院副院长

性别:男

毕业院校:中国科技大学

学位:博士

所在单位:软件学院、国际信息与软件学院

联系方式:jianghe@dlut.edu.cn

扫描关注

论文成果

当前位置: jianghe >> 科学研究 >> 论文成果

Bridging Semantic Gaps between Natural Languages and APIs with Word Embedding

点击次数:

论文类型:期刊论文

发表时间:2020-10-01

发表刊物:IEEE TRANSACTIONS ON SOFTWARE ENGINEERING

卷号:46

期号:10

页面范围:1081-1097

ISSN号:0098-5589

关键字:Tools; Natural languages; Training; Software; Task analysis; Semantics; Estimation; Relatedness estimation; word embedding; word2Vec; query expansion; API documents linking

摘要:Developers increasingly rely on text matching tools to analyze the relation between natural language words and APIs. However, semantic gaps, namely textual mismatches between words and APIs, negatively affect these tools. Previous studies have transformed words or APIs into low-dimensional vectors for matching; however, inaccurate results were obtained due to the failure of modeling words and APIs simultaneously. To resolve this problem, two main challenges are to be addressed: the acquisition of massive words and APIs for mining and the alignment of words and APIs for modeling. Therefore, this study proposes Word2API to effectively estimate relatedness of words and APIs. Word2API collects millions of commonly used words and APIs from code repositories to address the acquisition challenge. Then, a shuffling strategy is used to transform related words and APIs into tuples to address the alignment challenge. Using these tuples, Word2API models words and APIs simultaneously. Word2API outperforms baselines by 10-49.6 percent of relatedness estimation in terms of precision and NDCG. Word2API is also effective on solving typical software tasks, e.g., query expansion and API documents linking. A simple system with Word2API-expanded queries recommends up to 21.4 percent more related APIs for developers. Meanwhile, Word2API improves comparison algorithms by 7.9-17.4 percent in linking questions in Question&Answer communities to API documents.