Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dariusk/spewer
A reverse part-of-speech tagger. Give it a list of tags and it spews out matching language.
https://github.com/dariusk/spewer
Last synced: about 1 month ago
JSON representation
A reverse part-of-speech tagger. Give it a list of tags and it spews out matching language.
- Host: GitHub
- URL: https://github.com/dariusk/spewer
- Owner: dariusk
- License: mit
- Created: 2015-03-11T20:39:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-03-11T21:00:55.000Z (over 9 years ago)
- Last Synced: 2024-10-06T09:48:40.879Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 296 KB
- Stars: 23
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# spewer [![Build Status](https://secure.travis-ci.org/dariusk/spewer.png?branch=master)](http://travis-ci.org/dariusk/spewer)
A reverse part-of-speech tagger. Give it a list of tags and it spews out matching language.
## Getting Started
Install the module with: `npm install spewer````javascript
var spewer = require('spewer');
var sentence = spewer.spew('JJ JJ NNS VBP RB');
console.log(sentence); // "colorless green ideas sleep furiously"
console.log(sentence); // "sullen misty shoes lean reputedly"
```## Documentation
Call `spewer.spew(tags)`, where `tags` is a space-delimited string of part of speech tags, as defined below. This will return a string of matching words.CC Coord Conjuncn and,but,or
IN Preposition of,in,by
JJ Adjective big
JJR Adj., comparative bigger
JJS Adj., superlative biggest
MD Modal can,should
NN Noun, sing. or mass dog
NNP Proper noun, sing. Edinburgh
NNPS Proper noun, plural Smiths
NNS Noun, plural dogs
PDT Predeterminer all, both
PRP Personal pronoun I,you,she
RB Adverb quickly
RBR Adverb, comparative faster
RBS Adverb, superlative fastest
RP Particle up,off
VB verb, base form eat
VBD verb, past tense ate
VBG verb, gerund eating
VBN verb, past part eaten
VBP Verb, present eat
VBZ Verb, present eats
WDT Wh-determiner which,that
WP Wh pronoun who,what
WRB Wh-adverb how,where## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).## License
Copyright (c) 2015 Darius Kazemi
Licensed under the MIT license.