Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2565 > unrolled thread

Re: Count Ouccrence of words in a long text

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-05-21 10:48 +0000
Last post2011-05-21 10:48 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Count Ouccrence of words in a long text Bill Rowe <readnews@sbcglobal.net> - 2011-05-21 10:48 +0000

#2565 — Re: Count Ouccrence of words in a long text

FromBill Rowe <readnews@sbcglobal.net>
Date2011-05-21 10:48 +0000
SubjectRe: Count Ouccrence of words in a long text
Message-ID<ir859f$bfr$1@smc.vnet.net>
On 5/20/11 at 6:34 AM, readhpr@gmail.com (Helen Read) wrote:

>On 5/19/2011 7:43 AM, Matthias Bode wrote:

>>How could I take apart the words ("alice" should become
>>"a,l,i,c,e") to get a tally of the letters in a text?
>(Interesting when comparing languages.)

>Characters[text]

>where text is a string.

For arbitrary text, this probably isn't what is wanted since it
would return all characters not just letters. Better might be:

StringCases[ToLowerCase[text], CharacterRange["a", "z"]]

which would only return letters.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web