karl wettin <[EMAIL PROTECTED]> wrote on 12/04/2007 00:25:47:
>
> 12 apr 2007 kl. 09.12 skrev sai hariharan:
>
> > Thanx for replying. In my scenario i'm not going to index any of my
> > docs.
> > So is there a way to find out term frequencies of the terms in a doc
> > without doing the indexing part?
>
> Using an analyzer (Tokenstream) and a Map<String, Integer>?
>
> while ((t = ts.next)!=null) {
> Integer tf = map.get(t.termtext());
> if (tf == null) {
> tf = 1;
> } else {
> tf++;
> }
> map.put(t.termtext(), tf);
> }
>
>
> --
> karl
Note that for searching/looking into a single document, contrib's
MemoryIndex may be useful.
(probably overkill for just term freqs)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]