help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any faster way to find frequency of words?


From: Jean Louis
Subject: Re: Any faster way to find frequency of words?
Date: Sun, 9 May 2021 20:19:53 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2021-05-09 18:05]:
> Jean Louis wrote:
> 
> >      (text (text-alphabetic-only text))
> >      (words (split-string text " " t " ")))
> 
> Here is what I would try first
> 
>   1. `buffer-substring'
>   2. `split-string'
>   3. `delete-dups'
>   4. loop and do `how-many'
>   5. get a new list with '(occurrences word)

How do you get `occurences'? You would count for words each time? Is
it function? I cannot find it.

I think that your (4) is not necessary, as counting is not
necessary. 

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]