Evaluating Problem in Generating Random Text
- To: mathgroup at smc.vnet.net
- Subject: [mg107037] Evaluating Problem in Generating Random Text
- From: Osman Tuna <osmantunagokgoz at yahoo.com>
- Date: Mon, 1 Feb 2010 06:12:02 -0500 (EST)
I try to generate random text and compare this with real text, but my computer can't evaluate my code, can you inform me whether your computer evaluates it or not? And do you have any suggestions which can help me with generating this code in my computer? Best... Osman Tuna ListLogLogPlot[{Reverse[ Sort[Last /@ Tally[StringCases[ StringJoin[ RandomChoice[{N[ Length[StringCases[ ExampleData[{"Text", "OriginOfSpecies"}, "String"], {" "}]]/ Length[StringCases[ ExampleData[{"Text", "OriginOfSpecies"}, "String"], _?LetterQ]], 5], 1} -> {" ", #}] & /@ RandomChoice[CharacterRange["a", "z"], Length[StringCases[ ExampleData[{"Text", "OriginOfSpecies"}, "String"], _? LetterQ]]]], CharacterRange["a", "z"] ..]]]], Reverse[Sort[ Last /@ Tally[ ToLowerCase[ StringCases[ExampleData[{"Text", "OriginOfSpecies"}, "String"], WordCharacter ..]]]]]}, Joined -> True, PlotRange -> All, Frame -> True]