Patent ID: 11928156
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 14:
15. A non-transitory computer readable medium comprising computer executable instructions which when executed by a computer cause the computer to perform a method of:
instantiating a classification module and an annotation generation module;
obtaining, at said computer, a segment of computer code;
with said classification module, determining a stage from a predefined set of stages of a predefined data science workflow to which said segment of computer code corresponds and determining a required annotation category from a predefined set of categories for said segment of computer code based on said stage of said data science workflow;
with said annotation generation module, generating a natural language annotation of said segment of computer code based on said segment of computer code and said required annotation category;
generating an Abstract Syntax Tree (AST) structure of at least said segment of computer code, wherein said natural language annotation of said segment of computer code is further based on said Abstract Syntax Tree (AST) structure, wherein said annotation generation module includes a graph neural network;
providing said natural language annotation to a user interface for display adjacent said segment of computer code;
training said classification module by using documented notebooks, with extracted source code from said documented notebooks as input, and expert-labeled categories from said notebooks as output;
obtaining a link or a reference to external application programming interface (API) documentation for a code function pasted in said documented notebooks;
collecting application programming interface (API) names from data science packages and short descriptions from external documentation sites related to said external application programming interface (API) documentation via a crawling script;
matching said application programming interface (API) names with said code functions and concatenating said corresponding descriptions; and
wherein said providing to said user interface for display adjacent said segment of computer code is based on said concatenated descriptions;
wherein:
said category is selected from a group consisting of process, result, education, reference, and reason; and
said stage is selected from a group consisting of environment configuration, data preparation and exploration, feature engineering and selection, and model building and selection.