letters={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};

languages={"French","German","Spanish","Portuguese","Esperanto","Italian","Turkish","Swedish","Polish","Dutch","Danish","Icelandic","Finnish","Czech","English","Random"}

frequencydata=\[LeftAssociation]"French"->{"a"->0.07853704694121035`,"b"->0.009266877854116097`,"c"->0.03352943596494836`,"d"->0.03773604311515201`,"e"->0.15134529147982062`,"f"->0.010963919858476981`,"g"->0.008906899247130456`,"h"->0.007580120952811947`,"i"->0.07743654091413996`,"j"->0.006304768173777101`,"k"->0.0005039700497798988`,"l"->0.05611552227753322`,"m"->0.030526185872382438`,"n"->0.07297280618751799`,"o"->0.05961245731682231`,"p"->0.025928744806022953`,"q"->0.014008310363269839`,"r"->0.06883819475871147`,"s"->0.08174599909491093`,"t"->0.07450528654297116`,"u"->0.06490928539103961`,"v"->0.01890401941827457`,"w"->0.0007610976261982145`,"x"->0.004391739005224832`,"y"->0.0013164931912617763`,"z"->0.0033529435964948368`},"German"->{"a"->0.06670829963451715`,"b"->0.019308141975245444`,"c"->0.027969164303483864`,"d"->0.05196613396943048`,"e"->0.16785593628108397`,"f"->0.01695349051484966`,"g"->0.030804983671004003`,"h"->0.04685756406187615`,"i"->0.06705637854605391`,"j"->0.002743680832113351`,"k"->0.014506700519047084`,"l"->0.0351866829103492`,"m"->0.02594211652453444`,"n"->0.10008292468186611`,"o"->0.02655637342724639`,"p"->0.006859202080283377`,"q"->0.00018427707081358327`,"r"->0.0716940181615291`,"s"->0.07442746137859724`,"t"->0.06300228298815508`,"u"->0.04264990427829933`,"v"->0.008661022328238413`,"w"->0.019666458501827414`,"x"->0.0003480789115367684`,"y"->0.00039926698676276374`,"z"->0.011609455461255745`},"Spanish"->{"a"->0.11878749149677395`,"b"->0.022829873636907094`,"c"->0.041423594648636396`,"d"->0.05163777287625487`,"e"->0.12554884459194823`,"f"->0.007132402960153368`,"g"->0.018222671146750222`,"h"->0.007245779307785864`,"i"->0.06438745851456372`,"j"->0.005081321762074581`,"k"->0.00011337634763249573`,"l"->0.051194574426418754`,"m"->0.032539011770526274`,"n"->0.06918018593721012`,"o"->0.08949516604481458`,"p"->0.025870421141596753`,"q"->0.009039186988518069`,"r"->0.07081898950753439`,"s"->0.08221846591494714`,"t"->0.04774174929397457`,"u"->0.03016841541093773`,"v"->0.011729298509616376`,"w"->0.00017521799179567524`,"x"->0.0022159922491805984`,"y"->0.010389396219414154`,"z"->0.004813341304034138`},"Portuguese"->{"a"->0.15259327229880504`,"b"->0.01087568559571229`,"c"->0.040478822130925324`,"d"->0.05205313757794416`,"e"->0.13107130195407812`,"f"->0.01066713937144168`,"g"->0.013586786511230214`,"h"->0.008143730057767305`,"i"->0.06450334716689955`,"j"->0.0041396425517716`,"k"->0.0001564096682029572`,"l"->0.0289774978624012`,"m"->0.04940460052970742`,"n"->0.04635982565535651`,"o"->0.10150987466371922`,"p"->0.0263081061917374`,"q"->0.012554482701090696`,"r"->0.06809034222435403`,"s"->0.07095785280807491`,"t"->0.045212821421868166`,"u"->0.037944985506037414`,"v"->0.016423015161310506`,"w"->0.0003858105149006277`,"x"->0.0026381097370232116`,"y"->0.00006256386728118288`,"z"->0.004900836270359325`},"Esperanto"->{"a"->0.12411144115538257`,"b"->0.010037898187032674`,"c"->0.007948376523609546`,"d"->0.031178940899313733`,"e"->0.09213356550240703`,"f"->0.0106217351224009`,"g"->0.011994264058178838`,"h"->0.003933217248796477`,"i"->0.10255044555976646`,"j"->0.03585987913551162`,"k"->0.042640581788384715`,"l"->0.06252176585066066`,"m"->0.03066680323671003`,"n"->0.08148110212024992`,"o"->0.08992113079995902`,"p"->0.0282187852094643`,"q"->0.`,"r"->0.06057564273276656`,"s"->0.06239885281163576`,"t"->0.05404076615794325`,"u"->0.03260268360135204`,"v"->0.019502202191949192`,"w"->0.`,"x"->0.`,"y"->0.`,"z"->0.005059920106524634`},"Italian"->{"a"->0.11874311249507133`,"b"->0.009372061752484558`,"c"->0.045505555499388346`,"d"->0.037771329781318565`,"e"->0.11921828714703117`,"f"->0.01165694412148295`,"g"->0.016621002719616626`,"h"->0.00643002294992468`,"i"->0.10254673393252521`,"j"->0.00011121108875655892`,"k"->0.00009099089080082093`,"l"->0.06581674434592714`,"m"->0.025396568632406913`,"n"->0.06958781126467228`,"o"->0.09940249315040796`,"p"->0.030896462476367646`,"q"->0.0051055999838238416`,"r"->0.06437100019209188`,"s"->0.05035840300876546`,"t"->0.056849086552557354`,"u"->0.03044150802236354`,"v"->0.02120087755659128`,"w"->0.00033363326626967684`,"x"->0.00003033029693360698`,"y"->0.00020220197955737987`,"z"->0.011940026892863283`},"Turkish"->{"a"->0.13572711705938587`,"b"->0.029876774064775027`,"c"->0.01536910001995987`,"d"->0.05469004422687019`,"e"->0.10412749104432142`,"f"->0.004842894811484279`,"g"->0.013163009108003906`,"h"->0.012732296120431552`,"i"->0.10084987026084398`,"j"->0.00035717662384048915`,"k"->0.05970102215545587`,"l"->0.06221176371715813`,"m"->0.03941549096027985`,"n"->0.08390499101805843`,"o"->0.03126345978086163`,"p"->0.009307602609490392`,"q"->0.`,"r"->0.08112111439106638`,"s"->0.031662657183977476`,"t"->0.03481421562962885`,"u"->0.03398430523894065`,"v"->0.01007448183126556`,"w"->0.`,"x"->0.`,"y"->0.035045329915643283`,"z"->0.01575779222825687`},"Swedish"->{"a"->0.09819064661622662`,"b"->0.016063374459757845`,"c"->0.015550602245733002`,"d"->0.04920520306826149`,"e"->0.10620663673751295`,"f"->0.021212026078129744`,"g"->0.029950083194675542`,"h"->0.021871304639018825`,"i"->0.06087338712209211`,"j"->0.006425349783903138`,"k"->0.0328592806538369`,"l"->0.055201498550633644`,"m"->0.036323109283270025`,"n"->0.08938980106531043`,"o"->0.046902960474680566`,"p"->0.01924465513452422`,"q"->0.00020929478123462992`,"r"->0.08822821502945823`,"s"->0.06896263041681056`,"t"->0.08048430812377694`,"u"->0.02008183425946274`,"v"->0.025272344834081563`,"w"->0.0014859929467658723`,"x"->0.0016638935108153079`,"y"->0.007409035255705899`,"z"->0.0007325317343212048`},"Polish"->{"a"->0.11374269005847952`,"b"->0.018843404808317088`,"c"->0.04218106995884773`,"d"->0.040340047649989164`,"e"->0.07961880008663634`,"f"->0.0015486246480398524`,"g"->0.018745938921377516`,"h"->0.010991986138184966`,"i"->0.09018843404808316`,"j"->0.019883040935672513`,"k"->0.029813731860515485`,"l"->0.02776694823478449`,"m"->0.027236300628113493`,"n"->0.0675438596491228`,"o"->0.07220056313623564`,"p"->0.02647823261858349`,"q"->0.`,"r"->0.05677929391379684`,"s"->0.05657353259692441`,"t"->0.026803118908382065`,"u"->0.022330517652155074`,"v"->0.0001299545159194282`,"w"->0.06295213341996966`,"x"->0.00004331817197314273`,"y"->0.0347195148364739`,"z"->0.052544942603422136`},"Dutch"->{"a"->0.07474265403316793`,"b"->0.015815170182812987`,"c"->0.012400531166069272`,"d"->0.059236997913276156`,"e"->0.18880357838194037`,"f"->0.008037381311341196`,"g"->0.03397665664906098`,"h"->0.023762692572660924`,"i"->0.0648881256427409`,"j"->0.014577113931128129`,"k"->0.02244476172409318`,"l"->0.03562407020977066`,"m"->0.022095310362730516`,"n"->0.1001627444911489`,"o"->0.06053496011262318`,"p"->0.015675389638267923`,"q"->0.00008985892149325558`,"r"->0.06400950507702906`,"s"->0.03724153079664926`,"t"->0.06779356410435616`,"u"->0.019868805974619846`,"v"->0.02845532513953094`,"w"->0.015176173407749833`,"x"->0.0003594356859730223`,"y"->0.0003494513613626607`,"z"->0.013878211208402807`},"Danish"->{"a"->0.062114682776964476`,"b"->0.020618981834677003`,"c"->0.005824862368296253`,"d"->0.060392997793768936`,"e"->0.15931256314563186`,"f"->0.024804635147116436`,"g"->0.04203179446998907`,"h"->0.01671168477700571`,"i"->0.06185694550403101`,"j"->0.007525928369657106`,"k"->0.035000721664364215`,"l"->0.053908328006763026`,"m"->0.03337182209942473`,"n"->0.07464071424153075`,"o"->0.04779479989278129`,"p"->0.01810346605084641`,"q"->0.00007216643642136952`,"r"->0.09233180065568361`,"s"->0.059846594775149996`,"t"->0.0707437266747768`,"u"->0.020402482525412897`,"v"->0.024041732819233382`,"w"->0.0007113548732963566`,"x"->0.00028866574568547806`,"y"->0.0071960246603022734`,"z"->0.0003505226911895091`},"Icelandic"->{"a"->0.11666955167041718`,"b"->0.012036235647106342`,"c"->0.`,"d"->0.018175523628180718`,"e"->0.07406381628296117`,"f"->0.03477006520108476`,"g"->0.04894120362356471`,"h"->0.02159136806877849`,"i"->0.0874502336853038`,"j"->0.01320177716231031`,"k"->0.038243609716692634`,"l"->0.05229934798915239`,"m"->0.046633200623160814`,"n"->0.0889850556805724`,"o"->0.024995672494374243`,"p"->0.00910507183659339`,"q"->0.`,"r"->0.09902486873232935`,"s"->0.0649702844613698`,"t"->0.0571576943050026`,"u"->0.05264554843921298`,"v"->0.028123016559921526`,"w"->0.`,"x"->0.0005308406900928972`,"y"->0.010386013501817554`,"z"->0.`},"Finnish"->{"a"->0.12728693477807876`,"b"->0.0029276932694311314`,"c"->0.0029276932694311314`,"d"->0.010866847259845798`,"e"->0.08301729526984787`,"f"->0.0020212544280058344`,"g"->0.0040841842050427166`,"h"->0.01928526776411752`,"i"->0.11270056261721191`,"j"->0.02127526568035007`,"k"->0.05181287768285059`,"l"->0.06002292144196707`,"m"->0.033361116899354025`,"n"->0.09195665763700771`,"o"->0.05849135236507605`,"p"->0.019191498228797666`,"q"->0.00013544488435090642`,"r"->0.029922900604292556`,"s"->0.08191289852052511`,"t"->0.09116482600541778`,"u"->0.05217753698687226`,"v"->0.023442383829964573`,"w"->0.000979370702229631`,"x"->0.000322983954990623`,"y"->0.018180871014794747`,"z"->0.0005313607001458636`},"Czech"->{"a"->0.1051297736607533`,"b"->0.010262044169236338`,"c"->0.009238336600042446`,"d"->0.04338272930425338`,"e"->0.09440581266151485`,"f"->0.0010486760464913049`,"g"->0.0011485499556809528`,"h"->0.01692862760764535`,"i"->0.0758167813135916`,"j"->0.017889913983595712`,"k"->0.036129386649355194`,"l"->0.047465075342380245`,"m"->0.0305364477347349`,"n"->0.08074805557983046`,"o"->0.08358197775308673`,"p"->0.02379495886443365`,"q"->0.000012484238648706009`,"r"->0.059911861275140144`,"s"->0.06506785183705571`,"t"->0.07149723474113932`,"u"->0.026965955481204982`,"v"->0.06671577133868492`,"w"->0.00019974781837929614`,"x"->0.0003370744435150622`,"y"->0.013021060910600367`,"z"->0.01876381068900513`},"English"->{"a"->0.08167`,"b"->0.014920000000000001`,"c"->0.02782`,"d"->0.042530000000000005`,"e"->0.12702`,"f"->0.02228`,"g"->0.02015`,"h"->0.06094`,"i"->0.06966`,"j"->0.0015300000000000001`,"k"->0.00772`,"l"->0.04025`,"m"->0.02406`,"n"->0.06749`,"o"->0.07507`,"p"->0.01929`,"q"->0.00095`,"r"->0.05987`,"s"->0.06327`,"t"->0.09055999999999999`,"u"->0.02758`,"v"->0.00978`,"w"->0.023610000000000003`,"x"->0.0015`,"y"->0.01974`,"z"->0.00074`},"Random"->Table[letters[[i]]->1./26,{i,1,26}]\[RightAssociation];

S[l_]:=-l.Log[l/. 0.0->1.*^-20];

Manipulate[
Show[
BarChart[100*letters/.frequencydata[ll],ChartStyle->Red,ChartLabels->letters,Frame->True,FrameLabel->{"","%"},PlotRange->{0,20}],
Graphics[{Text[Style["S-S0: "<>ToString[Round[(S[letters/.frequencydata[ll]]-S[letters/.frequencydata["Random"]])*1000 ]/1000.
], Bold,Large],Offset[{-5,-5},{26,20}],{1,0}]} ]
],{{ll,"English","Language"},languages},SaveDefinitions->True]

ss=Show[
BarChart[100*letters/.frequencydata["English"],ChartStyle->Red,ChartLabels->letters,Frame->True,FrameLabel->{"","%"},PlotRange->{0,20}],
Graphics[{Text[Style["Character frequencies in English. S-S0: "<>ToString[Round[(S[letters/.frequencydata["English"]]-S[letters/.frequencydata["Random"]])*1000 ]/1000.
], Bold],Offset[{-5,-5},{26,20}],{1,0}]} ]
,AspectRatio->0.33,ImageSize->4.5*72]

Export["/tmp/english-shannon.pdf",ss,"PDF"]