npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

nlp-links

0.0.1 • Public • Published

Link Grammar plugin for nlp_compromise

How to install

npm install nlp-links

How to use

var nlp = require('nlp_compromise');
nlp.plugin(require('nlp-links'));
 
var sen = nlp.sentence('I fed the dog').withLinks();
sen.terms[1].text.should.equal('fed');
// Each term now has links to words they are grammatically connected to
sen.terms[1].links[1].target.word.should.equal('dog');
sen.terms[1].links[1].target.label.should.equal('Os');

Source library

https://www.npmjs.com/package/link-grammar

Keywords

none

install

npm i nlp-links

Downloadsweekly downloads

2

version

0.0.1

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability