GitHub project , which has prepared machine learning models and datasets necessary for parsing, classifying, and analyzing code in various programming languages. CodeSearchNet, analogous to , includes a large collection of code snippets accompanied by annotations that formalize the actions performed by the code. The components for training models and examples of using CodeSearchNet are written in Python using the Tensorflow framework and is licensed under the MIT License.
In creating CodeSearchNet, natural language text parsing technologies were utilized, allowing machine learning systems to take into account not only syntactic features but also the meaning of the actions performed by the code. On GitHub, the system in experiments on organizing semantic code search using queries in (for example, when querying "sorting a list of strings," code implementing the corresponding algorithms is returned).
The proposed dataset includes over 2 million pairs of "code-comment" prepared based on the source texts of existing open libraries. The code covers the complete source text of individual functions or methods, while the comment describes the actions performed by the function (detailed documentation is provided). Currently, datasets have been prepared for Python, JavaScript, Ruby, Go, Java, and PHP. Examples of using the proposed datasets for training various types of neural networks are provided, including , , (BERT) and .
To enhance natural language search mechanisms, the CodeSearchNet Challenge dataset has also been prepared, including
queries with about 4,000 expert annotations describing the most likely code bindings in the CodeSearchNet Corpus dataset, which covers approximately 6 million methods and functions ( is about 20 GB). The CodeSearchNet Challenge can serve as a benchmark for evaluating the effectiveness of various methods for natural language code search. Using the tools of prepared
the code search engine.
Source: opennet.ru
