Bridging Semantic Gaps between Natural Languages and APIs with Word Embedding

10/23/2018
by   Xiaochen Li, et al.
0

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 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 more related APIs for developers. Meanwhile, Word2API improves comparison algorithms by 7.9 API documents.

READ FULL TEXT

page 4

page 6

page 7

page 8

page 11

page 12

page 14

page 16

research
05/27/2016

Deep API Learning

Developers often wonder how to implement a certain functionality (e.g., ...
research
12/12/2018

Word Embedding based on Low-Rank Doubly Stochastic Matrix Decomposition

Word embedding, which encodes words into vectors, is an important starti...
research
07/21/2018

Phonetic-and-Semantic Embedding of Spoken Words with Applications in Spoken Content Retrieval

Word embedding or Word2Vec has been successful in offering semantics for...
research
01/05/2022

ARCLIN: Automated API Mention Resolution for Unformatted Texts

Online technical forums (e.g., StackOverflow) are popular platforms for ...
research
09/07/2017

Resolving API Mentions in Informal Documents

Developer forums contain opinions and information related to the usage o...
research
05/25/2016

Dimension Projection among Languages based on Pseudo-relevant Documents for Query Translation

Using top-ranked documents in response to a query has been shown to be a...
research
11/28/2017

Semantic Technology-Assisted Review (STAR) Document analysis and monitoring using random vectors

The review and analysis of large collections of documents and the period...

Please sign up or login with your details

Forgot password? Click here to reset