1.0.1 • Published 3 years ago

twatter v1.0.1

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

Twatter - Node

NPM version NPM downloads Build Status

npm module that generates tweets using the markov chain model from a Twitter user handles

Features

  • Given a user handle, scrapes Twitter for a variable amount of tweets
  • Stores samples Tweets such that they don't need to be rescraped
  • Generates a random Tweet from sampled Tweets that attempt to resemble something that might be said by target user

Installation

npm install -g twatter-node

Usage

Functions

    generate([user], [sampleSize], [order], [overwrite]);

        Arguements:

            user (String) -- Handle of target twitter user

            sampleSize (integer) -- Number of tweets to sample if no previous samples exist

            order -- Adjusts complexity of the model. Lowest should be 1 and it should be raised depending on how much text there is to sample. In general higher complexity will closer resemble human speech but has a higher chance of repeating something already said instead of being original.
            
            overwrite (boolean) -- Forces to ignore previously sampled Tweets and resamples at the given sampleSize.