Group Abstract Group Abstract

Message Boards Message Boards

Letter frequencies in WordList

Posted 10 years ago
POSTED BY: Jackreece Ejini
2 Replies
Posted 10 years ago
POSTED BY: Jackreece Ejini

Hi,

you are actually quite close. The first thing is that you don't actually need to join the strings. I made the labelling a bit nicer.

BarChart[#[[All, 2]], ChartLabels -> #[[All, 1]]] &@Reverse@SortBy[Tally[Flatten[Characters /@ ToLowerCase[WordList[]]]], Last]

enter image description here

I have also sorted the letters with respect to their frequency. The code I suggest is not the shortest one but should be easy to understand.

Cheers,

M.

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard