Natural language generation method based on SQL syntax tree node types
A technology of natural language and node type, applied in the field of natural language, it can solve the problems of limited types of SQL statements, lack of diversity of sentence patterns, and high similarity of natural language
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0072] Such as figure 1 Shown, a kind of natural language generation method based on SQL syntax tree node type, comprises the following steps:
[0073] Step S1: constructing a natural language generation model, said model including a language encoder and a language decoder based on a memory network;
[0074] Step S2: Collect the natural language data set from the SQL text, and traverse the natural language data set according to the breadth first to obtain the SQL abstract syntax tree T={node with n nodes 1 ,...,node n} and the corresponding natural language sequence X={x 1 ,...,x m}; wherein, node represents a node of the SQL abstract syntax tree T, and the subscript is the node serial number; x represents a word in a natural language sentence X, and the subscript represents the serial number;
[0075] Step S3: Use the language encoder in the natural language generation model to calculate each node node in the SQL abstract syntax tree i The node state vector of
[0076...
specific example
[0128] Such as Figure 4 As shown, in this embodiment, a detailed sentence is input into the language encoder in the natural language generation model, and a sentence that can summarize the input content is output in the language decoder. The specific examples are as follows:
[0129] Input: Xiao Ming went to Guangzhou Restaurant for lunch, ordered 3 dishes, and had a good time.
[0130] Output: Xiao Ming enjoyed his lunch.
[0131] Assuming that the word "Xiao Ming" is not in the constructed dictionary, an "unknown" word will be generated if there is no copy mechanism; and if there is a copy mechanism, the word "Xiao Ming" can be copied from the input to the output . The specific realization of the replication mechanism is based on the pointer network (Pointer Network). The pointer network is based on the language encoder-language decoder framework, assuming that the input is X={x 1 ,...,x n}, the output is Y={y 1 ,...,y m}In a certain time step i of the decoder stage,...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com