摘要
现有的源代码搜索引擎大都是基于文本的搜索,没有利用代码在语法上的特性,因此在搜索准确性方面受到极大的限制。本文从语法结构角度,提出一种源代码的过滤方法,构造基于语法结构的代码过滤器,从而抽取对搜索有用的信息。通过该方法实现了一个基于语法结构的源代码搜索引擎。实验表明本文所建立的源代码搜索在搜索准确度、搜索结果展示的友好性方面都有改进。
The existing source code search engines have been mostly based on text searching, and the characteristics of the syntax are not used. So the search accuracy is restricted. This paper proposes a source filter pattern to construct the code filter based on syntax structures from the grammatical point of view. And we extract useful information which is needed in the search. By this method, we build a source code search engine based on syntax structures. The results show that our source code search engine has better accuracy and provides more useful information for locating the needed codes.
出处
《电脑与电信》
2013年第5期30-33,39,共5页
Computer & Telecommunication
基金
湖南科技学院科学研究项目
项目编号:12XKYTB004