作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2011, Vol. 37 ›› Issue (23): 72-74. doi: 10.3969/j.issn.1000-3428.2011.23.024

• 软件技术与数据库 • 上一篇    下一篇

自然语言向SQL代码的转化方法

杨鹤标,陈 力   

  1. (江苏大学计算机科学与通信工程学院,江苏 镇江 212013)
  • 收稿日期:2011-06-29 出版日期:2011-12-05 发布日期:2011-12-05
  • 作者简介:杨鹤标(1960-),男,教授,主研方向:自然语言处理,数据库技术;陈 力,硕士研究生
  • 基金资助:
    国家“863”计划基金资助项目(2007AA04Z1B2)

Transforming Method for Natural Language to SQL Code

YANG He-biao, CHEN Li   

  1. (School of Computer Science and Telecommunication Engineering, Jiangsu University, Zhenjiang 212013, China)
  • Received:2011-06-29 Online:2011-12-05 Published:2011-12-05

摘要: 为解决智能学习系统查询语言的转化问题,提出一种自然语言向SQL代码转化的方法。利用所建立的字典扫描单词和理解语义,采用改进后的单词提取技术扫描自然语言串,以生成语义依赖树,并将其语义关系划分为若干独立的集合块,通过对该集合块遍历生成与自然语言等价的SQL代码。实验结果表明,该转化方法简单有效。

关键词: 自然语言处理, 中文分词, 语义依赖树, 中文查询数据库, 智能学习系统

Abstract: To solve the problem of generate SQL code automatically in an intelligent study system, this paper proposes a method to transform natural language to SQL code. This paper builds a dictionary as the base of scanning and comprehension of natural language, uses the improved word collecting technique to distinguish the words and build a semantic dependency-tree, uses the set-block technology to separate the tree to several set blocks, and scans the set blocks and generate the SQL code. Experimental results show that this method simple and effective.

Key words: natural language processing, Chinese word segmentation, semantics dependency tree, Chinese query database, intelligence learning system

中图分类号: