New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

twentiment

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

twentiment

Sentiment analyzer for search terms on twitter.

unpublished
latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

twentiment

Sentiment analyzer for twitter.

Input must be an object with any of the following keys (the only required key being "search"):

  • search: string, tweets to search & analyze.
  • since: string, date of earliest tweets (default: undefined).
  • until: string, date of latest tweets (default: undefined).
  • pages: number, how many pages of tweets to analyze, with each page consisting of 20 tweets (default: 1).
  • preprocess: array of strings, each string being a preprocessor to run on each tweet. Preprocessors include:
    • persistDupes: keep duplicate tweets.
    • mentions: removes mentions from tweet.
    • emojis: removes emojis from tweet.
    • links || linksROne || linksRTwo || linksRThree: removes links from tweet. Each link option is a different regex.
    • cleaner: improves spacing and sentence structure.
  • method: string, which sentiment analyzer to use (default: wink). Sentiment analyzers include:
    • sliwinski
    • wink

The resolved promise output will be an object with the list of tweets (sentiments included) under "tweets" and cumulative results under "cumulative".

Installation

$ npm i twentiment

Usage

const twentiment = require("twentiment");
// or,
// import twentiment from "twentiment"

twentiment({ search: "twitter" })
	.then((data) => console.log(data))
	.catch((err) => console.log(err));

Keywords

twitter

FAQs

Package last updated on 10 Oct 2020

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