中文網(wǎng)站抓取及編碼轉(zhuǎn)換研究
本文選題:漢字編碼識別 + 特征選擇。 參考:《新疆農(nóng)業(yè)大學(xué)》2013年碩士論文
【摘要】:本文在分析GB2312、GBK、GB18030、Big5、UTF-8等中文字符編碼特征的基礎(chǔ)上,重點(diǎn)研究了網(wǎng)頁文件的中文字符編碼識別技術(shù)。通過對比不同的文本特征(布爾權(quán)重、詞頻權(quán)重、詞頻倒文檔頻權(quán)重)和機(jī)器學(xué)習(xí)方法(多元線性回歸、樸素貝葉斯、K臨近算法、支持向量機(jī)),提出了一種綜合應(yīng)用中文字符編碼規(guī)則和網(wǎng)頁文本特征的中文字符編碼識別模型。該模型對于有著嚴(yán)格編碼規(guī)則的UTF-8編碼,按照其編碼規(guī)則來判斷。對于碼位空間重合的GB系列和Big5編碼采用網(wǎng)頁文本特征來識別。試驗表明,該模型在閾值(屬于UTF-8編碼的字符數(shù)比總字符數(shù))等于1時,對UTF-8編碼識別率為100%。特征值個數(shù)大于65個時,四種機(jī)器學(xué)習(xí)方法對GB系列和Big5編碼識別率均為100%。 為了實(shí)現(xiàn)農(nóng)業(yè)垂直搜索引擎中中文統(tǒng)一編碼的任務(wù),本研究設(shè)計開發(fā)了農(nóng)業(yè)網(wǎng)頁中文字符編碼自動識別和各類編碼轉(zhuǎn)換為UTF-8編碼的通用模塊。該模塊以網(wǎng)絡(luò)爬蟲下載的網(wǎng)頁為輸入?yún)?shù),首先抽取其中的中文,再根據(jù)編碼規(guī)則判斷是否采用UTF-8編碼。若不是UTF-8編碼,則根據(jù)實(shí)驗得到的特征值,采用布爾權(quán)重和多元線性回歸算法判斷編碼是GB系列編碼還是Big5編碼。最后采用iconv函數(shù)將網(wǎng)頁統(tǒng)一轉(zhuǎn)為UTF-8編碼。
[Abstract]:Based on the analysis of the Chinese character encoding characteristics of GB2312 / GB18030 / Big5UF-8 and other Chinese characters, this paper focuses on the Chinese character coding and recognition technology of web pages. By comparing different text features (Boolean weight, word frequency weight, word frequency inverted document frequency weight) and machine learning methods (multiple linear regression, naive Bayesian K-proximity algorithm), Based on support vector machine (SVM), a Chinese character coding recognition model based on Chinese character encoding rules and web page text features is proposed. The model is judged by its encoding rules for UTF-8 codes with strict coding rules. For GB series and Big5 coding with coincident code space, web page text features are used to identify them. The experimental results show that when the threshold (the number of characters that belong to UTF-8 encode is equal to the total number of characters) is equal to 1, the recognition rate of UTF-8 coding is 100. When the number of eigenvalues is greater than 65, the recognition rate of the four machine learning methods for GB series and Big5 codes is 100. In order to realize the task of uniform Chinese coding in agricultural vertical search engine, a general module of automatic recognition of Chinese character encoding and conversion of all kinds of codes to UTF-8 coding for agricultural web pages is designed and developed in this paper. In this module, the web pages downloaded by the web crawler are taken as input parameters, the Chinese is extracted first, and then the UTF-8 encoding is judged according to the coding rules. If it is not a UTF-8 code, the Boolean weight and multivariate linear regression algorithm are used to determine whether the code is a GB series code or a Big5 code according to the eigenvalues obtained from the experiment. Finally, the iconv function is used to transform the web page into UTF-8 coding.
【學(xué)位授予單位】:新疆農(nóng)業(yè)大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2013
【分類號】:TP391.1
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 汪濤,樊孝忠,顧益軍,劉林;基于概念分析的主題爬蟲設(shè)計[J];北京理工大學(xué)學(xué)報;2004年10期
2 王秀珍;;GBK內(nèi)碼轉(zhuǎn)換的設(shè)計與實(shí)踐[J];長春師范學(xué)院學(xué)報;2006年08期
3 林道進(jìn),周鋒,章新新,藺安穩(wěn),劉正榮,邢軍,鄧海光,唐建生,俞培德;GB 13000.1-BIG5漢字內(nèi)碼智能轉(zhuǎn)換系統(tǒng)[J];中國傳媒科技;2004年11期
4 亓萊濱;;Unicode內(nèi)碼轉(zhuǎn)換與漢字亂碼[J];電腦知識與技術(shù);2006年11期
5 王立建,陳壯,王欣,代紅;中文信息處理標(biāo)準(zhǔn)化[J];信息技術(shù)與標(biāo)準(zhǔn)化;2004年11期
6 程小剛;郭韌;;GB 18030與Unicode編碼轉(zhuǎn)換算法[J];華僑大學(xué)學(xué)報(自然科學(xué)版);2009年01期
7 單松巍,馮是聰,李曉明;幾種典型特征選取方法在中文網(wǎng)頁分類上的效果比較[J];計算機(jī)工程與應(yīng)用;2003年22期
8 鹿文鵬,薛若娟;Unicode與UTF-8編碼轉(zhuǎn)換方法研究[J];計算機(jī)時代;2005年09期
9 汪濤,樊孝忠;鏈接分析對主題爬蟲的改進(jìn)[J];計算機(jī)應(yīng)用;2004年S2期
10 齊冬梅,杜亞軍,李戰(zhàn)勝;個性化智能搜索引擎爬行蟲算法[J];計算機(jī)應(yīng)用;2004年S2期
相關(guān)碩士學(xué)位論文 前4條
1 馬忠寶;基于支持向量機(jī)的中文文本分類系統(tǒng)研究[D];武漢理工大學(xué);2006年
2 鄒海亮;可定制的聚焦網(wǎng)絡(luò)爬蟲[D];東華大學(xué);2009年
3 遲麟;中文文本分類中特征選擇算法及分類算法的研究[D];燕山大學(xué);2010年
4 裴英博;中文文本分類中特征選擇方法的研究與實(shí)現(xiàn)[D];西北大學(xué);2010年
,本文編號:1834422
本文鏈接:http://sikaile.net/kejilunwen/sousuoyinqinglunwen/1834422.html