API element comparison result automatic generation method based on knowledge graph

A technology of knowledge graph and comparison results, which is applied in the field of automatic generation of API element comparison results based on knowledge graphs, and can solve problems such as not using API knowledge

Active Publication Date: 2020-12-18
FUDAN UNIV
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But it is a challenge to automatically capture and utilize this API knowledge and use it to solve the API element comparison problem
In particular, there is little use of the rich API knowledge contained in the API reference documentation

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • API element comparison result automatic generation method based on knowledge graph
  • API element comparison result automatic generation method based on knowledge graph

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0058] A specific embodiment of the API library for JDK1.8 and Android API27 is as follows.

[0059] (1) API structure extraction. Use the Python library Scrapy to automatically crawl the reference document pages for JDK1.8 and Android API27 as a data source, and then use the Python library Beautiful Soup to develop a web page wrapper that parses the API reference documents to extract API structure knowledge.

[0060] (2) API descriptive sentence extraction and completion technology. We chose the Python library Spacy to perform various NLP analysis and processing on the text, including word segmentation, sentence segmentation, part-of-speech tagging, and dependency analysis. Use Spacy to extract the API description sentence from the API description text, and judge whether the sentence is complete based on the results of part-of-speech tagging and dependency analysis, and complete the incomplete ones. Choose the Python library NeuralCoref to resolve the reference, and resolve...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention belongs to the technical field of software engineering, and particularly relates to an API element comparison result automatic generation method based on a knowledge graph. The method comprises the basic steps of extracting API structure knowledge from an API reference document to serve as a skeleton of a knowledge graph; extracting eight different types of knowledge from the API structure knowledge and descriptive sentences corresponding to the API elements; extension of concepts and relations is achieved by introducing a general dictionary and general knowledge graph external knowledge, and API knowledge which is extracted from different sources and has different expression modes is fused; and generating a comparison result in a table form for a given pair of API elements in an alignment manner. According to the invention, a mode of comparing the API elements from different dimensions of API functions, characteristics, concepts and the like is provided for software developers, and the developers can quickly know the commonality and difference of the API elements, so that the developers can quickly and accurately select the API elements meeting the current development requirements and learn API related knowledge.

Description

technical field [0001] The invention belongs to the technical field of software engineering, in particular to a method for automatically generating API element comparison results based on a knowledge map. Background technique [0002] Frameworks and libraries usually provide API elements with similar functions but subtle differences. Ignoring the differences of similar API elements may lead to some programming errors. For example, JDK provides two API classes with similar functions, java.lang.StringBuffer and java. lang.StringBuilder, the former can be used in multi-threaded situations while the latter cannot. Therefore, developers often care about the comparison of similar API elements. For example, as of May 3, 2019, the programming question-and-answer website Stack Overflow has 13,228 questions with the java tag, of which 38% have no accepted answers. In fact, the API reference document contains a wealth of knowledge about different aspects of API elements, such as API f...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/33G06F16/338G06F16/36G06F16/31G06F8/75G06F8/36
CPCG06F16/3344G06F16/338G06F16/367G06F16/374G06F16/313G06F8/75G06F8/36
Inventor 彭鑫刘名威赵文耘
Owner FUDAN UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products