Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlp-node

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlp-node

package NLPIR by Node.js

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

natural language processing by Node.js

description

the Natural Language Processing tools under the nodeJs running time, including Chinese word segmentation, sentiment analysis and so on.

simple to use

let nlp = require('nlp_node');
console.log(nlp.segment('这是待分词文本,调用接口直接分词并且统计词频。'));
console.log(nlp.sense('这是待情感分析文本,调用接口直接分析文章情感。'));

installation

npm install --save nlp_node

nlp

description

the interface of the Natural Language Processing.

loading
first you need to load nlp.

let nlp = require('nlp_node');

.segment(text, tags, options)
simply, method to segment a string and return object consist of words.

example

let nlp = require('nlp_node');
let content = '这是待分词文本,调用 nlp 接口直接分词并且统计词频。';
let object = nlp.segment(content);

custom segment params:
default

tags: ['n', 'v', 'a'],
options: {
  len: 2
}

计算所汉语词性标记集

tags = null 表示所有词性

.sense(text)
simply, method to sense a string or string array and return object consist of positive and negative.

example

let nlp = require('nlp_node');
let content = '这是待情感分析文本,调用 nlp 接口分析并且返回情感分析结果。';
let object = nlp.sense(content);

license

NLPIR
divide目录 - /lib/divide/
sentiment目录 - /lib/sentiment/

Keywords

FAQs

Package last updated on 10 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc