计算机应用 ›› 2012, Vol. 32 ›› Issue (09): 2491-2495.DOI: 10.3724/SP.J.1087.2012.02491

• 数据库技术 • 上一篇    下一篇

基于自动机理论的PDF文本内容抽取

王晓娟1,2*,谭建龙2,刘燕兵2,3,刘金刚1,2   

  1. 1.首都师范大学 计算机科学联合研究院,北京 100037;
    2.中国科学院 计算技术研究所,北京 100190;
    3.中国科学院 研究生院,北京 100049
  • 收稿日期:2012-02-21 修回日期:2012-04-25 发布日期:2012-09-01 出版日期:2012-09-01
  • 通讯作者: 王晓娟
  • 作者简介:王晓娟(1985-),女,内蒙古赤峰人,硕士研究生,主要研究方向:信息内容安全、模式串匹配; 谭建龙(1974-),男,湖南长沙人,研究员,博士,主要研究方向:自然语言处理、网络安全、模式匹配; 刘燕兵(1981-),男,湖北麻城人,助理研究员,博士研究生,主要研究方向:信息内容安全、模式串匹配算法; 刘金刚(1963-),男,辽宁铁岭人,教授,博士,主要研究方向:操作系统、智能接口。
  • 基金资助:

    国家自然科学基金资助项目(61070026);国家863计划项目(2011AA010705)

Extraction of text content from PDF documents based on automaton theory

WANG Xiao-juan1,2*,TAN Jian-long2,LIU Yan-bing2,3,LIU Jin-gang1,2   

  1. 1.Joint Faculty of Computer Scientific Research,Capital Normal University,Beijing 100037,China;
    2.Institute of Computer Technology,Chinese Academy of Sciences,Beijing 100190,China;
    3.Graduate University of Chinese Academy of Sciences,Beijing 100049,China
  • Received:2012-02-21 Revised:2012-04-25 Online:2012-09-01 Published:2012-09-01

摘要: 现有的从PDF文档抽取文本内容的方法(如PDFBox类库采用的方法)处理速度较低,无法满足高速网络中内容分析的需求,也不能对网络中部分到达的PDF数据包进行流式的处理。为此,提出了基于自动机理论的PDF文本内容抽取方法。该方法通过建立具有层次的关键字自动机,可以快速地抽取完整PDF文档和不完整PDF文档中的文本内容。在中文和英文PDF文档数据集下的实验结果表明,基于自动机理论的PDF文本内容抽取方法耗时仅为PDFBox方法的17%~37%。

关键词: 文本内容抽取, 自动机, 确定的有穷自动机, 不完整文档

Abstract: The existing methods of extracting text content from a PDF file, such as the one adopted by the PDFBox library, are not efficient enough to handle the high-speed network traffic. Moreover, these methods cannot extract the contents streamingly from partial PDF packets in transfer. This paper proposed a new method based on automaton theory. The method adopted a hierarchical keyword Deterministic Finite Automaton (DFA) to extract information from complete or incomplete PDF files. The experimental results show that the response time of the proposed method is about 17% - 37% of the algorithm used by PDFBox when processing PDF files in Chinese or English.

Key words: text content extraction, automaton, Deterministic Finite Automation (DFA), incomplete document

中图分类号: