1.0.0 • Published 5 years ago

bosonnlp.js v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

bosonnlp.js

NPM

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 or String
  • params:

    • Type: Object

    sentiment(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:

    • Type: Object
    • Value: { auto: true } e.g..

    ner(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:

    • Type: Object

    depparser(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:

    • Type: Object

    keywords(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:

    • Type: Object

    classify(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:

    • Type: Object

    suggest(text, params)

  • texts:

    • Required
    • Type: String
  • params:

    • Type: Object

    summary(texts, params)

  • texts:

    • Required
    • Type: Array or String
  • params:
    • Type: Object

License

MIT license.

1.0.0

5 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago