項潔臺灣大學:資訊工程學研究所王文廷Wang, Wen-TingWen-TingWang2007-11-262018-07-052007-11-262018-07-052006http://ntur.lib.ntu.edu.tw//handle/246246/54119全球資訊網(WWW)(World Wide Web)上的資料,絕大多數皆以HTML(HyperText Markup Language)文件呈現;而全球資訊網上資料的加值應用,則須以此廣大的文件庫為基礎。又因為HTML文件是一種內容與排版呈現描述交雜在一起的文件,並沒有語意結構的描述,所以重要資訊的線索並不存在標籤(TAG)之中,因此HTML文件不論在語意上或者在結構上皆為鬆散的文件。所以在鬆散文件中的資料萃取及資料操控問題尤為重要。觀察深層網頁,可以假設同一個網站中的文章排版風格相近,同文章中的重要資訊也有相同的排版風格,Free-DOM主要應用在此類的文章之上。對鬆散文件的資料萃取而言,正規表達式提供一個豐富且精準的萃取機制。對資料操控來說,文章物件模型(Document Object Model)(DOM)提供了一個重要的機制來處理結構化的文章。Free-DOM係指使用正規表達式萃取鬆散文件(Free-Text)中的重要資料,然後使用文章物件模型的概念來結構化萃取後的資料。為了要做全球資訊網路資料的加值應用,本文設計Free-DOM來萃取結構化鬆散文件中的重要資訊以提供程式語言操控或是直接以XML(Extensible Markup Language)格式輸出結構化文件之後讓DOM操控以利於做全球資訊網路資料的加值應用。Most documents available over the World Wide Web are written in or transformed into HTML. However, HTML is a loosely structured language that mixes presentational style with content. It is therefore important to design ways that can extract data from HTML documents. In this thesis we propose a method, Free-DOM (a Free-text Documents Object Model), for this purpose. Free-DOM is aimed at extracting data from HTML documents with a similar presentational format. It uses the regular expression to capture the structure of the format that it wants to extract, and the concept of DOM (Document Object Model) to manipulate the extracted data. Thus Free-DOM provides an extraction-and-manipulation language for free-text documents. Free-DOM supports programming languages (such as C++) as a library to pre-process and manipulate documents. It also works as a server-side script language to do value-added applications over the World Wide Web. We show the effectiveness of our method by several examples.第一章 簡介 7 1.1 動機 7 1.2 背景 9 1.3 目的 9 1.4 論文架構 10 第二章 相關技術 11 2.1 文章物件模型 11 2.2 標籤路徑定位 12 2.3 物件查詢語言 12 2.4 正規表達式簡介 13 2.5 相關技術之彙整比較 14 第三章 Free-DOM設計 17 3.1 Free-DOM運作方式 17 3.2 正規表達式由來以及語法簡介 19 3.3 Free-DOM設定檔文件撰寫介紹 27 第四章 實作應用 41 4.1 Meta-Search 41 4.2 個人資訊收集 45 4.3 批次取得大量資料 46 第五章 結論與未來發展方向 47 5.1 討論與結論 47 5.2 未來發展方向 49 參考文獻 50 附錄 使用者手冊 51 A. Free-DOM網頁服務器安裝及使用說明 51 B. Free-DOM程式庫使用說明 55 C. Free-DOM plug-in安裝及使用說明 56 D. Free-DOM設定檔文件指令使用說明 573534941 bytesapplication/pdfen-USDOMXML資料萃取正規表達式Document object modelData extractionRegular expressionFree-DOM:萃取鬆散文件中的重要資訊並結構化之方法Free-DOM:A Free-text Document Object Modelthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/54119/1/ntu-95-R93922073-1.pdf