--- license: apache-2.0 task_categories: - text-generation - fill-mask language: - code size_categories: - 1K documentation source: https://huggingface.co/docs/datasets/main/en/repository_structure ### Supported Tasks and Leaderboards - `language-modeling`: The dataset can be used to train a model for modelling programming languages, which consists in building language models for programming languages. ### Language - C++ **programming** language ## Dataset Structure ### Data Instances A data point consists of a function code along with its documentation. Each data point also contains meta data on the function, such as the repository it was extracted from. ``` { 'id': '0', 'repository_name': 'organisation/repository', 'func_path_in_repository': 'src/path/to/file.py', 'func_name': 'func', 'whole_func_string': 'def func(args):\n"""Docstring"""\n [...]', 'language': 'python', 'func_code_string': '[...]', 'func_code_tokens': ['def', 'func', '(', 'args', ')', ...], 'func_documentation_string': 'Docstring', 'func_documentation_string_tokens': ['Docstring'], 'split_name': 'train', 'func_code_url': 'https://github.com///blob//src/path/to/file.py#L111-L150' } ``` ### Data Fields - `id`: Arbitrary number - `repository_name`: name of the GitHub repository - `func_path_in_repository`: tl;dr: path to the file which holds the function in the repository - `func_name`: name of the function in the file - `whole_func_string`: Code + documentation of the function - `language`: Programming language in whoch the function is written - `func_code_string`: Function code - `func_code_tokens`: Tokens yielded by Treesitter - `func_documentation_string`: Function documentation - `func_documentation_string_tokens`: Tokens yielded by Treesitter - `split_name`: Name of the split to which the example belongs (one of train, test or valid) - `func_code_url`: URL to the function code on Github ### Data Splits Three splits are available: - train - test - valid ### Citation Information - based on (format and idea): https://huggingface.co/datasets/code_search_net/blob/main/code_search_net.py @article{husain2019codesearchnet, title={C++ Dataset}, author={Klaes, Malte}, year={2024} }