0.0.7 • Published 4 years ago

twentiment v0.0.7

Weekly downloads
10
License
ISC
Repository
github
Last release
4 years ago

twentiment

Sentiment analyzer for twitter.

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

  1. search: string, tweets to search & analyze.
  2. since: string, date of earliest tweets (default: undefined).
  3. until: string, date of latest tweets (default: undefined).
  4. pages: number, how many pages of tweets to analyze, with each page consisting of 20 tweets (default: 1).
  5. 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.
  6. method: string, which sentiment analyzer to use (default: wink). Sentiment analyzers include:

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));
0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago