You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by dziadgba <dz...@googlemail.com> on 2007/03/02 13:22:48 UTC

calculate average distance between words

hy,
We want to correlate words and construct a network which links give the
correleation strength.
We believe that if words occur very often very near to each other the
strenght of the link should be stronger.

I remember that somebody once told me that lucene has the capability of
doing that.
So given two terms and the common field (of a single document or all the
documents in which both words occur) it can give the average distance
between the two words.

anyone has any clue?
thanks for attention
dzi

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: calculate average distance between words

Posted by Grant Ingersoll <gs...@apache.org>.
Take a look at SpanNearQuery, it returns position information.   
You'll have to calculate the average based on the results, but that  
is pretty trivial.

-Grant

On Mar 2, 2007, at 7:22 AM, dziadgba wrote:

> hy,
> We want to correlate words and construct a network which links give  
> the
> correleation strength.
> We believe that if words occur very often very near to each other the
> strenght of the link should be stronger.
>
> I remember that somebody once told me that lucene has the  
> capability of
> doing that.
> So given two terms and the common field (of a single document or  
> all the
> documents in which both words occur) it can give the average distance
> between the two words.
>
> anyone has any clue?
> thanks for attention
> dzi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org

Read the Lucene Java FAQ at http://wiki.apache.org/jakarta-lucene/ 
LuceneFAQ



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org