Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] frequency of a word

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Thu May 22 2008 - 14:54:20 GMT
On 05/22/2008 02:18 AM, Jesus Martin wrote:

> It returns the documents which contains this combination search but I 
> want to know the count of each word inside each document found.
> I was searching inside the mail list and I found similar question 
> without answer: http://swish-e.org/archive/2003-12/6717.html

The term frequency (TF) in a document is stored in the index, but is not available from
search results.

You can get at the TF for the entire index using the "-T index_words" option to swish-e.
You could cache that information and look it up for each query keyword if you needed to.

This perl script might give you a head start:

http://svn.swish-e.org/libswish3/trunk/perl/countwords.pl

-- 
Peter Karman  .  peter(at)not-real.peknet.com  .  http://peknet.com/

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu May 22 10:51:28 2008