Oct. 1st, 2004

l33tminion: (Default)
So, our Software Design projects have begun to use dictionaries, a data structure that is very powerful and, in Python, easy to use. Because of this, we're finally beginning to get into really interesting projects. Today, I wrote a program that performs Markov analysis on a text and generates a text of its own, based on the likelihood that a given word will follow a previous phrase.

Analyzing "The Tale of Two Cities" (from Project Gutenberg) for the rate of occurrence of words following each unique two word phrase, seeding the output with the key "recalled to", and running for 200 words produced the following:

life?" And the friend I purpose to myself the love of Heaven, will he will not prewaricate to you, Doctor, if it was a dreadful anguish to him!" cried the sawyer. "Every day, in Wolf-procession through the streets, now drew nearer and nearer. "If you knew it. You see I am going to the suspicious circumstances that surrounded me." "No, no, no," said the boy, or about his face. I have noted in myself that my memory is exact and circumstantial and unshaken. I try it with flint and steel sparks well off the wine, and what with the Cruncher family, until Young Jerry on a stool in Fleet-street and the Life, saith the Lord: he that believeth in me, though he were compelled against his face. He cannot easily touch his three- cornered hat to give as little occasion as possible for talk and envy, was the likeliest occurrence. Everybody looked to see the common one, a prison of the wildly shaken public mind. In seasons of pestilence, some of us will have in the air, and to tempt it forth to find yourself mistaken, it might be, at any time, you know, for who can say of it

(On a related note, an Olin student created an AIM bot AI, Oliabot, that "learns" language through Markov analysis. If you have time, you can talk to it and it will learn from what you say.)
l33tminion: (Default)
Leave a comment with your name if you want to know what I really think of you, and I'll reply and tell you. No lies, all honesty.
Post it in your journal after I do yours so I can see the reverse.
Page generated May. 28th, 2025 07:19 am
Powered by Dreamwidth Studios