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 Daniel Cortes <dc...@fib.upc.edu> on 2006/04/20 13:34:27 UTC

Most used words

Hi everybody,
I have a simple question for you. How do you do to obtain the most used 
words of  and Index?
In my case I want to obtain the 10 most used words in a group. I thinked 
in use a TreeSet with all words and their frequencies of hits (whit the 
restriction of GROUPID).
Someone have any idea? Thks for any reply.

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


Re: Most used words

Posted by Daniel Cortes <dc...@fib.upc.edu>.
Not now, but When I finished the app I showed in the list.

Kapil Chhabra wrote:

> Its a good idea.
> src/org/getopt/luke/HighFreqTerms.java should definately help.
> You may also control the number of terms[tags in your case] required 
> as the output.
> Do you have a demo URL for your appl.?
>
> Regards,
> kapilChhabra
>
> Daniel Cortes wrote:
>
>> Thks for the reply, perhaps to use something like in Luke is the best 
>> option.
>> My idea to do is a TAGcloud (see the example in this page) for every 
>> group(field group with the id) and every portal (with the id).
>> The problem is that I think do reader.terms() is not the best option 
>> in my case, because I have a lot of groups and I want the tagcloud of 
>> an specific group (for example "luceners")
>> I thinked in do a search WHERE field GROUP is "luceners" and order my 
>> hits in ordered by Date. For this reason i can obtain something like 
>> "Racently we talk about .." and show words used in the last days in 
>> this groups.
>> What do you think?
>>
>>
>>
>> Kapil Chhabra wrote:
>>
>>> Hi,
>>> If I have correctly understood your question, you want the terms in 
>>> a field with the maximum number of occurences.
>>> Try luke [www.getopt.org/*luke*/].
>>> Or else in case you are not able to initialize graphical content on 
>>> your system.
>>> You may use the following script.
>>> src/org/getopt/luke/HighFreqTerms.java
>>> get it from the luke source code.
>>> Regards,
>>> kapilChhabra
>>>
>>> Daniel Cortes wrote:
>>>
>>>> Hi everybody,
>>>> I have a simple question for you. How do you do to obtain the most 
>>>> used words of  and Index?
>>>> In my case I want to obtain the 10 most used words in a group. I 
>>>> thinked in use a TreeSet with all words and their frequencies of 
>>>> hits (whit the restriction of GROUPID).
>>>> Someone have any idea? Thks for any reply.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: Most used words

Posted by Kapil Chhabra <ka...@naukri.com>.
Its a good idea.
src/org/getopt/luke/HighFreqTerms.java should definately help.
You may also control the number of terms[tags in your case] required as 
the output.
Do you have a demo URL for your appl.?

Regards,
kapilChhabra

Daniel Cortes wrote:

> Thks for the reply, perhaps to use something like in Luke is the best 
> option.
> My idea to do is a TAGcloud (see the example in this page) for every 
> group(field group with the id) and every portal (with the id).
> The problem is that I think do reader.terms() is not the best option 
> in my case, because I have a lot of groups and I want the tagcloud of 
> an specific group (for example "luceners")
> I thinked in do a search WHERE field GROUP is "luceners" and order my 
> hits in ordered by Date. For this reason i can obtain something like 
> "Racently we talk about .." and show words used in the last days in 
> this groups.
> What do you think?
>
>
>
> Kapil Chhabra wrote:
>
>> Hi,
>> If I have correctly understood your question, you want the terms in a 
>> field with the maximum number of occurences.
>> Try luke [www.getopt.org/*luke*/].
>> Or else in case you are not able to initialize graphical content on 
>> your system.
>> You may use the following script.
>> src/org/getopt/luke/HighFreqTerms.java
>> get it from the luke source code.
>> Regards,
>> kapilChhabra
>>
>> Daniel Cortes wrote:
>>
>>> Hi everybody,
>>> I have a simple question for you. How do you do to obtain the most 
>>> used words of  and Index?
>>> In my case I want to obtain the 10 most used words in a group. I 
>>> thinked in use a TreeSet with all words and their frequencies of 
>>> hits (whit the restriction of GROUPID).
>>> Someone have any idea? Thks for any reply.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


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


Re: Most used words

Posted by Daniel Cortes <dc...@fib.upc.edu>.
Thks for the reply, perhaps to use something like in Luke is the best 
option.
My idea to do is a TAGcloud (see the example in this page) for every 
group(field group with the id) and every portal (with the id).
The problem is that I think do reader.terms() is not the best option in 
my case, because I have a lot of groups and I want the tagcloud of an 
specific group (for example "luceners")
I thinked in do a search WHERE field GROUP is "luceners" and order my 
hits in ordered by Date. For this reason i can obtain something like 
"Racently we talk about .." and show words used in the last days in this 
groups.
What do you think?



Kapil Chhabra wrote:

> Hi,
> If I have correctly understood your question, you want the terms in a 
> field with the maximum number of occurences.
> Try luke [www.getopt.org/*luke*/].
> Or else in case you are not able to initialize graphical content on 
> your system.
> You may use the following script.
> src/org/getopt/luke/HighFreqTerms.java
> get it from the luke source code.
> Regards,
> kapilChhabra
>
> Daniel Cortes wrote:
>
>> Hi everybody,
>> I have a simple question for you. How do you do to obtain the most 
>> used words of  and Index?
>> In my case I want to obtain the 10 most used words in a group. I 
>> thinked in use a TreeSet with all words and their frequencies of hits 
>> (whit the restriction of GROUPID).
>> Someone have any idea? Thks for any reply.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Re: Most used words

Posted by Kapil Chhabra <ka...@naukri.com>.
Hi,
If I have correctly understood your question, you want the terms in a 
field with the maximum number of occurences.
Try luke [www.getopt.org/*luke*/].
Or else in case you are not able to initialize graphical content on your 
system.
You may use the following script.
src/org/getopt/luke/HighFreqTerms.java
get it from the luke source code.
Regards,
kapilChhabra

Daniel Cortes wrote:

> Hi everybody,
> I have a simple question for you. How do you do to obtain the most 
> used words of  and Index?
> In my case I want to obtain the 10 most used words in a group. I 
> thinked in use a TreeSet with all words and their frequencies of hits 
> (whit the restriction of GROUPID).
> Someone have any idea? Thks for any reply.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


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


Re: Most used words

Posted by karl wettin <ka...@snigel.net>.
20 apr 2006 kl. 13.34 skrev Daniel Cortes:

> How do you do to obtain the most used words of  and Index?

Use the  terms() and termDocs() from IndexReader. Or if available,  
use the term frequency vectors.

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