top of page

Trump's speech generation - An Improvement


This is an improvement on the previous blog post about Trumps text generation.As we have seen that after certain epoch, some phrases used to repeat over and over without any further improvement. To resolve the problem of phrase repetition I have taken help of multinomial distribution function.The mechanism of action how multinomial distribution works is already explained in my previous blog post. This blog post is just to show improvement in trumps speech generator after implementing an extra function.

I have generated text for 35 training iterations and few things are very very clear:

1) Initially model tend to make many spelling mistakes.

2) As training progresses, text becomes more and more coherent and spelling mistake decreased

 

('EPOCH : ', 0, ' | TEXT PARTITION : ', 0) follow up with: y were forced to take them for licensing. nobody wanted the debates. they drew nothing, but now they ale jopt silough that the count.�ank ih, 2o ,000 court, it'in obadiwes bees it'uds. he soly and that it the 1saplor siing right now, wh yourd age. and shethon's wastrmed reasts of whore. se theyr me we wont to dingerses kichlebas, miche? sy ampless, they 10ll it i had gote know what i past that his hored sursing.

abliag the said. "we said, we han , i kante ta know stabte on because that we, 4o want, they din’t denie wash thes’s wansed lamw wered because they have is. a don afous ithis lis

('EPOCH : ', 1, ' | TEXT PARTITION : ', 0) follow up with: nd triple up the sanctions. i guarantee you within 48 hours they’re calling, begging us to come back. we have held if i’ve came tumiont ithl. and i doi’ll were who kady n thery to do domally. those very miking to istares %ong with the envoarsy ceniconmy indtany, whan you’ll thinkini up in many. it’s stading our it horest forea. wion’s interaticnacricats, of theme. we can't like thingas in the cruss. and i hage a lit on whe is peoponghisar people like your 40% bois. it’s lories to tell to i was scurine suming from i’m verias up tellsides okeroush anver andorederes. so imrisag

('EPOCH : ', 2, ' | TEXT PARTITION : ', 0) follow up with: over are getting social security...but i heard it. i read it. a tremendous – like 6 million people on the recond we have the way, thwif hump. you can’t avoutalling with you. onay. back out vilyisule. they don’t go and un all strong again. foul, very hack. i’m going to be going to saod, right? bething i been like i mean entory the ware if i came ibloen with thim. you know thennr've a veny ligelly.. i don’t have ourtt that has the mistrough the exicions are said, "what it'r. we’re very are moing to kuy? i want dolders – they make it well with thes. we had no idee first at obhmave

('EPOCH : ', 3, ' | TEXT PARTITION : ', 0) follow up with: me. can you believe it? more than 3,000. it’s — it’s unbelievable what’s happening. it’s beat throow. i not ever thear one came out, so home.

i sourt that amperestive lared and they’re remimes. i have to do it. it’s unneversea. they’re toldantible. ?oh, you fold i's vore exclees a rigget yout plabe. i mean, why it tough possing jobs that are corrobce to in the unter street, havs – we're going to happen. going ronew.

we have to be military. you can stere hik or with mive promes in it. these gois not came out that are chunired. to all of it.

so, i do the question fins he ser

('EPOCH : ', 4, ' | TEXT PARTITION : ', 0) follow up with: of dollars and they are not even in the race. that’s what we need for our country. what? ok. i’ve great agriemest military is." we me the depablantihed that loake so goor for them to coma tears. we don’t reaply. and you have terriris questions in the 'rem’s a than fored courtute is ad? i don’t make a would be anyingerative sand or number one and deal thousand ant hard powor getermand, jacked hem, i’m meaning wesheal efgicited – the mildions that you can up, in america, thay doen and it’s they guy "the talken are – thinkly great ywar. she las ones. don’t worx first. the pilk

('EPOCH : ', 5, ' | TEXT PARTITION : ', 0) follow up with: ve athletes – very few – but there are some people that have a certain ability. a lot of people say mhy pows his fot the — and we owe $1 billion ard for we didn’t came in religeting thes’s compoule, of theig bad curlens. whuch has need men sone that lass owe repeopee. se of – here, by hhit’s orty down.. a disaster – a number crowding time siby that money?. us there by a hard neys one forg tem trhing amazing, and it – we are right good thing. . in clibang mepiciale to talk about the sipporese has been a so my office. we’re going to make you wondirful put out.

…the dearen

('EPOCH : ', 6, ' | TEXT PARTITION : ', 0) follow up with: nt our prisoners back. oh, so complicated. they said they didn’t want to complicate – so now, we have a 4�vey sees – growped peally thank us tice tome not at the cost in redicade. and i’m not going to do it that the bigges, and we’re not looking at all this my. you know, they want to want to do she’s about it. the kenor demanis is four all of that people go to believe, perelucturity. a wohlvs acrumply des a debecusen about as a ccaminate of tames and confriend is something so important. the good will did ot to profect our country betaill. many of the reason they said they did a ve

('EPOCH : ', 7, ' | TEXT PARTITION : ', 0) follow up with: anywhere in the world and it was like target practice. "come over here. boom! come over here. boom!" it’s just notew. toray – it could be time to us. re. you soind how to stack inverous everything? it days. i not 2%, we have - china in canficat, who but our taiking of word. ? i think af i just want to change – no weon, right new york in the 55 years ald trade people of muss adsiqued? one guy to the country af here – 10ppecenc. the call, the littoe mys — thus it’s deal. like in the history of all they awerd the great checks, a big different itterssor because puthing of the cares to

('EPOCH : ', 8, ' | TEXT PARTITION : ', 0) follow up with: great with the border security. we’re going to build a wall. mexico’s going to pay for the wall. we’re bolining all over everybody. this is hard as a total – i want to differe country and i’nd take for a president why agent, you took because because and i scotts of unless it wanted to peiple kecartly. winning that can's go out on the utited. the will asknd weluning were impartmant and a great people. to all those people. and thank you all wven i sup over all having to take afferthe. but hsle as a young large, but noginey peesing and respect. so gheals. they get cost front of mine, a

('EPOCH : ', 9, ' | TEXT PARTITION : ', 0) follow up with: me and you look at the drugs that are pouring across the border, it’s – the drugs are pouring like, i’m going to stapp to go about now, and i’m the only one in because i’ll aven ebso you have they have zero downed with the people of the campaign but nobody’s leave on the yact on foles and i was a6 a mial for one were. and ifthey are just standing sically was and they midd. … i look good. we will be raside. doow one tellvisions and blyw’s what you have winning more actually said, "oh, i mean, many — "i like how – cmund of them and i’m a choice we have her dotnor because 20

('EPOCH : ', 16, ' | TEXT PARTITION : ', 0) follow up with: n’t move. they closed down all the streets. they closed down the city." and he could do it from like stopped different things it’s going and we’re winning since duses, or of. and that’s something so yourg. i’m unbelievable. you know it could be the stupid poll. we’re not going to make president, this guy and they said, "come unter, much – they were fairing up a different mine for that like moing a fron again. the best is that we had so much better new dicial whatever where they have how sit ed tens of the mistakes, china, millions of lirecall, and right now wonderful senithers, s

('EPOCH : ', 17, ' | TEXT PARTITION : ', 0) follow up with: �ll get 2 million – a million to 2 million people at the debates. you know, they’ve been doing the polls to whith how stuff take a look. we are a press you work for more young tage, and they have, there whole with – jors and they said, i don’t want thom. we have the mipredebt at the people but it was a purninghan. i in donald trump than he arcond of nice the emembar and qurented my fations and we problem in the world. wholare this but form they want taken if all these money tern tho way in the world. after a job – right?

so when our military is not going to fail to now with the year

('EPOCH : ', 18, ' | TEXT PARTITION : ', 0) follow up with: y awards. there were so many cameras. i have never seen anything like it. the entire atrium of trump admitiat – you know. it are making a mamait anything. and the people that oreat their laws but they like the story. we’re not getting in great bare--olrorist and acluslo starie than any good me on the veterans that go or of the internut, so many others. we wrun niced as no candy.

we give the immigration state refusidg from anly to great one that can ware better because he hat the scrions first and weakture our rabad. this is now a montan5 more. nage places, let in the largemons hiscampea

('EPOCH : ', 19, ' | TEXT PARTITION : ', 0) follow up with: ho i prefer running against?

i think what she did was very bad and i think a lot of people have done so many because because we have no choice.

we have a mame think. and oghors. we have security of that about selling matharily in immigration. and away from the actually that does you know that. and you have no money, general incompetent toous. so many, i said nothing. running again. it’s incredible." i think 100 people and the tlats’s group called is foug mpreing. saking lass lease. great people. thank you but we’re going to have some people in this country. i love "we have ton back we

('EPOCH : ', 20, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 's so high. i mean, you\xe2\x80\x99ve got to see that truck right there? you\xe2\x80\x99ve got to get hit by that truck') follow up with: s so high. i mean, you’ve got to see that truck right there? you’ve got to get hit by that truck in 10 phonces. it was racipais, o(ly. and the nousher grospect of latee. seriea. and government has tremendous emandrey. republican on my fations want to varit in every straiglement. but somebody says thath. people turn and old pasines you’re not going to build. and you know the wrock awerdey this wait wishing look at the top fore sy he, they have at very second as they, they’re very current. it’s very important. and they said, "hhith mayin we know. but we can straighten education. it’s

('EPOCH : ', 21, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'ploy america\xe2\x80\x99s economic resources. financial leverage and sanctions can be very, very persuasive, ') follow up with: ploy america’s economic resources. financial leverage and sanctions can be very, very persuasive, wath is going to happen and go forcestand, i’ve been a president. now, it’s just an world in. and you know, i go hillar preciment if you wholk him we in a coutter. the toughest all, they’d do wall. and they shouldn’t even telline our gentrement. there, and normble get us on cameras the lest the votes but it tood hit strength another who saw it. it was very one but to the vety has no longer here. how come in ryspantis in new haspshies, look at ewenge of 12, 1,000 people — thene comes so

('EPOCH : ', 22, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', '\xe2\x80\x99s rich people. it\xe2\x80\x99s everybody. it\xe2\x80\x99s evangelicals.\none of the things that made me so happy \xe2\x80\x93') follow up with: ’s rich people. it’s everybody. it’s evangelicals. one of the things that made me so happy – the first time i great a keep with second amendment. that about beilgnable. i give you, i think think of the border – like they’ve got thees and i’m saying, "i’m not taken away for them.

would you need that. china — i think they said, has should be wasten. the hundred you’se to come octon, they say "we’re going to have fundry arain? they’re killing us on attendey. and you know what. they’re treating about at the destroyel. i have time that’s going to happen. okay? this is

('EPOCH : ', 23, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'n any human being i\xe2\x80\x99ve ever seen." and then he double-downed\xe2\x80\xa6\nyou know what? i took a lot of hea') follow up with: n any human being i’ve ever seen." and then he double-downed… you know what? i took a lot of heact. these duma statem nato in $1t billion. unotiech dillas statte on the apprentice, as'a songet. this being sling ub on bica. and china are increased all when it got which is the wordt a really good time., you can’t be, go bow it the first one. the biggest in the world and china, folks. they are running. these are the best competition with these morning but we can’t hut aut our bridges because people cime in out of the golfe party of just different people. and you know it, i midht not thous

('EPOCH : ', 24, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'unbelievable campaign contributions and they\xe2\x80\x99re special interests and they do what those people wa') follow up with: unbelievable campaign contributions and they’re special interests and they do what those people want iraq. i mean, we didn’t know, xicted hat just an amazing ta bing great get up – 11 1t in calier used to be really discusest will be watching. now, we’re going to lose with the usians con our surp. ...i believe in a mistine because i love deal. we’re going to do it because we’re not going to huts a very smort roces. you know, i’ve never soon whe senators a merion and i say throughout i was even sabirat oo something we’re going to win for trade. we’re going to do bobld train, ve

('EPOCH : ', 25, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'th that doesn\xe2\x80\x99t make a better deal. everybody.\nwe lose money with everything.\ni\xe2\x80\x99m also going to ') follow up with: th that doesn’t make a better deal. everybody. we lose money with everything. i’m also going to build a wall. i’m putting up my owf china gentunain, they fight. i will him further pillers because they defars compotitioned on with domalong with you well, the 2day together the president is totally again to approve the governor who fill that i think is standing in icmeal and core called het you’re going to be very happy. you’re going to make christ establishment. i’m going to bring group that massicile pilled – but if we call it when they recest the negative property can be of gene

('EPOCH : ', 26, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', ' my wife just called and ivanka, as you know, is going to be having a baby very soon and she\xe2\x80\x99s a s') follow up with: my wife just called and ivanka, as you know, is going to be having a baby very soon and she’s a special place. that’s — we allowed that har new hamps ore with process, you will be tremendously hard on believs. he was scont. it’s keep workimgle. it’s well. and they get for me to us and so with second – here is the last with in iraq. you know about two xeers, bood you all love traisor and millions. but people want to bring our money so wall signing any responsiline. deductibles. wouldn’t be big problem by ships going to klocked for another from gainaly out strangea where they do

('EPOCH : ', 27, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', '. he\xe2\x80\x99s always sitting with john mccain, who\xe2\x80\x99s fine. i\xe2\x80\x99m not knocking it. but you got to know w') follow up with: . he’s always sitting with john mccain, who’s fine. i’m not knocking it. but you got to know whether they want — they do you admit the top nmart boch, okay?

...they frimg the friends of sinstims – that was it. but he doesn’t mention and this came out – i won in i aw he trafeld everybody was getting the china receles over china cilied in our country. the horror every person cost me, this canned that loke, who feels should they get pives to very quickly. we don’t want these young china. you got to make america great again. to you. obamacare, frimndsy nobody knew the middle east

('EPOCH : ', 28, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'true conservative because he taxes." it\xe2\x80\x99s got to be fair stuff, folks. it\xe2\x80\x99s got to be fair. i\xe2\x80\x99') follow up with: true conservative because he taxes." it’s got to be fair stuff, folks. it’s got to be fair. i’m with it. it’s so taking big in new hampshire that i conten greed and she is going to do a great job.

if i don’t build up. i would have best. no ancher hin bush, 2,000 people. how do you believe it. okay? these put it a little bit about it in commbec. i say. jeb isse period on al intimed.

take a look. he doesn’t. he staking for gind a again from cars in my friend to them. i mean, one of the other reasons they didn’t amenican rene3 powsrit and lawfen lartely, recidions think of inartel

('EPOCH : ', 29, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'atch...\ni will tell you this: you can\xe2\x80\x99t educate your children through bureaucrats in washington. a') follow up with: atch... i will tell you this: you can’t educate your children through bureaucrats in washington. and these are she way in incompetent. do me, very $u0 billion a long oner question. on a feh way so because a lot of the people are horrible...in tax stute, we don’t know about this, and right. i don’t know that they said they’re going to istated the tel vorts to leave because the actually all the tales anowh costs good, expected the debots and get this great people. "i know what? now, you have talentht pants very amportant, by cariou maga in faverible that shouldn’t be that plabs out a d

('EPOCH : ', 30, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', ' and that\xe2\x80\x99s not the way it\xe2\x80\x99s going to work anymore.\nso we write about it in the book. we tell lo') follow up with: and that’s not the way it’s going to work anymore. so we write about it in the book. we tell loss. the press was a turgher. we’re taking care of a poblictar. we don’t want them because they aserve is anarys they do. and then obamacare is almost 50 people were defended to respect us income businessgaring all from in florida a. comman from "sure, a basing, but if i’m going to pik early money.

now i’m winning. i’m going to be smart in ochata or trade, you know. i want some of oll goy the old. i said 20%.’s saudi arabia. he’s alposed how virtually in year intime business to hea

('EPOCH : ', 31, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', "o be replaced. and you're going to have much better health care at a much smaller cost because obama") follow up with: o be replaced. and you're going to have much better health care at a much smaller cost because obama you don’t want them. but lather you say, you know, the year at the polling would do anything about against to. then and semon bush basked a long hist, thin south carolina. number one, a nise gont strong probesting the husal. i don’t care about i ambort at the state. i’m actually great. and but i’ll tell you that. – this is, you cholk a cinimend – a great moment. on many hasped to help right but i don't even get thousands and thousands of people, i think here’s with where it was,

('EPOCH : ', 32, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 's i understand it because i just heard about it. but i\xe2\x80\x99m very happy for tom.\nas far as the commiss') follow up with: s i understand it because i just heard about it. but i’m very happy for tom. as far as the commissioning is dollars hundet stegot, they look at how when we surt in saudi arabia. that's bare. we'se getting up 6n military. we need to think over the -now you’re going to build a ae pouiting goods. because they’re not even scort. we’re talking about he sare to making a president who’s coming probably there wey ... i’m trying to talk about it. i’m trying to call it out when i mean the single good houe. why didn’t to a politician liet? could he so trill our greatert of. the first big

('EPOCH : ', 33, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', 'nd the press and the media and everybody.\n\ni know it was a very tough night for marco rubio. he had ') follow up with: nd the press and the media and everybody.

i know it was a very tough night for marco rubio. he had unine sign averuable in 5 or briegs on the mindrowsh or sound lobbyist knick for a the state.

this will report that give us with the companies. i mean, i say it was the from our own military. but we are going to protect the country.

you know what she said, it cater in our politics. there’s tot lobbyists. i made a little better. probably shipp, but so the enemy, i’m putting up like a lot. for all those cases, and based on many things before it is there and 15%. where iren’s devaluation.

('EPOCH : ', 34, ' | TEXT PARTITION : ', 0, '| SEED TEXT : ', "e embodiment of corruption. she's a corrupt person. what she's done with her e-mails, what she's don") follow up with: e embodiment of corruption. she's a corrupt person. what she's done with her e-mails, what she's doners have to ed anyone signed to endorse the military fantastic. and all of a sudden then’t going to get out of ofric. they nulder and business messine bualding, now he could be who iorally will thy unfrestay whe he take come be on treetsion. but including i $1100 trillion and it’s below year of back and yet in the world. i will do anything because they have us become dominant. and in the big in all fairness recent, ne that have as everything. you know donews she’s a disaster. the front pa

If such large amount of text is given, such text generators would eventually attend a level of coherence as natural one. Such text generators can be used for data augmentation also where generated text will be having same.

If you like this tutorial please share with your colleague. Discuss doubts, ask for changes on GitHub. It's free, No charges for anything. Let me to get inspired from your responses and deliver even better.

Never Miss My Post!
bottom of page