lucene-highlighter

Lucene Entity Extraction

江枫思渺然 提交于 2019-12-22 08:07:02
问题 Given a finite dictionary of entity terms, I'm looking for a way to do Entity Extraction with intelligent tagging using Lucene. Currently I've been able to use Lucene for: - Searching for complex phrases with some fuzzyness - Highlighting results However, I 'm not aware how to: -Get accurate offsets of the matched phrases -Do entity-specific annotaions per match(not just tags for every single hit) I have tried using the explain() method - but this only gives the terms in the query which got

Highlighting issue with quoted queries in Solr - fragment not returned

萝らか妹 提交于 2019-12-13 18:27:29
问题 This is very curious. Highlighting works fine in every other case, but there's this one case it doesn't return any fragments. My document is as follows (fieldType text_en ): Abu Yahya Suhaib bin Sinan (May Allah be pleased with him) reported that: The Messenger of Allah (PBUH) said, "How wonderful is the case of a believer; there is good for him in everything and this applies only to a believer. If prosperity attends him, he expresses gratitude to Allah and that is good for him; and if

Problems using Lucene Highlighter

让人想犯罪 __ 提交于 2019-12-11 06:24:17
问题 I am using Lucene Highlighter 2.4.1 for my application. I use the highlighter to get the best matching fragments, and display them. I make a call to a function String[] getFragmentsWithHighlightedTerms(Analyzer analyzer, Query query, String fieldName, String fieldContents, int fragmentsNumber, int fragmentSize). For example : String text = doc.get("MetaData"); getFragmentsWithHighlightedTerms(analyzer, query, "MetaData", Text, 5, 100); The function getFragmentsWithHighlightedTerms() is

Lucene Entity Extraction

落爺英雄遲暮 提交于 2019-12-05 18:20:26
Given a finite dictionary of entity terms, I'm looking for a way to do Entity Extraction with intelligent tagging using Lucene. Currently I've been able to use Lucene for: - Searching for complex phrases with some fuzzyness - Highlighting results However, I 'm not aware how to: -Get accurate offsets of the matched phrases -Do entity-specific annotaions per match(not just tags for every single hit) I have tried using the explain() method - but this only gives the terms in the query which got the hit - not the offsets of the hit within the original text. Has anybody faced a similar problem and