MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Count Ouccrence of words in a long text

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118974] Re: Count Ouccrence of words in a long text
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 18 May 2011 07:16:49 -0400 (EDT)

On 5/17/11 at 7:47 AM, yako at 11y11.com (Yako) wrote:

>What I need is to be able to count the occurrence of each word of a
>text and count the times each word appears on it. I know how to do
>this on other languages but I am trying to achieve it with
>mathematica.

>Can someone hint me the way to go?

Tally[ReadList[filename,Word]]

will do the trick where filename is the name and extension of
the file containing the text and is assumed to be in the current
working directory.



  • Prev by Date: Re: TeXForm: slight change in behaviour from version 7 to version 8
  • Next by Date: Re: Count Ouccrence of words in a long text
  • Previous by thread: Count Ouccrence of words in a long text
  • Next by thread: Re: Count Ouccrence of words in a long text