markharw00d wrote:
Swing supports HTML and will do the highlight for you.
SwingText=""+highlighter.getBestFragment(tokenStream,text)+"";
If you don't like that approach and really do just want to just know the
positions, plug in your own "Formatter" class which, instead of marking
up the text,
Hi Daniel/Chris,
Unfortunately, the contrib/highlighter code in source control fails to
meet our needs in two ways:
1. We don't just want fragments, we want *all* of the text, with
highlights in the appropriate places (although we do offer a means
to display just the fragments as w
Chris Hostetter wrote:
if you build a map whose keys are tokens which begin token lists for
queries, each of which is is mapped to a value which is a list of lists of
tokens, then you can make one pass over the tokens from the main text, and
"lookup" wether or not this is the potential start of s
: The existing highlighting code we wrote basically works like this...
:1. Get the text out of the Swing component.
:2. Break the text into tokens using the appropriate Analyzer.
:3. For each term:
:3.1. Break the term into tokens using the same Analyzer.
:3.2. Iterate