有Lucene的HTML分析器/标记器吗? [英] Is there a HTML analyzer/tokenizer for Lucene?

查看:56
本文介绍了有Lucene的HTML分析器/标记器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Lucene中从html索引文本,实现此目的的最佳方法是什么?
在Lucene中有什么好的Contrib模块可以做到这一点吗?

I wanted to index text from html, in Lucene, what is the best way to achieve this ?
Is there any good Contrib module that can do this in Lucene ?

编辑
最终使用Jericho Parser.它不创建DOM,并且易于使用.

EDIT
Finally ended up using Jericho Parser. It doesn't create DOM and is easy to use.

推荐答案

我假设您实际上不想索引HTML标记.在这种情况下,您可以先使用 Apache Tika 从HTML提取文本.然后,您可以在Lucene中为文本编制索引.

I'm assuming that you don't actually want to index the HTML tags. If that's the case, you can first extract text from HTML using Apache Tika. Then you can index the text in Lucene.

这篇关于有Lucene的HTML分析器/标记器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆