ITP Blog

RWET - #2 :: Thank you letter generator

This week I create a thank you letter generator based on Strachey's love letter generator.

github: reading-and-writing-electronic-text/rwet-w1-poetry-generator.ipynb


Instead of the author showing passionate love to a human being, I think the form of computer writing lover letter to software will create some interesting results. So I first collected the apps or software I used on my laptop as the potential letter receivers. Basically, they are all about my thesis research and job hunting. The struggle & love is real.

Screen Shot 2018-02-09 at 9.11.52 AM.png

To make the result less weird, I made some changes:

1. I divided the adjs variable into two variables, the negative_adjs, and the positive_adjs. 

2. I divide the variable noun into variables, software service related noun and their product elements noun.

3. I add a offers variable, and one line more to the output, inquiring for a discount. 

offers = [
    'student offer',
    'free subscriptions',
    'free trial',
    'education discount',
    'premium trial',
    'open positions'

output += "\n\nDo you have " + random.choice(offers) + "?"


English is not my first language, choosing the vocabulary is really hard.

As I observe the structure of Strachey's generator, I noticed that for my particular purpose, I need to describe my feelings and related elements first, and chain them to the software products and their incredible service.

My own feeling is more like a brainstorm, I had all those complaints about a long time, it's so easy to write down tons of them.

For the product side, I actually went to Producthunt, and scraped nouns and adjs from the products' pitch descriptions.

Screen Shot 2018-02-09 at 9.28.25 AM.png

Here is a collection of result I got. The result really surprised me. Some of them are logically right, such as the product team I write to matched the product service I thank for itself, or the content really put the spotlight on the right standing out parts of their product. Sometimes, the offer inquiring line also makes great jokes towards the products. Sometimes, when the algorithm mixed the service and the product feature created dark humor and inside jokes, really made me lmao.