【正文】
除非另有科研合同和其他法律文書的制約,本論文的科研成果屬于成都信息工程學(xué)院。 but we have a wild journey, also which is national and modern, and that is the journey to Amack on the night of the New Year. All indifferent poets and poetesses, musicians, newspaper writers, and artistic notabilities, I mean those who are no good, ride in the New Year39。 and those mat are of solid and sober natures have more of the ballast, than of the sail. In fame of learning, the flight w ill be slow, without some feathers of ostentation. Q ui de contenmenda gloria libros scribunt, nomen suum inscribunt. Socrates, Aristotle, Galen, were men firil of ostentation. Certainly vainglory helpeth to perpetuate a man\39。 if he be superior, if he be not to be mended, you much less. Glorious men are the scorn of wise men。 and in the second degreegreat when they are mitted against private rites and sepulchres,and in the third degree (not to repeat the acts formerly mentioned),when insults are offered to parents。 and whoknows but that we shall hearken to you? If then our request is afair one, please to accept our challenge. Cle. But is there any difficulty in proving the existence of theGods? Ath. How would you prove it? Cle. How ? In the first place, the earth and the sun, and the starsand the universe, and the fair order of the seasons, and thedivision of them into years and months, furnish proof s of theirexistence。 for these are the offences which are and have been, and willever be, the source of all the aforesaid evils. The greatest of themare excesses and insolences of youth, and are offences against thegreatest when they are done against religion。 In mending another, you do your self right。 as if a man that negotiates between two princes, to draw them to join in a war against the third, doth extol the forces of either of them above measure, the one to the other: and sometimes, he that deals between man and man, raiseth his own credit with both by pretending greater interest than he hath in either. And in these, and the like kinds, it often falls out that somewhat is produced of nothing: for lies are sufficient to breed opinion, and opinion brings on substance. In military manders and soldiers, vainglory is an essential point。t know what that is! The journey of the witches on broomsticks is well enough known that journey is taken on St. John39。 ( 4)學(xué)??稍试S學(xué)位論文被查閱或借閱。 [7] Paul Nielsen[美 ].Microsoft SQL Server 2020寶典 [M].劉瑞 ,陳微 ,閆繼忠 ,劉文 [譯 ].北京 :中國鐵道出版社 ,2020。相比之下,本系統(tǒng)的檢索能力就很有限制。 3. 用模塊的形式分步展示搜索引擎的原理。 圖 10 search1 當(dāng)在表單中輸入信息時(shí),結(jié)果以列表形式顯示, 其中 關(guān)鍵字顯示為紅色 ,網(wǎng)頁的 title 顯示為藍(lán)色,其他信息包括搜集信息時(shí)的日期,內(nèi)容。 (tda href=+(Url)++(title)+/a/td)。 (trtd結(jié)果數(shù) :+result+ 所用時(shí)間 :+t+毫秒 /td/tr)。 (doc)。 } 使用 Lucene 提供的方法對數(shù) 據(jù)庫中的每條記錄建立索引實(shí)現(xiàn)如下: 第 13 頁 共 19 頁 Document doc = new Document()。 (iDexDir,true)。 ()。 } urlArr=().Split(39。+Content+39。 //得到去了 HTML標(biāo)簽的網(wǎng)頁文本 URL=url。 return。 String mata=。下面對各部分關(guān)鍵代碼 進(jìn)行詳解。在用 Lucene的搜索引擎中,用到了 Lucene 提供的方法,可從所建立的索引文檔中獲得結(jié)果。一個(gè)Document 對象由多個(gè) Field 對象組成的。當(dāng)在獲取 URL 時(shí)存在這樣的問題就是在實(shí)際應(yīng)用中主要以絕對地址和相對地址來表現(xiàn)。 如圖 4 所示。 輸出: Web 頁面上顯示搜索信息。 9. 邏輯搜索功能比如“中國” AND“北京” AND NOT(“海淀區(qū)” AND“中關(guān)村”)。 本設(shè)計(jì)要實(shí)現(xiàn)的功能: 1. 能夠?qū)?Inter 上的網(wǎng)頁 內(nèi)容、標(biāo)題、鏈接等信息按鏈?zhǔn)绞占?。每個(gè)頁面上面都包括有一 些使用 JavaScript開發(fā) 的 Ajax 組件。后來這個(gè)技術(shù)被上述的規(guī)范命名為 XMLHttpRequest。這樣在用戶輸入查詢條件的時(shí)候,就能非??斓牡玫剿阉鹘Y(jié)果。 Lucene 能夠 為文本類型的數(shù)據(jù)建立索引,所以你只要能把你要索引的數(shù)據(jù)格式轉(zhuǎn)化的文本的, Lucene 就能對你的文檔進(jìn)行索引和搜索。不同的搜索引擎,網(wǎng)頁索引數(shù)據(jù)庫不同 , 搜索結(jié)果也就不盡相同。 從搜索來源的角度,全文搜索引擎又可細(xì)分為兩種,一種是擁有自己的檢索程序( Indexer),俗稱 “ 蜘蛛 ”( Spider) 程序或 “ 機(jī)器人 ” ( Robot)程序,并自建網(wǎng)頁數(shù)據(jù)庫,搜索結(jié)果直接從自身的數(shù)據(jù)庫中調(diào)用;另一種則是租用其他引擎的數(shù)據(jù)庫,并按自定的格式排列搜索結(jié)果 。由于 Lucene不是完整的搜索引擎程序 , 只為搜索引擎應(yīng)用提供了工具包 , 在 平臺(tái)中,可使用 這個(gè)對 Lucene 兼容的庫 。 目前國內(nèi)外都在做中文引擎,門戶網(wǎng)站、非門戶網(wǎng)站也都在進(jìn)軍搜索業(yè),成立搜索門戶 。 Google 專業(yè)領(lǐng)域搜索方面 做的成效是有目共睹 的 。 Ajax。 畢業(yè)設(shè)計(jì) ( 論文 ) 基于 Ajax+Lucene 構(gòu)建搜索引擎的設(shè)計(jì)與實(shí)現(xiàn) 論文作者姓名: 申請學(xué)位專業(yè): 申請學(xué)位類別: 指導(dǎo)教師姓名(職稱): 論文提交日期: 基于 Ajax+Lucene 構(gòu)建搜索引擎的設(shè)計(jì)與實(shí)現(xiàn) 摘 要 通過搜索引擎從 互聯(lián)網(wǎng)上 獲取有用信息 已經(jīng)成為 人們生活的重要組成部分, Lucene 是構(gòu)建搜索引擎的其中一種方式 。 Asynchronous update。 無論搜索技術(shù)本身還是搜索范圍與深度 , Google 搜索 總是所有搜索引擎的 目標(biāo) 。 中文的 意思多種多樣 , 是很難用程序處理的 。 本課題的研究方法 在本系統(tǒng)的開發(fā)過程中,首先分 析 了搜索引擎 的相關(guān)功能 , 寫出需求分析;第 2 頁 共 19 頁 其次,綜合運(yùn)用以前所學(xué)的相關(guān)知識(shí)(數(shù)據(jù) 庫, C# 等),選擇所熟悉的開發(fā)工具進(jìn)行開發(fā)(本系 統(tǒng)選擇了 Microsoft Visual Studio .NET 2020 作為開發(fā)平臺(tái),開發(fā)語言選擇了 C;數(shù)據(jù)庫采用 Microsoft SQL Server 2020) 。 全文搜索 引擎 通過從互聯(lián)網(wǎng)上提取的各個(gè)網(wǎng)站的信息(以網(wǎng)頁文字為主)而建立的數(shù)據(jù)庫中,檢索與用 戶查詢條件匹配的相關(guān)記錄,然后按一定的排列順序?qū)⒔Y(jié)果返回給用戶 。我們平時(shí)看到的全 文搜索引擎,第 3 頁 共 19 頁 實(shí)際上只是一個(gè)搜索引擎系統(tǒng)的檢索界面,當(dāng)你輸入關(guān)鍵詞進(jìn)行查詢時(shí),搜索引擎會(huì)從龐大的數(shù)據(jù)庫中找到符合該關(guān)鍵詞的所有相關(guān)網(wǎng)頁的索引,并按一定規(guī)則呈現(xiàn)給我們。和Java Lucene 兼容 的 可以用在 . 平臺(tái)。反向索引就是說我們維護(hù)了一個(gè)詞 /短語表,對于這個(gè)表中的每個(gè)詞 /短語,都有一個(gè)鏈表描述了有哪些文檔包含了這個(gè)詞 /短語。 Ajax 技術(shù)之中,核心的技術(shù)就是 XMLHttpRequest,它最初的名稱叫做XMLHTTP,是微軟公司為了滿足開發(fā)者的需要, 1999 年在 瀏覽器中率先推出的。從 Ajax 的角度看來 , Web 應(yīng)用應(yīng)由少量的頁面組成,其中每個(gè)頁面其實(shí)是一個(gè)更小型的 Ajax 應(yīng)用。 3 需求分析 同步環(huán)境 本系統(tǒng)的同步環(huán)境如圖 3: 用戶操作后等待 …… .. 服務(wù)器端處理 客戶端頁面 處理 新的頁面呈現(xiàn) 數(shù)據(jù)提交 數(shù)據(jù)返回 第 6 頁 共 19 頁 因 特 網(wǎng)檢 索 服 務(wù) 器 圖 3 同步環(huán)境 檢索服務(wù)器通過 Inter 檢索 Web 頁面。 8. 實(shí)現(xiàn)無刷新的顯示搜索結(jié)果,對搜索用時(shí)的計(jì)算、顯示,關(guān)鍵字高亮顯示等。 處理:去前后空格,關(guān)鍵字,查詢索引庫。查詢部分有 Ajax、后臺(tái)處理、前臺(tái)界面模塊。這條件可以是限定的謀個(gè)域名空間、或者是限定的網(wǎng)頁抓取級(jí)數(shù)。 為 了對 文檔進(jìn)行索引, Lucene 提供了五個(gè)基礎(chǔ)的類,他們分別是 Document,F(xiàn)ield, IndexWriter, Analyzer, Directory Document 是用來描述文檔的,這里的文檔可以指一個(gè) HTML 頁面,一封電子郵件,或者是一個(gè)文本文件。通過查詢頁面,輸入關(guān)鍵字,提交給系統(tǒng),程序就開始處理,最后把結(jié)果以列表的形式顯示 出來。并可以定位到信息的出處。 String Content=。 } catch { (url無法找到! )。 //去掉腳本 的網(wǎng)頁文本 Content=parseHtml(PageString)。,39。 } else 第 12 頁 共 19 頁 { (對 url:+URL+相關(guān)信息寫入數(shù)據(jù)庫失敗 !)。 Thread th = new Thread(new ThreadStart(UrlThread))。 //刪除以前生成的索引文件。 ()。 ((ID,row[ID].ToString()))。 [] public string SearchResult(string keywords,string pageNo) { 其中,前臺(tái)所存在的文字的代碼如下: StringBuilder sb = new StringBuilder()。 (tr class=+c+)。運(yùn)行界面及過程如 圖 7: 圖 7 spider 第二步:運(yùn)行 index 模塊,把數(shù)據(jù)庫中的記錄建立索引,運(yùn)行界面及過程如下: 如果存放索引的文件已經(jīng)存在,則會(huì)清除 當(dāng)數(shù)據(jù)庫里沒有記錄時(shí),如圖 8: 圖 8 index1 有記錄時(shí)創(chuàng)建索引文件如圖 9: 第 15 頁 共 19 頁 圖 9 index2 第三步:運(yùn)行 search web 模塊 ,從表單中進(jìn)行關(guān)鍵字搜索,此搜索結(jié)果數(shù)據(jù)來源于前