Filter Verbs
This first exercise is fairly straight forward. We process the text of Charles Dickens' "Our Mutual Friend" using a Javascript library called Compromise. This creates a large object with a ton of data. To simplify my operations, filter by four parts of speech tags — adjectives, adverbs, nouns, and verbs — and convert each filter POS into an array to ease subsequent operations. Finally, I map over the arrays for each POS, and append the words for each POS to an id element.
On this page, we're filtering verbs.