摘要 |
A database-processing method and system for answering a natural-language question by a computer system with a database. In one embodiment, the system analyzes the grammatical structure of the question. In the analysis, the system scans the question to extract each word in the question; then based on a pre-defined context-free grammatical structure, the question is parsed into its grammatical components using one or more grammatically rules and the database. After parsing the question, the system transforms the components into one or more instructions, using one or more semantic rules and the database. The instructions, when executed, at least access data from the database for generating the answer to the natural-language question. In another embodiment, the system compares the natural-language question with questions stored in the database; each question in the database has its corresponding answer. If there is a match, the system retrieves the answer to the corresponding matched question and presents the answer to the student.
|