lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Retrieve nearest token based off location in original Text
Date Fri, 06 Jul 2007 17:23:49 GMT
: I never got a response to this and thought maybe I was too wordy.
: I'm wondering if there's a way where given a position in the original text
: you can retrieve the token index that is nearest to that position using the
: StandardToken/StandardTokenizer classes?

i may not be understanding the question, but wouldn't that just be...

  TokenStream s = getTokenStreamForOrriginalText()
  Token t;
  for (i=0; i<thePositionYouKnow; i++) {
    t =;
  return t;



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message