Am having an index of huge content, from which I just want to have the
highlighting of the specific text.
The highlighted text might have appear as many as times, all I want to have
two or more lines before and after the line of highlighted text, by which i
can have a snippet of text with highlighted parts are in the middle of the
snippet, so that they can be easily located and identified from a huge
content of file.
Am having an index of huge content, from which I just want to have the
highlighting of the specific text.
The highlighted text might have appear as many as times, all I want to
have two or more lines before and after the line of highlighted text, by
which i can have a snippet of text with highlighted parts are in the middle
of the snippet, so that they can be easily located and identified from a
huge content of file.
Is it possible?
The only segmentation options are based on characters, sentences, and
grabbing the contents of the whole field. The trick with lines is, unless
the text contains explicit new lines and you only wrap on new lines, then
you have to estimate line breaks based on the rendering context. Stuff
like width in pixels and the font. If you want to be precise you need the
screen dpi as well and a font rendering engine that works similarly. Some
contexts don't properly render ligatures, some do. And its 1000x worse
when you leave English and go to something like Arabic or Sanskrit. There
be dragons.
But, if you are talking about code, or something else with explicit
newlines and that only wraps on newlines, then the answer is still no, but
it wouldn't be hard to implement.
On Friday, 9 May 2014 20:25:55 UTC+5:30, Nikolas Everett wrote:
On Fri, May 9, 2014 at 8:29 AM, Anand kumar <anand...@gmail.com<javascript:>
wrote:
Am having an index of huge content, from which I just want to have the
highlighting of the specific text.
The highlighted text might have appear as many as times, all I want to
have two or more lines before and after the line of highlighted text, by
which i can have a snippet of text with highlighted parts are in the middle
of the snippet, so that they can be easily located and identified from a
huge content of file.
Is it possible?
The only segmentation options are based on characters, sentences, and
grabbing the contents of the whole field. The trick with lines is, unless
the text contains explicit new lines and you only wrap on new lines, then
you have to estimate line breaks based on the rendering context. Stuff
like width in pixels and the font. If you want to be precise you need the
screen dpi as well and a font rendering engine that works similarly. Some
contexts don't properly render ligatures, some do. And its 1000x worse
when you leave English and go to something like Arabic or Sanskrit. There
be dragons.
But, if you are talking about code, or something else with explicit
newlines and that only wraps on newlines, then the answer is still no, but
it wouldn't be hard to implement.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.