Document Rule Extraction for Automated Database Query Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Natural language interface to databases (NLIDB) systems cannot automatically identify and formulate multiple queries of interest within a document, limiting their ability to process documents with multiple potential queries without user input.
Innovation Solution
A method is developed to generate executable code from a document by identifying and translating rules into encoded rules, which are then translated into programming language queries, allowing for automatic conversion of documents into executable code that can be applied to input data, such as a database, to determine compliance with specified rules.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If NLIDB systems are used to translate natural language queries into database queries, then database access is facilitated and ease of operation is improved, but the system cannot automatically identify and handle multiple potential queries within a document, limiting productivity
Solution Approach 1:
The document is segmented into multiple sentences, and each sentence is independently analyzed to identify potential queries. The system divides the document processing task into sentence-level units, allowing multiple queries to be extracted and processed separately from a single document input.
Solution Approach 2:
The system automatically identifies and formulates multiple queries from the document without requiring user input or intervention. The NLIDB system serves itself by autonomously detecting query patterns in the text and generating corresponding database queries for each identified sentence.
2Measurement precision
If NLIDB systems process only single queries with user input, then query accuracy is maintained, but automation capability is limited and extent of automation is reduced
Solution Approach 1:
The system performs preliminary analysis of each sentence to determine whether it corresponds to a query before generating database queries. This preliminary identification step ensures that only sentences with query characteristics are processed, maintaining accuracy while enabling automatic handling of multiple queries.
Solution Approach 2:
The system incorporates a feedback mechanism that evaluates each sentence to determine if it contains a query. This feedback loop allows the system to automatically filter and identify query sentences from non-query sentences, enabling selective automation while maintaining precision in query formulation.
3Productivity
If documents are converted automatically into executable code without user input, then productivity is improved and time consumption is reduced, but system complexity increases
Solution Approach 1:
The NLIDB system is enhanced with multi-functionality to perform both traditional single-query translation and automatic multiple-query identification from documents. This universal approach allows the same system to handle various input types (single queries and multi-query documents) without requiring separate processing pipelines.
Solution Approach 2:
An intermediary processing layer is introduced between document input and query generation. This intermediary component automatically analyzes sentences to identify query patterns and filters suitable candidates for translation, mediating between the raw document text and the query formulation process to enable automatic conversion.
Data Source
AI summary
Methods, systems, and computer program products for generating an executable code based on a document are disclosed. Rules are identified in a document, the identified rules are translated into encoded rules, and an executable code is generated from the encoded rules. Identification of rules includes splitting a text of the document into a plurality of sentences; and for each sentence of the plurality of sentences, determining whether the sentence corresponds to a rule. Translation of an identified rule into an encoded rule includes extracting, from the identified rule, elements corresponding to predefined categories; determining one or more relationships between the extracted elements; and translating the one or more determined relationships into a structured expression. Generating the executable code from the encoded rules includes translating the structured expression associated with the identified rule into a programming language query.


