使用 nutch+solr 识别文档中的字符串?

发布于 2024-09-14 10:30:19 字数 293 浏览 8 评论 0原文

我正在研究一种搜索解决方案,该解决方案将识别字符串(公司名称)并使用这些字符串在 Solr 中进行搜索和构面。

我是 Nutch 和 Solr 的新手,所以我想知道这是否最好在 Nutch 或 Solr 中完成。一种解决方案是在 Nutch 中生成一个解析器,用于识别有问题的字符串,然后对公司名称进行索引,然后映射到 Solr 值。我不确定如何操作,但我想这也可以直接从文本在 Solr 内部完成?

在 Nutch 或 Solr 中进行此字符串识别是否有意义?Solr 或 Nutch 中是否有一些功能可以帮助我?

谢谢。

I'm looking into a search solution that will identify strings (company names) and use these strings for search and facets in Solr.

I'm new to Nutch and Solr so I wonder if this is best done in Nutch or in Solr. One solution would be to generate a Parser in Nutch that identifies the strings in question and then index the name of the company, later mapped to a Solr value. I'm not sure on how, but I guess this could also be done inside Solr directly from the text?

Does it make sense to do this string identification in Nutch or in Solr and is there some functionality in Solr or Nutch that could help me here?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丑丑阿 2024-09-21 10:30:19

您可以将 NER 库(请参阅 opennlp、lingpipe、gate)嵌入到自定义解析器中,生成新字段并相应地创建索引过滤器。这并不是特别困难,与在 SOLR 方面执行此操作相比,优点是您可以从 MapReduce 的可扩展性中获益(NLP 任务通常需要 CPU 资源)。
有关如何在 MapReduce 中嵌入 GATE 的示例,请参阅 Behemoth

You could embed a NER library (see opennlp, lingpipe, gate) in to a custom parser, generate new fields and create an indexingfilter accordingly. This is not particularly difficult and the advantage compared to doing this on the SOLR side is that you'd gain from the scalability of mapreduce (NLP tasks are often CPU-hungry).
See Behemoth for an example of how to embed GATE in mapreduce

裸钻 2024-09-21 10:30:19

Nutch 与 Solr 配合使用,通过 Solr HTTP API 将爬取的数据索引到 Solr。您可以通过调用 solrindex 命令来触发索引。有关如何设置的详细信息,请参阅此页面

为了能够提取公司名称,我将在 Solr 中添加必要的代码。我会使用 UpdateRequestProcessor。它允许在索引过程中添加额外的步骤,以在正在索引的文档中添加额外的字段。您的 UpdateRequestProcessor 将用于检查由 Nutch 发送到 Solr 的文档,从文本中提取公司名称并将它们添加为文档中的新字段。 Solr 会索引文档+您添加的字段。

Nutch works with Solr by indexing the crawled data to Solr via the Solr HTTP API. You trigger the indexation by calling the solrindex command. See this page for details on how to setup this.

To be able to extract the company names, I would add the necessary code in Solr. I would use a UpdateRequestProcessor. It allows to add an extra step in the indexing process to add extra fields in the document being indexed. Your UpdateRequestProcessor would be used to examine to document sent to Solr by Nutch, extract the company names from the text and add them as new fields in the document. Solr would them index the document + the fields that you add.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文