When AI wrote Harry Potter

By Dhnesh on Jan. 28, 2021, 2:58 p.m.

 Neither I am J.K Rowling, nor i consider myself a good writer. So I let My Markov Model write it after training on Previous Harry Potter Books. The results are not great, but some sentences put me in awww and made me laugh. The code is available at   https://github.com/dhnesh12/markovs-on-Harry-Potter

Below is the Work of Artificial Intelligence:


He wasn't going to let him in, while the security trolls at a run, wrenched open the door at the top of Harry's head, lifting him off his stool and under the table. His face was transfigured: There was a smattering of applause and a few seconds later footsteps told him that the Weasleys would be arriving at five o'clock the very next day. She was rubbing at a crumbling, mossy stone, gazing down at Malfoy as though she had a word of thanks, whilst Bellatrix said nothing but looked disgruntled. It was, without a doubt, the strangest sensation of his life, standing behind the tree, so that Grawp's fist scraped the trunk but closed on thin air. His head was half off and his eyes flitted over Professor McGonagall into the air and whoop. But their antics seemed to be easing his own sense of dreadful guilt, and he wanted to go home - even if he managed to turn into a dementor when he sees you, so we'll be able to find a disheveled Ron keeping him company. Then, slowly, as though he desired nothing better than to think the Firebolt deserved a sort of blind horror in his face. Harry held out his hand and a gleaming smile back on his own four-poster and for a moment as Harry looked at Ron for a moment before managing to extract his wand from the bed. Mrs. Weasley fell back against a kitchen cupboard. He didn't know how to thank you.The Dumbledore behind the headmaster’s chair, then turned his back on the grass sunbathing, talking, reading the Sunday Prophet and eating sweets, looked up at the brilliant blue sky. 


He pulled out Dumbledore’s Snitch and shook it, hoping for he did not once see Malfoy anywhere suspicious. The Heads of House moved among the students, the ghosts shone misty silver.. Sir Nicholas de Mimsy-Porpington, have never been introduced, but I am sure we will be able to use this bathroom. Perhaps his face was as pale as his. Terror everywhere . . . We don't know what they'll say if I'm not. He showed Harry two identical balls, jet black and slightly smaller than Sirius’s, though it had been in the compartment instead. His turban, he told them, had been given for the holidays. For a second they stood quite still, holding on to the heavens. To his horror, he saw that he was not a single mention of Harry's letter, Hermione and Ron both looked over. Half buried in rubble, Harry tried to reassure her in a most peculiar sensation somewhere around his midriff. Snape turned it over, the rubies blazing in the terrible emptiness, filling him with the Dark Mark was branded into his skin.


They backed toward the door, nodding and beaming at anyone who looked at them, and Harry saw that what had hold of him, and Gryffindor was only a few seconds later, they were standing up to look Harry full in the face and staring down at his hands. He felt as though he and Ron led the way inside, keeping a firm hold on Dobby's wrist to stop him doing anything out of the party, accompanied by a single oil lamp dangling from the ceiling.  For ten minutes or so, Harry realized that the gaudy glare was sunlight streaming through a canopy of leaves overhead. But Riddle's hunger was now apparent; his expression was kindly rather than accusatory, Harry could not help watching the silhouettes of the horses moving beyond the window. She smelled bad, or perhaps it was her shrill voice that made the hairs stand up on the ground, breathing in the smell of clean air and grass for a moment against the cool glass of the station the next day, feeling almost as anxious as he had had no word to the contrary, much too surprised that a Muggle-born should make a good Auror, but somehow the idea had taken hold of him, and I daresay he'd love to get it out of sight. Xenophilius did not take off the Cloak,” said Harry, and Dumbledore beamed.