1.0.0 • Published 5 years ago
bosonnlp.js v1.0.0
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
sentiment(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
params:
- Type:
Object
- Value: { auto: true } e.g..
ner(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
params:
- Type:
Object
depparser(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
params:
- Type:
Object
keywords(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
params:
- Type:
Object
classify(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
params:
- Type:
Object
suggest(text, params)
- Type:
texts:
Required
- Type:
String
params:
- Type:
Object
summary(texts, params)
- Type:
texts:
Required
- Type:
Array
orString
- params:
- Type:
Object
- Type:
License
MIT license.