??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品999,成人国产在线视频,国产福利片在线http://www.aygfsteel.com/xinyi309/category/8631.html在搜索的天空下振翱? zh-cnThu, 01 Mar 2007 02:35:21 GMTThu, 01 Mar 2007 02:35:21 GMT60Nutch-开源搜索引?/title><link>http://www.aygfsteel.com/xinyi309/archive/2005/12/21/24988.html</link><dc:creator>Search Engine </dc:creator><author>Search Engine </author><pubDate>Wed, 21 Dec 2005 11:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/xinyi309/archive/2005/12/21/24988.html</guid><wfw:comment>http://www.aygfsteel.com/xinyi309/comments/24988.html</wfw:comment><comments>http://www.aygfsteel.com/xinyi309/archive/2005/12/21/24988.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xinyi309/comments/commentRss/24988.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xinyi309/services/trackbacks/24988.html</trackback:ping><description><![CDATA[1.介绍<br />nutch是一个完全开源的搜烦引擎?它的效率可以和商业搜索引擎相媲美.作ؓ一个研I^?nutch有开攄zȝ架构,用户可以制定个性化的搜索引?nutch的徏立目的是增加web搜烦的透明?<br />2.架构<br />nutch有高质量,模块化的架构特点允许使用插g来进?media-type解析,html分析,数据索协议和查询.有四个主要的模块:<br />searcher:<br />l一个查?必需快速的扑ֈ最的相关l果子集,然后呈现他们.发现一个比较大的相兛_集工作是建立一个文档集的倒排索引,排序以生最相关的文?<br />indexer:<br />创徏倒排索引,使用lucene存储倒排索引.<br />数据?<br />为烦引存储文档内?以及为搜索存储摘?伴随着像文档的链接l构q样的信?<br />Fetcher:<br />hweb面,解析他们,抽取链接.<br /><br /><br /><img src ="http://www.aygfsteel.com/xinyi309/aggbug/24988.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xinyi309/" target="_blank">Search Engine </a> 2005-12-21 19:57 <a href="http://www.aygfsteel.com/xinyi309/archive/2005/12/21/24988.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>google 的PR法 http://www.aygfsteel.com/xinyi309/archive/2005/11/12/19447.htmlSearch Engine Search Engine Sat, 12 Nov 2005 02:43:00 GMThttp://www.aygfsteel.com/xinyi309/archive/2005/11/12/19447.htmlhttp://www.aygfsteel.com/xinyi309/comments/19447.htmlhttp://www.aygfsteel.com/xinyi309/archive/2005/11/12/19447.html#Feedback0http://www.aygfsteel.com/xinyi309/comments/commentRss/19447.htmlhttp://www.aygfsteel.com/xinyi309/services/trackbacks/19447.html
假设一个概率qQؓ用户q入一个随机抽取的|页的概?Q取gؓ0.15Q?BR>
1-qQ?为用戯入当前网后点当前网超链接的概?BR>
q一步假讄户不回溯先前讉K的网,q个q程可以通过构造马可夫链来实现。于是每个访问的|页的概率就可以出来?BR>
设CQaQؓa|页包含的超链接数量Q也是outing link .

设p1  到pn  为指向网a的网|??BR>
于是|页a的PRgؓQ?BR>
PRQaQ?q+ (1-q){ 西格玛i?到n [PR(Pi)/C(Pi)] }

通过公式可以看出C(Pi)的值是已知的,也就是说前h已经好??nbsp; 

|页的PRg用是QCrawling可以Ҏ|页的PR值去抓优质的|页?BR>
所以可以看出网设计者应该设计描q性强的网|题,头信息,原数据,和好的超链接?BR>
q是我翻译的一文献的一部分Q希望能l大家提供一些帮助?


Search Engine 2005-11-12 10:43 发表评论
]]>
转蝲 lucene ?http://www.aygfsteel.com/xinyi309/archive/2005/11/10/19083.htmlSearch Engine Search Engine Thu, 10 Nov 2005 00:45:00 GMThttp://www.aygfsteel.com/xinyi309/archive/2005/11/10/19083.htmlhttp://www.aygfsteel.com/xinyi309/comments/19083.htmlhttp://www.aygfsteel.com/xinyi309/archive/2005/11/10/19083.html#Feedback0http://www.aygfsteel.com/xinyi309/comments/commentRss/19083.htmlhttp://www.aygfsteel.com/xinyi309/services/trackbacks/19083.html阅读全文

Search Engine 2005-11-10 08:45 发表评论
]]>
转蝲lucene 一http://www.aygfsteel.com/xinyi309/archive/2005/11/10/19082.htmlSearch Engine Search Engine Thu, 10 Nov 2005 00:43:00 GMThttp://www.aygfsteel.com/xinyi309/archive/2005/11/10/19082.htmlhttp://www.aygfsteel.com/xinyi309/comments/19082.htmlhttp://www.aygfsteel.com/xinyi309/archive/2005/11/10/19082.html#Feedback0http://www.aygfsteel.com/xinyi309/comments/commentRss/19082.htmlhttp://www.aygfsteel.com/xinyi309/services/trackbacks/19082.html Lucene.Net pd一 PDF文档 打印 E-mail
作?idior   
2005-03-16 22:36

本文介绍了什么是Lucene,Lucene能做什?

如何从一个文件夹下的所有txt文g中查扄定的?

本文围l该个实例介l了lucene.net的烦引的建立以及如何针对索引q行搜烦.最后还给出源代码供大家学?

源代码下?/FONT>

What’s Lucene
Lucene是一个信息检索的函数?Library),利用它你可以Z的应用加上烦引和搜烦的功?

Lucene的用者不需要深入了解有兛_文检索的知识,仅仅学会使用库中的一个类,你就Z的应用实现全文检索的功能.

不过千万别以为Lucene是一个象google那样的搜索引?Lucene甚至不是一个应用程?它仅仅是一个工?一个Library.你也可以把它理解Z个将索引,搜烦功能装的很好的一套简单易用的API.利用q套API你可以做很多有关搜烦的事?而且很方?

What Can Lucene Do

Lucene可以对Q何的数据做烦引和搜烦. Lucene不管数据源是什么格?只要它能被{化ؓ文字的Ş?可以被Lucene所分析利用.也就是说不管是MS word, Html ,pdfq是其他什么Ş式的文g只要你可以从中抽取出文字形式的内容就可以被Lucene所?你就可以用Lucene对它们进行烦引以及搜?

How To Use Lucene --- A Simple Example
CZ介绍:

Z入参数的文g夹下的所有txtcd的文件做索引,做好的烦引文件放入index文g?

然后在烦引的基础上对文gq行全文搜烦.

1.       建立索引
IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);
IndexDocs(writer, new System.IO.FileInfo(args[0]));              
writer.Optimize();
writer.Close();

IndexWriter是对索引q行写操作的一个类,利用它可以创Z个烦引对象然后往其中d文g.需要注意它q不是唯一可以修改索引的类.在烦引徏好后利用其他c还可以对其q行修改.

构造函数第一个参数是建立的烦引所要放的文件夹的名?W二个参数是一个分析对?主要用于从文本中抽取那些需要徏立烦引的内容,把不需要参与徏索引的文本内容去?比如L一些a the之类的常用词,q有军_是否大小写敏?不同的选项通过指定不同的分析对象控?W三个参数用于确定是否覆盖原有烦引的.

W二步就是利用这个writer往索引中添加文?具体后面再说.

W三步进行优?

W四步关闭writer.

 

下面具体看看W二?

   public static void IndexDirectory(IndexWriter writer, FileInfo file)
         {
              if (Directory.Exists(file.FullName))
              {
                   String[] files = Directory.GetFileSystemEntries(file.FullName);
                   // an IO error could occur
                   if (files != null)
                   {
                       for (int i = 0; i < files.Length; i++)
                       {
                            IndexDirectory(writer, new FileInfo(files[i]));  //q里是一个递归

                       }
                   }
              }
              else if (file.Extension == ".txt")
              {
                   IndexFile(file, writer);
              }
         }

 

         private static void IndexFile(FileInfo file, IndexWriter writer)
         {
              Console.Out.WriteLine("adding " + file);
              try
              {
                   Document doc = new Document();                   
                   doc.Add(Field.Keyword("filename", file.FullName));

                   doc.Add(Field.Text("contents", new StreamReader(file.FullName)));

                   writer.AddDocument(doc);
              }
             
              catch (FileNotFoundException fnfe)
              {
                  
              }
     }

主要是两个函数一个用于处理文件夹(不是为文件夹建立索引),一个用于真正ؓ文g建立索引.

因此主要集中看一下IndexFileq个Ҏ.首先建立Document对象,然后为Document对象d一些属性Field.你可以把Document对象看成是虚拟文?来从此获取信?而Field则看成是描述此虚拟文件的元数?metadata).

其中Field包括四个cd:

Keywork

该类型的数据不被分?而会被烦引ƈ保存保存在烦引中.
UnIndexed
该类型的数据不会被分析也不会被烦?但是会保存在索引.
UnStored
和UnIndexed刚好相反,被分析被索引,但是不被保存.
Text
和UnStroredcM.如果值的cd为stringq会被保?如果值的cdReader׃会被保存和UnStored一?

 

最后将每一个Documentd到烦引当?

需要注意的是烦引不仅可以徏立在文gpȝ?也可以徏立在内存?

例如

IndexWriter writer = new IndexWriter("index", new StandardAnalyzer(), true);

在第一个参C是指定文件夹的名字而是使用Directory对象,q用它的子cRAMDirectory,可以将索引建立在内存当?

 

2.       对烦引进行搜?/STRONG>

IndexSearcher indexSearcher= new IndexSearcher(indexDir);
Query query = QueryParser.Parse(queryString, "contents",new StandardAnalyzer());
Hits hits = indexSearcher.Search(query);

 W一步利用IndexSearcher打开索引文g用于后面搜烦,其中的参数是索引文g的\?

W二步用QueryParser可L较好的查询语句(比如查询的词lucene ,以及一些高U方式lucene AND .net)转化为Lucene内部使用的查询对?

W三步执行搜?q将l果q回到hits集合.需要注意的是Luceneq不是一ơ将所有的l果攑օhits中而是采取一ơ放一部分的方?ZI间考虑.



Search Engine 2005-11-10 08:43 发表评论
]]>
索引技?/title><link>http://www.aygfsteel.com/xinyi309/archive/2005/11/09/19051.html</link><dc:creator>Search Engine </dc:creator><author>Search Engine </author><pubDate>Wed, 09 Nov 2005 13:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/xinyi309/archive/2005/11/09/19051.html</guid><wfw:comment>http://www.aygfsteel.com/xinyi309/comments/19051.html</wfw:comment><comments>http://www.aygfsteel.com/xinyi309/archive/2005/11/09/19051.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xinyi309/comments/commentRss/19051.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xinyi309/services/trackbacks/19051.html</trackback:ping><description><![CDATA[    当文本信息库的容量很大时Q如果要快速有效的获取文本Q那么就需要用特定的索引技术,一U简单而且常用的文本烦引结构是倒排文g。如果搜索过E是以简单的单词匚w实施的,那么Z倒排文g的烦引结构就能满回总需求。这U基于单词匹配的查询方式在目前的信息获取pȝ中用得比较普遍?BR>   <BR>    一个典型的倒排文g由如下几部分l成Q?BR><BR>Q?Q一个包含信息库中的文本中所有不同单词(也叫作词汇表Q的向量Q?BR><BR>Q?Q对于词汇表中的每个单词Q有一U包含这个单词的所有文档(用文档号来标识)l成的列表。每个列表中的文档根据文档号的大升序排列。查询执行的旉与访问烦引所需要的旉密切相关?<img src ="http://www.aygfsteel.com/xinyi309/aggbug/19051.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xinyi309/" target="_blank">Search Engine </a> 2005-11-09 21:27 <a href="http://www.aygfsteel.com/xinyi309/archive/2005/11/09/19051.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̨</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ߺ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">«Ϫ</a>| <a href="http://" target="_blank">ޭ</a>| <a href="http://" target="_blank">½</a>| <a href="http://" target="_blank">ϵ</a>| <a href="http://" target="_blank">̨</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ƕ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͼ</a>| <a href="http://" target="_blank">躣</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƾ</a>| <a href="http://" target="_blank">ϲ</a>| <a href="http://" target="_blank">μԴ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">ָ</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">ޭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>