I began this project a few months ago, but never really got to finishing it. Over the last few weeks of migrating my projects to AWS, I started taking a look at lambda and decided it'd be a great fit for this project.
What it essentially does is:
- Scrape Wikipedia for the specific words
- Run it through some code to generate some human-readable, but not necessarily grammatically correct sentences
The way you'd use it to specify 3 parts to the following URL:
- topic - This can be any single word
- num - This is the number of sentences you want to generate
- chain - This is a comma separated list of other words you'd like to add to the model(s)
So if I wanted to have Pizza be my topic, generate 5 sentences and also add the words Tupac, Oven and New York City to it, the URL would look like this:
https://api.pyumipsum.com/topics/pizza?num=5&chain=Tupac,Oven,New York City
And it would return a JSON object with some sentences like this:
- New York City exceeded the record production levels for all of which the dough and pizza ingredients, in which the Americans were defeated, the British made the city for both events several times, most notably for nearby Winged Foot Golf Club.
- After completing his second year at Paul Laurence Dunbar High School, Shakur transferred to the largest vessel in its time when gangsta rap was dominant in the early morning hours of June 28, 1969, at the ninth spot on the Billboard 200 and the banks and shipping tied to New York City is home to 20% of the largest municipal fire department in the way that they are usually long, and the Caribbean.
- Also called socca in the United States Census.
- Together with slaves freed by their masters after the Revolutionary War and escaped slaves who joined the British lines for freedom newly promised by the Port Authority of New York, by the RIAA.
- New York's heavy reliance on its vast public transit system, streets are a rapidly growing segment of the copyright office, behind Grandmaster Flash and Public Enemy.In 2016, Shakur was heavily sedated, placed on life-support machines, and ultimately was put under a countertop to save space.
Go ahead and try any type of combination of topics and words! You'll get some funny results :)
Subscribe to Wills Thoughts
Get the latest posts delivered right to your inbox