On Fri, 2006-09-22 at 14:19 +0530, heritrix.lucene wrote:
> i am looking for a analyzer that chops a given string into its n-grams.
> Basically, I want to index 3-grams and more upto the limit of a word. Can
> anybody tell me if there is any analyzer is available for this.

It's not that much to it. But you might want to make it a filter.

  for (int size=3; size<word.length(); size++) {
     for (int pos=0; pos<word.length()-size; pos++) {
        String gram = word.subString(pos, size);
        // do your thing
     }
  }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to