bosonnlp.js
v1.0.0
Published
[![NPM](https://nodei.co/npm/bosonnlp.js.png?stars&downloads)](https://nodei.co/npm/bosonnlp.js/)
Downloads
9
Readme
bosonnlp.js
Features
- Based on Nodejs stable api.
- Promises.
- Full action params control.
- Catch more (e.g timeout..).
Usage
const BosonNLP = require('bostonnlp.js');
const bosonNLP = new BosonNLP({ apiToken : 'YOU_KEY', timeout: 1000 * 10 });
bosonNLP.tag(['今天天气不错','明天天气也不错'], {space_mode: 1})
.then(console.log)
.catch(console.error);
Default timeout value is 10s. Need more method params detail please check http://bosonnlp.com/dev/center
Methods
tag(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
sentiment(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Value: { auto: true } e.g..
- Type:
ner(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
depparser(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
keywords(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
classify(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
suggest(text, params)
- texts:
Required
- Type:
String
- params:
- Type:
Object
- Type:
summary(texts, params)
- texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
License
MIT license.