uncategorized

Can AI write my essay for me?

hey what’s up it’s tricky after I didn’t essay on the book a chronicle of a Death Foretold but I don’t want to do it of course I don’t want to take anything off the internet I wanted to be my own words and luckily in class we’ve been writing reflections on the chapters as we’ve been reading them so what I’m gonna do is take work that I’ve already written feed it into an AI and then have it produce an essay using my style of writing this is of course all the fabrication I haven’t had to write essays on books in years but I do still have those reflections that put in high school and I’m gonna see what kind of help that we get now in order to do this we’re gonna be using Markov chains now let’s look into exactly how those work so let’s look at how a Markov chain works in the context of speech let’s say here we have a comprehensive tree of all the sentences I have said in the last few minutes I like route I like cake I am happy and I am green we can summarize those sentences with this tree I sometimes leads to like and sometimes leads to am like lipstick route and cake and am leads to happy and group now it could be that I’ve said these sentences with different frequencies and you can see that I is more likely to lead to am than to likes what we can then do is summarizes in a table or a matrix where the word on the left represents the word that I just said and the word on the top represents the word I’m going to say next and then the intersection is the likelihood that I go from that first word to that second word it’s not particularly important but somewhat interesting to note that the diagonals are all zeros all that means is that the word is not repeated so I don’t say I followed by another eye or am followed by another end now the Markov chain has no idea about grammar it doesn’t know that there needs to be a subject followed by a verb and then sometimes with an object or indirect object it just knows what word is likely to follow given the word that was just said and because of this a lot of the sentences are going to sound kind of smooth but effectively be utter nonsense so now let’s take a look at the code we’ll start by importing numpy so that we can work with matrices later on and we only have two functions defined here the first one is strip string which just strips a string of a bunch of special characters and then we have this new page function which just prints of untrim so that the terminal output is clean then we’ll scan a text document and store any data in a text document into a variable called text in this case I have a text document which is just full of a bunch of Trump leads then we’re going to execute the strip string function cleaning up that text of all the special characters and then we’re going to separate out that one long string the entire text document into a list of words but in order for the Markov chain algorithm to work we want to have a bunch of unique words so here going to create a list of just the unique words in the text then we’re gonna create a dictionary assigning each of the unique words a number and then in this entire section we’re gonna create that likelihood matrix that we came up with earlier so now we can start crafting a response will do this by cycling through one word after the next until we reach a word that ends in a period a question mark or an exclamation point so the next word needs to be assigned at the start so what does our first word gonna be we’re just going to make it some random word in that unique list then while the response doesn’t end in a period exclamation point or question mark we’re gonna continue adding words to the end of the response and print it out so before jumping into the essay I wanted to test this out on a couple other corpuses of words for example here’s the output when I feed the Markov chain a bunch of speeches from former President Obama it was a strong international consensus to pick the alliance with hold firm to shove their economies so much I’ve stood for the world but we seek a crude stereotype but my country and Europe the center of meaning a bomber assembly line and to say in the enduring faith and that bear is the world we must put an enormous trauma t olympic torch i do it devastates Palestinian aspirations to the pain of us even with dignity to celebrate the events of facing down a successful war without a fight to extend support air ISM be found but it is possible into the things the things must put artisan are the two creatures the need not only upon you its former strength of poverty and other side or personal story of this country but it is a dumb war use the output when I give the Markov chain a bunch of speeches from President Bush you we have studied the spread of their own beat the world in their act is engaged in our lives and released for violating it is to confront the rise of people enter in our friends from a we’ve expedited the liberation they say I congratulate each case with partners Iraq is not one terrorist attacks Marshall said to share of comic problems created gloma deception the regime was right choices be expected at ever before for every illegal immigrants from the issue all nations is a threat they god Bless America from occurring here’s the output when I give the Markov chain input from Romeo and Juliet oh gentle as she bid in t-ball thou your chamber I’ll be 14 that shall be briefed in my heart and yet thy suit Capulet in the inundation of breath is not Romeo would smell as we mean to Romeo I’ll bury love growing for our low is enter nurse play hearts ease and abuse virtue itself turns vice there lies asleep their music with flappers the measures are the Capulets down to cheer here consent and be spread thy food as any law within this case to pleading and delight more I am too late and here’s an output when I give the Markov chain some input from the Old Testament this shall put them onto the land of Egypt the word of his Lord ears devoured him and I am thy brother Jacob hath appeared unto the blind have prevailed and he died by reason of the people behold who wouldn’t need to give thy daughter of Canaan pleased hammer and Isaac a dumb and finally here’s that AI generated si that I’ll be presenting to the class on chronicle of a Death Foretold this statement could used the novel the track to avoid all used as he included just that human nature of life everyone gossips about it was present in it was even being strongly favored by killing Santiago because at the time a major theme in his life is the presence of death and petrol are expected to fend honor is accused of machismo in the opportunity to gossip more significantly however much like they are not randomly chosen his religion our schema and that’s everything that’s the video on how Markov chains can reproduce speech kind of sort of thank you for watching hope you enjoyed the video

faq

发表评论

电子邮件地址不会被公开。 必填项已用*标注