Skip to content

Commit

Permalink
yolo
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Dec 19, 2015
1 parent 2222794 commit 818d9a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ nlp.text("Tony Danza did a kickflip").people();
// "Tony Danza"
```

it's also got a modest, though very ambitious [plugin ecosystem](https://github.com/spencermountain/nlp_compromise/blob/2.0/docs/plugins.md):
we've also got a modest, though very ambitious [plugin ecosystem](https://github.com/spencermountain/nlp_compromise/blob/2.0/docs/plugins.md):
```javascript
nlp_compromise.mixin(valley_girl);
t = nlp_compromise.text('it is a cool library.');
t.valley_girl();
t.text();
// "So basically, it is like, a cool library."
```

Expand All @@ -76,7 +75,7 @@ t.text();
[![Issue Stats](http://issuestats.com/github/spencermountain/nlp_compromise/badge/pr)](http://issuestats.com/github/spencermountain/nlp_compromise)
[![Issue Stats](http://issuestats.com/github/spencermountain/nlp_compromise/badge/issue)](http://issuestats.com/github/spencermountain/nlp_compromise)

*nlp_compromise* aims to be the best way to work with language in js. This is only done with many eyes and many hands.
*nlp_compromise aims to be the best way to work with language in js. This is only done with many hands. Contributions in all forms are appreciated and respected.*

[![slack](https://img.shields.io/badge/slack-superscriptjs-brightgreen.svg)](http://superscriptjs.slack.com/messages/nlp_compromise/)
* [Contributing](https://github.com/spencermountain/nlp_compromise/blob/2.0/docs/development.md)
Expand Down
10 changes: 4 additions & 6 deletions docs/plugins.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
### Extending nlp_compromise with Plugins/Mixins
### Plugins/Mixins
nlp_compromise attempts to become the best way to work with, interpret, and manipulate language in javascript. Any sort of procedure or analysis can be applied, then shared as a plugin. Multiple plugins can be applied, and co-ordinated.

```javascript
const nlp_compromise = require("nlp_compromise")
let my_mixin = {
Term: {
fun : function() {
return this.text + '!';
}
}
};
nlp.mixin(my_mixin);
let w = nlp.term('work');
nlp_compromise.mixin(my_mixin);
let w = nlp_compromise.term('work');
w.fun()
// "work!"
```
see a [basic plugin example](../plugins/demo)


##List of plugins:
**Please add yours here**
###Existing plugins:
* [English simplification](../plugins/simple_english) - swaps hard words for their simpler synonyms
* [valley_girl abstraction](../plugins/valley_girl) - adds 'like' etc.

0 comments on commit 818d9a7

Please sign in to comment.