In[17]:=
freq[str_]:= Transpose[ { Characters["abcdefghijklmnopqrstuvwxyz"],
Map[ Length[StringPosition[str,ToString[#]]] &,
Characters["abcdefghijklmnopqrstuvwxyz"]]
}]
In[18]:=
freq[ "ghi djksiwlabc dksoabcndjdksueos"]
Out[18]
Exercise: Write a function to Plot the frequency distribution. For this, you
can
Up to String Manipulation
Exercise: Use this function to determine the frequency of occurrence of
letters in the English language. You should eliminate punctuation in the
frequency analysis.
modify the previous function to return a list of elements of the form
{ character code, frequency} where character code is a number between 0 and 25.