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

nlppackagetea

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlppackagetea

This package provides a simple NLP class using the Natural library for performing basic NLP tasks like tokenization, part-of-speech tagging, and sentiment analysis. Users can install it via npm and then import and instantiate the NLP class in their JavaSc

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

NLP Package Tea

This npm package provides a simple yet effective tool for Natural Language Processing (NLP) tasks in JavaScript using the Natural library.

Installation

You can install the package via npm:

npm install nlp-package
Usage
javascript
Copy code
// Import the NLP class
const NLP = require('nlp-package');

// Instantiate the NLP class
const nlp = new NLP();

// Example text
const text = "This is a sample sentence for testing the NLP package.";

// Tokenize text into words
const tokens = nlp.tokenize(text);
console.log(tokens);

// Perform part-of-speech tagging
const posTags = nlp.posTag(text);
console.log(posTags);

// Perform sentiment analysis
const sentiment = nlp.sentimentAnalysis(text);
console.log(sentiment);
API
new NLP()
Creates a new instance of the NLP class.

tokenize(text)
Tokenizes the input text into words.

text: The input text to tokenize.
posTag(text)
Performs part-of-speech tagging on the input text.

text: The input text for part-of-speech tagging.
sentimentAnalysis(text)
Performs sentiment analysis on the input text.

text: The input text for sentiment analysis.
Example
Check out the example.js file for a simple usage example.

License
This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Package last updated on 09 May 2024

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