Process this language

Billing itself as “a cool way to use natural language in JavaScript,” NLP Compromise is a simple interface for NLP that you can use in the browser or server side.

Where would you use NLP in JavaScript? Maybe you’re writing a bot in node and you want it to have a great grasp of the English language. Or correcting poorly inputted text. Or manipulating and normalizing prose. Once you start experimenting, you’ll find tons of uses.

NLP Compromise can pluralize nouns:

javascript nlp.noun("goose").pluralize(); // "geese"

Conjugate verbs and change tense:

```javascript nlp.verb(“run”).conjugate(); //{ // gerund: ‘running’, // past: ‘ran’, // infinitive: ‘run’, // present: ‘runs’, // actor: ‘runner’, // future: ‘will run’, // perfect: ‘have ran’, // pluperfect: ‘had ran’, // future_perfect: ‘will have ran’ //}

nlp.text(“Neal sits at home”).to_past()[0].text(); // Neal sat at home ```

Identify acronyms:

javascript nlp.term('CsU').is_acronym(); // false nlp.term('AOa').is_acronym(); // false nlp.term('FBI').is_acronym(); // true

Negate phrases:

javascript nlp.statement('Neal is going to win').negate().text(); // Neal isn't going to win

NLP Compromise also has plugin support and a bunch more API methods. Install it and get to hacking!!

Comments :)
2017 Neal Shyam