• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            學(xué)著站在巨人的肩膀上

            金融數(shù)學(xué),InformationSearch,Compiler,OS,

              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
              12 隨筆 :: 0 文章 :: 8 評(píng)論 :: 0 Trackbacks

            不好意思讓大家久等了,前一陣一直在忙考試,終于結(jié)束了。呵呵!廢話不多說了下面我們開始吧!

            TSE用的是將抓取回來的網(wǎng)頁文檔全部裝入一個(gè)大文檔,讓后對(duì)這一個(gè)大文檔內(nèi)的數(shù)據(jù)整體統(tǒng)一的建索引,其中包含了幾個(gè)步驟。

            view plaincopy to clipboardprint?
            1.  The document index (Doc.idx) keeps information about each document.  
             
            It is a fixed width ISAM (Index sequential access mode) index, orderd by docID.  
             
            The information stored in each entry includes a pointer into the repository,  
             
            a document length, a document checksum.  
             
             
             
            //Doc.idx  文檔編號(hào) 文檔長(zhǎng)度    checksum hash碼  
             
            0   0   bc9ce846d7987c4534f53d423380ba70  
             
            1   76760   4f47a3cad91f7d35f4bb6b2a638420e5  
             
            2   141624  d019433008538f65329ae8e39b86026c  
             
            3   142350  5705b8f58110f9ad61b1321c52605795  
             
            //Doc.idx   end  
             
             
             
              The url index (url.idx) is used to convert URLs into docIDs.  
             
             
             
            //url.idx  
             
            5c36868a9c5117eadbda747cbdb0725f    0 
             
            3272e136dd90263ee306a835c6c70d77    1 
             
            6b8601bb3bb9ab80f868d549b5c5a5f3    2 
             
            3f9eba99fa788954b5ff7f35a5db6e1f    3 
             
            //url.idx   end  
             
             
             
            It is a list of URL checksums with their corresponding docIDs and is sorted by  
             
            checksum. In order to find the docID of a particular URL, the URL's checksum  
             
            is computed and a binary search is performed on the checksums file to find its  
             
            docID.  
             
             
             
                ./DocIndex  
             
                    got Doc.idx, Url.idx, DocId2Url.idx //Data文件夾中的Doc.idx DocId2Url.idx和Doc.idx中  
             
             
             
            //DocId2Url.idx  
             
            0   http://*.*.edu.cn/index.aspx  
             
            1   http://*.*.edu.cn/showcontent1.jsp?NewsID=118  
             
            2   http://*.*.edu.cn/0102.html  
             
            3   http://*.*.edu.cn/0103.html  
             
            //DocId2Url.idx end  
             
             
             
            2.  sort Url.idx|uniq > Url.idx.sort_uniq    //Data文件夾中的Url.idx.sort_uniq  
             
             
             
            //Url.idx.sort_uniq  
             
            //對(duì)hash值進(jìn)行排序  
             
            000bfdfd8b2dedd926b58ba00d40986b    1111 
             
            000c7e34b653b5135a2361c6818e48dc    1831 
             
            0019d12f438eec910a06a606f570fde8    366 
             
            0033f7c005ec776f67f496cd8bc4ae0d    2103 
             
             
             
            3. Segment document to terms, (with finding document according to the url)  
             
                ./DocSegment Tianwang.raw.2559638448        //Tianwang.raw.2559638448為爬回來的文件 ,每個(gè)頁面包含http頭  
             
                    got Tianwang.raw.2559638448.seg       
             
             
             
            //Tianwang.raw.2559638448   爬取的原始網(wǎng)頁文件在文檔內(nèi)部每一個(gè)文檔之間應(yīng)該是通過version,</html>和回車做標(biāo)志位分割的  
             
            version: 1.0 
             
            url: http://***.105.138.175/Default2.asp?lang=gb  
             
            origin: http://***.105.138.175/  
             
            date: Fri, 23 May 2008 20:01:36 GMT  
             
            ip: 162.105.138.175 
             
            length: 38413 
             
             
             
            HTTP/1.1 200 OK  
             
            Server: Microsoft-IIS/5.0 
             
            Date: Fri, 23 May 2008 11:17:49 GMT  
             
            Connection: keep-alive  
             
            Connection: Keep-Alive  
             
            Content-Length: 38088 
             
            Content-Type: text/html; Charset=gb2312  
             
            Expires: Fri, 23 May 2008 11:17:49 GMT  
             
            Set-Cookie: ASPSESSIONIDSSTRDCAB=IMEOMBIAIPDFCKPAEDJFHOIH; path=/  
             
            Cache-control: private 
             
             
             
             
             
             
             
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
             
            " 
            <html>  
             
            <head>  
             
            <title>Apabi數(shù)字資源平臺(tái)</title>  
             
            <meta http-equiv="Content-Type" content="text/html; charset=gb2312">  
             
            <META NAME="ROBOTS" CONTENT="INDEX,NOFOLLOW">  
             
            <META NAME="DESCRIPTION" CONTENT="數(shù)字圖書館 方正數(shù)字圖書館 電子圖書 電子書 ebook e書 Apabi 數(shù)字資源平臺(tái)">  
             
            <link rel="stylesheet" type="text/css" href="css\common.css">  
             
             
             
            <style type="text/css">  
             
            <!--  
             
            .style4 {color: #666666}  
             
            -->  
             
            </style>  
             
             
             
            <script LANGUAGE="vbscript">  
             
            ...  
             
            </script>  
             
             
             
            <Script Language="javascript">  
             
            ...  
             
            </Script>  
             
            </head>  
             
            <body leftmargin="0" topmargin="0">  
             
            </body>  
             
            </html>  
             
            //Tianwang.raw.2559638448   end  
             
             
             
            //Tianwang.raw.2559638448.seg   將每個(gè)頁面分成一行如下(注意中間沒有回車作為分隔)  
             

             
            ...  
             
            ...  
             
            ...  
             

             
            ...  
             
            ...  
             
            ...  
             
            //Tianwang.raw.2559638448.seg   end  
             
             
             
            //下是 Tiny search 非必須因素  
             
            4. Create forward index (docic-->termid)     //建立正向索引  
             
                ./CrtForwardIdx Tianwang.raw.2559638448.seg > moon.fidx  
             
             
             
            //Tianwang.raw.2559638448.seg 將每個(gè)頁面分成一行如下<BR>//分詞   DocID<BR>1<BR>三星/  s/  手機(jī)/  論壇/  ,/  手機(jī)/  鈴聲/  下載/  ,/  手機(jī)/  圖片/  下載/  ,/  手機(jī)/<BR>2<BR>...<BR>...<BR>... 

            1.  The document index (Doc.idx) keeps information about each document.

            It is a fixed width ISAM (Index sequential access mode) index, orderd by docID.

            The information stored in each entry includes a pointer into the repository,

            a document length, a document checksum.

             

            //Doc.idx  文檔編號(hào) 文檔長(zhǎng)度 checksum hash碼

            0 0 bc9ce846d7987c4534f53d423380ba70

            1 76760 4f47a3cad91f7d35f4bb6b2a638420e5

            2 141624 d019433008538f65329ae8e39b86026c

            3 142350 5705b8f58110f9ad61b1321c52605795

            //Doc.idx end

             

              The url index (url.idx) is used to convert URLs into docIDs.

             

            //url.idx

            5c36868a9c5117eadbda747cbdb0725f 0

            3272e136dd90263ee306a835c6c70d77 1

            6b8601bb3bb9ab80f868d549b5c5a5f3 2

            3f9eba99fa788954b5ff7f35a5db6e1f 3

            //url.idx end

             

            It is a list of URL checksums with their corresponding docIDs and is sorted by

            checksum. In order to find the docID of a particular URL, the URL's checksum

            is computed and a binary search is performed on the checksums file to find its

            docID.

             

             ./DocIndex

              got Doc.idx, Url.idx, DocId2Url.idx //Data文件夾中的Doc.idx DocId2Url.idx和Doc.idx中

             

            //DocId2Url.idx

            http://*.*.edu.cn/index.aspx

            http://*.*.edu.cn/showcontent1.jsp?NewsID=118

            http://*.*.edu.cn/0102.html

            http://*.*.edu.cn/0103.html

            //DocId2Url.idx end

             

            2.  sort Url.idx|uniq > Url.idx.sort_uniq //Data文件夾中的Url.idx.sort_uniq

             

            //Url.idx.sort_uniq

            //對(duì)hash值進(jìn)行排序

            000bfdfd8b2dedd926b58ba00d40986b 1111

            000c7e34b653b5135a2361c6818e48dc 1831

            0019d12f438eec910a06a606f570fde8 366

            0033f7c005ec776f67f496cd8bc4ae0d 2103

             

            3. Segment document to terms, (with finding document according to the url)

             ./DocSegment Tianwang.raw.2559638448  //Tianwang.raw.2559638448為爬回來的文件 ,每個(gè)頁面包含http頭

              got Tianwang.raw.2559638448.seg  

             

            //Tianwang.raw.2559638448 爬取的原始網(wǎng)頁文件在文檔內(nèi)部每一個(gè)文檔之間應(yīng)該是通過version,</html>和回車做標(biāo)志位分割的

            version: 1.0

            url: http://***.105.138.175/Default2.asp?lang=gb

            origin: http://***.105.138.175/

            date: Fri, 23 May 2008 20:01:36 GMT

            ip: 162.105.138.175

            length: 38413

             

            HTTP/1.1 200 OK

            Server: Microsoft-IIS/5.0

            Date: Fri, 23 May 2008 11:17:49 GMT

            Connection: keep-alive

            Connection: Keep-Alive

            Content-Length: 38088

            Content-Type: text/html; Charset=gb2312

            Expires: Fri, 23 May 2008 11:17:49 GMT

            Set-Cookie: ASPSESSIONIDSSTRDCAB=IMEOMBIAIPDFCKPAEDJFHOIH; path=/

            Cache-control: private

             

             

             

            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

            "

            <html>

            <head>

            <title>Apabi數(shù)字資源平臺(tái)</title>

            <meta http-equiv="Content-Type" content="text/html; charset=gb2312">

            <META NAME="ROBOTS" CONTENT="INDEX,NOFOLLOW">

            <META NAME="DESCRIPTION" CONTENT="數(shù)字圖書館 方正數(shù)字圖書館 電子圖書 電子書 ebook e書 Apabi 數(shù)字資源平臺(tái)">

            <link rel="stylesheet" type="text/css" href="css\common.css">

             

            <style type="text/css">

            <!--

            .style4 {color: #666666}

            -->

            </style>

             

            <script LANGUAGE="vbscript">

            ...

            </script>

             

            <Script Language="javascript">

            ...

            </Script>

            </head>

            <body leftmargin="0" topmargin="0">

            </body>

            </html>

            //Tianwang.raw.2559638448 end

             

            //Tianwang.raw.2559638448.seg 將每個(gè)頁面分成一行如下(注意中間沒有回車作為分隔)

            1

            ...

            ...

            ...

            2

            ...

            ...

            ...

            //Tianwang.raw.2559638448.seg end

             

            //下是 Tiny search 非必須因素

            4. Create forward index (docic-->termid)  //建立正向索引

             ./CrtForwardIdx Tianwang.raw.2559638448.seg > moon.fidx

             

            //Tianwang.raw.2559638448.seg 將每個(gè)頁面分成一行如下//分詞   DocID1三星/  s/  手機(jī)/  論壇/  ,/  手機(jī)/  鈴聲/  下載/  ,/  手機(jī)/  圖片/  下載/  ,/  手機(jī)/2.........view plaincopy to clipboardprint?
            //Tianwang.raw.2559638448.seg end  
             
             
            //moon.fidx  
             
            //每篇文檔號(hào)對(duì)應(yīng)文檔內(nèi)分出來的    分詞  DocID  
             
            都會(huì)  2391 
             
            使   2391 
             
            那些  2391 
             
            擁有  2391 
             
            它   2391 
             
            的   2391 
             
            人   2391 
             
            的   2391 
             
            視野  2391 
             
            變   2391 
             
            窄   2391 
             
            在   2180 
             
            研究生部    2180 
             
            主頁  2180 
             
            培養(yǎng)  2180 
             
            管理  2180 
             
            欄目  2180 
             
            下載  2180 
             
            )   2180 
             
            、   2180 
             
            關(guān)于  2180 
             
            做好  2180 
             
            年   2180 
             
            國家  2180 
             
            公派  2180 
             
            研究生 2180 
             
            項(xiàng)目  2180 
             
            //moon.fidx end  
             
             
             
            5.# set | grep "LANG" 
             
            LANG=en; export LANG;  
             
            sort moon.fidx > moon.fidx.sort  
             
             
             
            6. Create inverted index (termid-->docid)    //建立倒排索引  
             
                ./CrtInvertedIdx moon.fidx.sort > sun.iidx  
             
             
             
            //sun.iidx  //文件規(guī)模大概減少1/2  
             
            花工   236 
             
            花海   2103 
             
            花卉   1018 1061 1061 1061 1730 1730 1730 1730 1730 1852 949 949 
             
            花蕾   447 447 
             
            花木   1061 
             
            花呢   1430 
             
            花期   447 447 447 447 447 525 
             
            花錢   174 236 
             
            花色   1730 1730 
             
            花色品種     1660 
             
            花生   450 526 
             
            花式   1428 1430 1430 1430 
             
            花紋   1430 1430 
             
            花序   447 447 447 447 447 450 
             
            花絮   136 137 
             
            花芽   450 450 
             
            //sun.iidx  end  
             
             
             
            TSESearch   CGI program for query  
             
            Snapshot    CGI program for page snapshot  
             
             
            <P>  
            author:http://hi.baidu.com/jrckkyy  
             
            author:http://blog.csdn.net/jrckkyy  
            </P> 

             

            posted on 2009-12-10 22:55 學(xué)者站在巨人的肩膀上 閱讀(1301) 評(píng)論(1)  編輯 收藏 引用 所屬分類: 中文文本信息處理

            評(píng)論

            # re: 自頂向下學(xué)搜索引擎——北大天網(wǎng)搜索引擎TSE分析及完全注釋[5]倒排索引的建立及文件介紹 2009-12-12 13:18 淘寶皇冠大全
            阿呆搜地哦的  回復(fù)  更多評(píng)論
              

            欧美久久一级内射wwwwww.| 国内精品久久人妻互换| 91精品国产91久久久久久青草| 久久精品国产亚洲AV无码偷窥| 亚洲国产精品无码久久久秋霞2 | 久久国产乱子伦精品免费强| 99久久人妻无码精品系列蜜桃| 久久精品无码一区二区三区| 狠狠精品干练久久久无码中文字幕 | 99久久国产综合精品五月天喷水| 色综合久久久久网| 性做久久久久久久久| 97精品依人久久久大香线蕉97| 久久精品国产第一区二区三区 | 青青草原综合久久大伊人| 无码专区久久综合久中文字幕 | 99麻豆久久久国产精品免费| 国产精品久久久久久久久鸭 | AA级片免费看视频久久| 香蕉99久久国产综合精品宅男自| 2021国产精品午夜久久| 狠狠久久亚洲欧美专区| 久久黄色视频| 久久天天躁狠狠躁夜夜网站 | 久久亚洲国产精品123区| 久久久久久精品免费免费自慰| 精品熟女少妇a∨免费久久| 国产激情久久久久影院小草| 久久精品日日躁夜夜躁欧美| 亚洲国产精品久久| 东方aⅴ免费观看久久av| 国内精品伊人久久久久影院对白 | 人妻精品久久久久中文字幕| 久久综合久久自在自线精品自| 国产午夜福利精品久久| 亚洲欧洲日产国码无码久久99| 久久人人爽人爽人人爽av| 99久久99久久久精品齐齐| 一日本道伊人久久综合影| 丁香五月综合久久激情| 久久久婷婷五月亚洲97号色 |