Nytimes Oracle (a Markov text generator)

From this comment on HN, I came across a well-written article on generating sentences using a very simple Markov algorithm.  The basic idea is that a body of text is divided into word-pairs, where the frequency of a given pair determines the likelihood of the generator producing the second word in that pair when presented with the first (a sentence ends when the generator encounters a period). It’s easy to construct sentences by randomly selecting a starting word from the input text, and feeding it to the generator.

Naturally, the kind of sentences that are output very much depends on the content of the input. For this reason, I have mined the ineffable wisdom that constitutes today’s Nytimes oped page, and fed it to my generator (its code is available on github). Much of the output is nonsense, but it occasionally produces some clever phrases. Here is a sample:

  1. wise to calculate it is not only to be confused with the show, but as the party leaders to overlook his party machine, even as well.
  2. produce such creatures, but it is the teenaged Omar Khadr.
  3. seems that the first trial goes by consumer advocates to begin reducing emissions, the race.
  4. Spanish-American War, the biggest banks, its support for the welfare state — a former state insurance superintendent, Eric Dinallo; and exploited by Vancouver or the socialism-and-death-panels crowd are crankish or forty years and common decency behind.
  5. why tonight, when what a major candidates: Rick Lazio, a child.
  6. Richard Brodsky; a risk and his message to put off to the libertarians who have been in Greenwich.
  7. designate one in ever-more extreme directions, reveling in the Senate into talking.
  8. always true motives in the Senate primary, when the National Academy of the Bush era.
  9. been public safety and his Kagan for the 1990s with the show as a firefight in the last quip.
  10. that his cell with the race.
  11. be doing extremely well, and required large-scale taxpayer-financed bailouts to the name of the reports will be impossible to improve the fact that the racist or worse.
  12. for the fact that the show first interrogator, identified at even modest changes from the new health insurers, starting in power.
  13. and by corporate political persuasion shouldn’t be paid for the show has been his party now giving more choices on upper brackets back to both Rand Paul rode to improve quality improvement over a year, according to overlook his party than a chance to a child.
  14. billion tons of the right to counsel and illegal immigration), radically noninterventionist (he’s against regulation seems that the party’s eventual nominee.” Jonathan Chait of the United Nations officials have voted for example, at knowing when NPR and by what a career barometer.
  15. a Western nation should make money to a trial under duress, he was killed again parties generally control their own re-election. Sometimes bloggers get on the Senate into the disastrous oil spill in “a state convention this rage against a libertarian.
  16. confirmation battles: ensuring his father, a conservative Pennsylvania House race: While Obama did it would have to spend at being channeled and his abuse in the use the reporters’ credentials.
  17. by what did they can be no better off if Congress fails to the United Nations Intergovernmental Panel on the nation should not.
  18. can be no surprise to the results of the Senate would have to the whole story.
  19. Pa. are doomed; the audition in the Tea Party movement, writes Jennifer Rubin at knowing when to keep it as a broad definition and Pentagon barred four reporters from the same formula the problem is caused largely by what can be the current one: “There is not a career barometer.
  20. his views of the current rate of the West’s involvement in particular, ran a fierce struggle over a conservative (opposing both Rand Paul won; Arlen Specter in the Iraq war profiteering.” And they collect on the Supreme Court, which is the party leaders have been in the fact that the president’s criticism of their list.
  21. be to C.E.O.’s, investment bankers and the gold standard and his abuse in the show as they have inspired so stringently constitutionalist that he would have been in the show as the use the Geneva Conventions and his father, Ron, included — hipsters and the most interesting “paleo” presidential administration and Rachel Maddow asked about Rush Limbaugh; it’s all about Ron Paul’s win a staple gig for offshore drilling, and financial industry, in the Tea Party movement, whose inchoate antideficit enthusiasms Paul and skeptical of the show as the reporters’ credentials.
  22. can’t afford $200,000 or that his message to calculate it is not only indirectly did they would be no clearer symbol of the public.
  23. that the Tea Party movement,” writes Jennifer Rubin at the party in part of the early days we rely on the reform a part of the state regulators develop standards, is not expected for the whole story.
  24. political party’s voters a particular kind of the most interesting “paleo” writers of the Tea Party establishment; he took a mandate to raise tax rates on the name to press is being very, very end of the complexities of the show as a bit.
  25. objected to a political system can be allocated to the current rate of the paleocon journalist Sam Waterston’s character was offensive, tone deaf and his father, Ron, included — as a stretcher following his home country a broad definition and his son found himself very angry.
  26. Much reporting on the Tea Party establishment; he was the academy says that the whole story..
  27. everyone from the Republican primaries: Rand Paul have flaws, including “paleoconservatism,” “the old right” and the Bush era.
  28. than your average partisan, but they would be the most beautiful New York life, were as usual.
  29. Obama administration needs to a message that he was also Rubio, and his abuse in the show as the military-industrial complex.
  30. Paul is going on? One answer is now giving more than just another unjustified expansion of the fighting.
  31. judge on the House nomination of the party voters is to the Patriot Act but it is rightly urging a percentage of the commerce committee, says his message to find themselves as usual.
  32. flagged as a former president, not the tribunals instead of the Senate primary, when what they would have to stop.
  33. much on the growth of the show as a career barometer.
  34. brings us all, we rely on it.
  35. don’t cry for the modern conservative movement while benefiting from United Nations officials and required large-scale taxpayer-financed bailouts to the deadly hand grenade is not expected for the attention of the current administration.
  36. takers for the fact that are as a medical loss ratio.
  37. says that has been in the United States Senate primary, when to the fact that the Tea Party movement,” writes Jennifer Rubin thinks Carlson was a sympathy for the current one: There is going nowhere.
  38. sounds familiar, it under the most popular Democrats are doomed; the show as the election is rightly urging a child.
  39. though, as a libertarian, certainly, but only true or the House last year.
  40. the same chance to the results in a retrograde proposal introduced in the harder and his father, Ron, included — I mean, what they printed the convention delegates’ votes.
  41. Money; all that Ron Paul won; Arlen Specter and his Kagan for the show has been public safety usually meant that Rand Paul have to reach the infighting.
  42. first interrogator, identified at Afghanistan’s Bagram prison occurred while the sort of the gulf is not only on the United Nations officials and his effort to demonstrate that his son found himself publicly undone, in the Senate primary, when we’ll get on it.
  43. Specter under the appearance of the city rejoiced.
  44. Times this worldview goes forward this summer as a bad doctors as a Toronto-born Guantánamo Bay detainee named Omar Khadr.
  45. a few Democrats are doomed; the president’s criticism from Idaho milita members to a hoax.
  46. who is not fewer.
  47. of the history of the show as on the National Association of the appearance of the Pentagon officials and stranger bedfellows still.
  48. they did Specter in the nation should not.
  49. with the election to the administration wants to try to the Supreme Court, which will amount to emerge from the first trial lawyer who can’t afford $200,000 or administrative activities that doesn’t break up the United Nations officials have to accommodate the parties, which is rightly urging a broad range of the Obama administration got him in the party’s delegates should clearly overreaching.
  50. themselves as a famous 1936 speech, struggling with the Midwestern Republicans in the 1990s with the Military Commissions Act but in the ballot by insurers are omnipotent; the current one: “There is covered should not.
  51. and land-based ecosystems — a broad definition and strive for the cost of the race.
  52. For grass-roots rebel at Wednesday’s session in the drug war and investment bankers and human activities, and his party bosses: Give party now face isn’t surprising that the hearing, which deprived him of the growth of the Tea Party darling who should produce 266 billion tons of their hatred,” he was sedated for the cost of the reporters’ credentials.
  53. “Climate change is not a member of bitter, seething, hysterical fury” toward the Senate if it is being very, very end of the Republican pantheon, paleoconservatives identify with the Civil Rights Act.
  54. we do without facing are doomed; incumbents are as a part of the election results with the show, but it would be doing extremely well, but the Senate primary, when he was a career barometer.
  55. age of the election is being original.
  56. ideas that American Crossroads, a quality at least 80 to the Military Commissions Act but programs that Mr.
  57. care and his home country under deregulation, eventually bringing on the show as a mere bystander.
  58. Specter, however, I caught a student of the 1990s.
  59. The evidence that both abortion and his father, a juvenile, which is “un-American,” that paleoconservatives are doomed; the Pentagon barred four reporters from the name of the ballot through the 1964 Civil Rights Act.” But the nation should count, but more in favor of the party now rather than by what they would include programs as the cost of the hearing, which used threats of the voters.
  60. that the most popular Democrats in the president’s criticism from the tap-dancing route he was a broad range of their candidate who should count the United States Senate would be doing extremely well, but the right may be drawn.
  61. requires health insurers, starting in the state regulators develop regulations to the story of the first trial lawyer who can’t even think of the whole story.
  62. did it as a total of their members to the outside, this harmonious spectacle looms a chance to a retrograde proposal introduced in the weekend (and under deregulation, eventually called “the old theater pros, like it is not necessarily a new restrictions? Apparently it just hours of the final episode is the primary ballot through the teenaged Omar Khadr.
  63. these look like it would be paying little more money to play out on the Bush era.
  64. to keep Obama and poses significant risks for the election results of the right to the final episode is helping the Obama administration plans to be the harder and his moment of the most interesting “paleo” writers of the United Nations officials have to a bad lingering taste from the reform a question of the West’s involvement in the G.O.P.
  65. of the 2007 report from the Tea Party movement,” writes Jennifer Rubin — prompting me discover actors a staple gig for a line on the Obama and his inner F.D.R., and his inner F.D.R., and private institutions.
  66. can be doing extremely well, but it were, it under the show first person in a generation.
  67. Paul represents.
  68. convicted of the show first trial under the Midwestern Republicans who was a choice.
  69. afford $200,000 or activities that “sometimes accidents happen.” The ruling from Idaho milita members to admit, after his name a well-polished campaign in the same formula the biggest names in the universe.
  70. haw about Big Government; it’s all that the fighting.
  71. Virginia, and the military-industrial complex.
  72. of the first person got him in the G.O.P.
  73. because they would be paying little more money to his moment of the infighting.
  74. southeastern Louisiana: the show first trial lawyer who stood athwart the usual Republican Senate continues to combat global warming has sold out on the Bush era.
  75. opposition into talking.
  76. one, it as a plea deal.
  77. theater actors, “Law & Order.” For two decades the United Nations), and his message to avoid an already reclassifying many ways, a century and do that gets the right to calculate it would be the appearance of the problem is a generation.
  78. called the old enemies of the political dogfight about Rush Limbaugh; it’s all of the show as a mandate to implement reform.
  79. providers should not.
  80. the president’s criticism of the Tea Party establishment; he could have been in the modern conservative movement has sold out to find an already a student of the medical loss ratio.) The administration needs to both abortion and his party? Mr.
  81. sometimes clash with the Bush commissions, but it’s all about Big Money; all about Nancy Pelosi; it’s a hoax.
  82. week Rand Paul won; Arlen Specter in: “Then came Obama’s nomination of the Civil Rights Act.” But Paul rode to Clinton-era levels.
  83. own re-election. Sometimes bloggers get on the disastrous oil spill in the judge had won, insists Karl Rove, writing at knowing when what we would have chosen a political operations should make sure that the racist or that his father, a broad range of the Senate would be tried by winning 25 percent of the National Association of the military commission because they have to play Hamlet, to find an Army sergeant later convicted of the treatment of the running, and his moment I was a sitting U.S.
  84. Intergovernmental Panel on the party primary purpose is a year, according to the show first trial under terms designed to deploy large amounts of the candidate of the military’s notorious “frequent flier” program, which will have a new law leaves plenty of the whole story.
  85. who was too long as well.
  86. on the biggest banks, its embrace of the last year.
  87. special, and the Tea Party movement, whose goal of spending is a very poor start.
  88. snowfalls I’ve ever seen.
  89. too hard time finding takers for the current administration.
This entry was posted in Ruby and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>