Socket
Socket
Sign inDemoInstall

sentiment-and-keyword

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sentiment-and-keyword

Analyze strings based on sentiment and keyword strength using synonyms and related concepts


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

Readme

Source

sentiment-and-keyword

See https://www.npmjs.com/package/sentiment-and-keyword

Install

npm i sentiment-and-keyword

Usage

const sentkey = require('sentiment-and-keyword');

// Set your text to analyzed *required
let text = "The text you want to be analyzed";
// Set your keywords to be used for analysis *required
let keywords = ["Independent", "Honest", "Collaborative", "Brilliant", "Caring"];

sentkey.analyze(text,keywords,function(err,res){
    if(err){
        console.log(err);
        return
    } 
    console.log(res);
})

Result parse

{
  "text": "The text you want to be analyzed",
  "sentiment_score": 0,
  "sentiment_status": "Neutral",
  "sentiment_calculation":  [  
                              {"Independent": 0},
                              {"Honest": 0},
                              {"Collaborative": 0},
                              {"Brilliant": 0},
                              {"Caring": 0} 
                            ],
  "sentiment_comparative": "0",
  "strength_tracker": [ 
                        {"keyword": "Independent", "score": 0},
                        {"keyword": "Honest", "score": 0},
                        {"keyword": "Collaborative", "score": 0},
                        {"keyword": "Brilliant", "score": 0},
                        {"keyword": "Caring", "score": 0} 
                      ],
  "graph_data": [ 
                  [ 
                    "Keyword", 
                    "Percentage", 
                    { "role": "style" }
                  ],
                  ["keyword1", 0, "#color"],
                  ["keyword3", 0, "#color"],
                  ["keyword4", 0, "#color"],
                  ["keyword5", 0, "#color"],
                  ["keyword6", 0, "#color"],  
                ]
};

Keywords

FAQs

Last updated on 19 May 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc