Machine Learning API Specification Generation from Unstructured Documents

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods fail to effectively generate a machine-readable API specification from unstructured API attributes, limiting the ability of computers to invoke and implement API resources and hindering the generation of computer-readable code from plain language documents.

Innovation Solution

A method involving a computing device that extracts functions and tables from an API document, correlates attributes with functions using machine learning models, and compiles a machine-readable API specification, allowing for the identification of attribute types and generation of computer-readable code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If unstructured API attributes are used in API documentation, then the documentation is easy to write and understand for developers, but computers cannot effectively invoke and implement the API resources

Engineering Contradiction:
ImproveEase of writing and understanding API documentationVSAvoidAbility of computers to invoke and implement API resources
Core Design Contradiction:
Ease of operationVSExtent of automation

Solution Approach 1:

The patent introduces an intermediary system that includes a machine learning model trained on API documentation and specifications. This intermediary translates unstructured natural language attributes into structured machine-readable representations, enabling computers to process and implement API resources while preserving the readability benefits of natural language documentation for human developers

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the traditional mechanical approach of manually creating structured specifications from unstructured documentation with an automated machine learning-based translation system. The system uses trained models to automatically extract and structure API attributes, endpoints, and parameters from natural language documentation, enabling automated code generation and implementation without requiring manual intervention

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If manual methods are used to create machine-readable specifications from plain language documents, then accuracy can be maintained, but the process is time-consuming and labor-intensive

Engineering Contradiction:
ImproveAccuracy of API specification generationVSAvoidTime required to generate machine-readable specifications
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-training machine learning models on large datasets of API documentation and specifications before actual use. The models are trained in advance to recognize patterns, extract attributes, and generate structured representations, so that when actual API documentation needs to be processed, the heavy lifting of pattern recognition and structure generation has already been performed by the trained model

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements self-service by enabling the system to automatically generate machine-readable API specifications without requiring manual intervention. The machine learning model autonomously extracts attributes from unstructured documentation, correlates them with functions, and produces structured specifications, eliminating the need for human developers to manually create these specifications while maintaining high accuracy through the model's learned patterns

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10620945B2API specification generation
Publication Date: 2020.04.14 FUJITSU LTD
  • US10620945B2 patent drawing
  • US10620945B2 patent drawing
  • US10620945B2 patent drawing

AI summary

A method may include obtaining an application programming interface (API) document, such as an API user guide, API reference, or other API documentation, that includes information regarding an API resource, and extracting information from the API document, where the information including at least one function and at least one table that includes an attribute associated with the API resource. The method may also include extracting a description for each of the at least one functions from the API document, and comparing the extracted at least one table to a model of attributes to correlate extracted attributes with extracted functions. The method may additionally include compiling a machine-readable API specification for the API resource described in the API document based on the correlation between extracted attributes and the extracted functions.