lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Getting word freqency?
Date Tue, 13 Jan 2004 14:19:40 GMT
Hello Erik,

I know that. However, I still wonder if there this is already solved somehow
in Lucene. I would prefer using Lucene methods instead of workaround. On the
other generating an index only get hold of words and their frequencies would
make it to complicated. I basically want to tansfer a String (or
InputStream) into a word frequency list...

Thanks for the help so far!

> On Jan 13, 2004, at 7:26 AM, wrote:
> > Example: I have a very long text. I parse these text with an
> > WhitespaceAnalyser. From this Text I generate an Index. From this 
> > index I get each word
> > together with its alsolute frequency / relative frequency.
> >
> > Can I do it without generating an index?
> May be other ways to do it, but a poor mans solution would be to take 
> the output (a TokenStream) of an analyzer directly, and iterate over it 
> and insert it into a Map.  If it is already in the Map, add one to the 
> counter, if not insert it with a counter of one.
> 	Erik
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS!

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

View raw message