Created
February 17, 2015 21:20
-
-
Save cardoni/c3a8cfbe4156a613512e to your computer and use it in GitHub Desktop.
wordpos module examples (https://github.com/moos/wordpos)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wordpos.getPOS( 'The angry bear chased the frightened little squirrel.', console.log ); | |
| // Output: | |
| { | |
| nouns: [ 'bear', 'squirrel', 'little', 'chased' ], | |
| verbs: [ 'bear' ], | |
| adjectives: [ 'little', 'angry', 'frightened' ], | |
| adverbs: [ 'little' ], | |
| rest: [ 'the' ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read about how I ultimately used regex to extract proper nouns here: http://cardoni.net/parsing-proper-nouns-with-regex/