--- language: - en tags: - software-engineering - code-analysis - refactoring - AST - lexical-features - Python - static-analysis task_categories: - feature-extraction pretty_name: Python Function's code feature size_categories: - 1M 500, and contributors > 10). - Function-level analysis uses: - [`lizard`](https://pypi.org/project/lizard/) for cyclomatic complexity. - Python AST (https://docs.python.org/3/library/ast.html) parsing for structural features. - Lexical presentation driven by structural and 15 extract code features. --- ## ๐Ÿงช Dataset Creation ### Collection 1. Clone open-source Python repositories. 2. Run Lizard static analysis to generate base metrics. 3. Parse source files to extract AST and 15 code features. 4. Convert code features to natural language using rule-based code. 5. Merge the three sources --- ## ๐Ÿ’ก How to Load ```python from datasets import load_dataset data = load_dataset("rehaidib/PyFuncAST-Lex", split="train") ``` or manually: ```python import pandas as pd df = pd.read_parquet("PyFuncAST-Lex.parquet") ``` --- ## Citation If you use this dataset, please cite: ``` bibtex @dataset{PyFuncAST-Lex, title = {PyFuncAST-Lex: Python Function-Level AST and Lexical Features Dataset}, author = {Reem Al-Ehaidib}, year = {2025}, month = {11}, publisher = {Hugging Face Datasets}, version = {1.0}, url = {https://huggingface.co/datasets/rehaidib/pyfunc_code_features} } ```