NaNoGenMo / 2021

National Novel Generation Month, 2021 edition.
44 stars 8 forks source link

Toby Island #3

Open zachwhalen opened 3 years ago

zachwhalen commented 3 years ago

I definitely intend to participate! I have a couple of ideas. Not sure which one will work.

zachwhalen commented 2 years ago

Well, I had two ideas: one complicated that I abandoned because I don't think it would have worked, and another, dumb idea that I figured I could put together at the last minute if necessary. So that's what I've done.

It's not great, but it's done. I call it Toby Island.

Here's the repository, which includes code and a sample novel.

The premise is this: Chris Harris has published a delightful volume of poetry called I'm Just No Good At Rhyming And Other Nonsense For Mischievous Kids And Immature Grownups. It's got a lot of silly poems that are fun to read out loud, including one called "The Island Where Everyone's Toby".

Here's a sample: island-where-toby

The Island Where Everyone's Toby

I've been to Tahiti, I've been to Nairobi, I've been to the Arctic, I've been to the Gobi, The oddest place, though, that I ever did know be The Island Where Everyone's Toby.

The first man I met there -- a farmer named Toby -- Said, "Please meet my wife, who is also named Toby." I then met their children, named Toby and Toby And Toby and Toby and Toby.

I hadn't had dinner, so Toby sent Toby To Toby's Food Market, where Toby sold Toby Some prime Toby beef and some pasta al Toby And then, for dessert, some Peach Toby.

... and it goes on like this.

My premise, simply, is this: use named-entity recognition to rename all the characters in Treasure Island to Toby.

Here's a sample or two:

“Toby,” said Mr. Toby, “you have a good horse; take up this lad behind you.” As soon as I was mounted, holding on to Toby’s belt, the supervisor gave the word, and the party struck out at a bouncing trot on the road to Dr. Toby’s house

and

“Come, Toby, you know me; you know an old shipmate, Toby, surely,” said the stranger. The captain made a sort of gasp. ? “Toby Toby!” said he. “And who else?” returned the other, getting more at his ease. “Toby Toby as ever was, come for to see his old shipmate Toby, at the Admiral Toby inn. Ah, Toby, Toby, we have seen a sight of times,

It's not perfect. I had to hard code some replacements that spaCy missed, and I could improve the formatting with more time. But I think it's good enough.

hugovk commented 2 years ago

Good work, Toby!

I think you forgot to push the novel to the repo?

zachwhalen commented 2 years ago

@hugovk You're right I did! It's in there now!