-
Notifications
You must be signed in to change notification settings - Fork 116
Week 2 Homework
koji edited this page Dec 19, 2017
·
26 revisions
- Create a text processing machine as a single page app and/or design an exercise around regular expressions. Some ideas are:
- Chop up a text into words using
split()
and rebuild the text as separate<span>
elements that you can interact with individually. Here is example code from this video. - Create a programmatic version of the algorithm you invented in class and/or for week 1 homework.
- Analyze the statistical properties of a text like in the Flesch Index example.
- Create a mad libs generator.
- Create a "word replacer" (all male pronouns with female, all fruits with vegetables, etc.)
- Taking inspiration from the Pirate Translator, re-imagine a text using
replace()
. - Investigate RitaJS to see what kinds of metadata you can glean from a string. Here is a quick and dirty example that shows you how to get parts of speech tags for words.
- Chop up a text into words using
- In preparation for next week, add a link to an API or some data source (even just data that appears in raw form on a web page) that interests you. I'll use this list to prepare examples for next week.
- add your question here
- add your API / data source here
- Yeseul -- NYPL Digital Collections API
- Michael -- OpenData NYC
- Michael -- Google Perspective API
- Koji -- password checker, repo regular expressions
- Yeseul -- color extractor, repo
- Nouf -- Create-A-Story, pick words wisely before you drag them to box
- Richard -- Regex Image, needs some fine and course tuning.
- Michael -- Console Fiction, added pattern matching to highlight and transform text to make clear which words are type-able commands. When commands are found, they are substituted with html tags and styling to make them bold and colorful.
- Swapna -- rain poem
- Melissa -- Text Analyzer
- Tong -- Today's nonsense
- Jen
- Laura
- Kenzo
- Nitish
- Paula
- Annie
- Utsav -- Word Mash
- Zach