使数据库自然语言接口(NLIDB)能够处理灵活多变的查询语句,增强NLIDB的可用性,是NLIDB研究的一个重要目标。设计并实现了一种数据库汉语查询接口。该查询接口采用语义依存树作为查询语句向SQL转化的中间语言,在构建了基于Nivre算法的语义依存树生成模型的基础上,提出了解决数据库语义歧义问题的方法以及一种新的将语义依存树划分为集合块的划分策略及其向SQL语句的转化方法。实验表明,该系统能够有效地处理各种形式的查询问句,具有良好的可用性。
How to solve queries with flexible forms in order to improve the usability of NLIDB,is a goal in the research on the Chinese natural language queries.Design and implement an interface for database query in Chinese, the system adopts semantic dependent tree as the intermediate language.Based on a model using Nivre for the construction of semantic dependent tree,then it puts forward a measure of solving word-ambiguity and gives a new method to divide the semantic dependent tree into setblock and the algorithmic of SQL transforming method based on concept of setblock.The experiments show that the system could solve queries with different forms and has good usability.