Skip to content

A bot tweets an artificially created message using markov chain.

License

Notifications You must be signed in to change notification settings

guoyu07/markobot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markovot

This is a bot tweets an artificially created message using second order markov chain method. This method is a mathematical system that undergoes transitions from one state to another, between a finite or countable number of possible states. This method is available and effective in case of having relationships each other. Specifically, this will select next word corresponding to the probability of occurrence of the two words with connected. This will repeats this and get generated word sequence. Therefore this can tweet as if human tweets. This personification system is really absorbing, but is still little stupid. If interested, let's play on words.

Demo

@dev_12am

Requires

Open lib/constant.php and fill the below blank.

Configure::write('twitter.user_id', '');
Configure::write('twitter.password', '');
Configure::write('twitter.consumer_key', '');
Configure::write('twitter.consumer_secret', '');
Configure::write('twitter.access_token', '');
Configure::write('twitter.access_token_secret', '');
Configure::write('yahoo.app_id', '');

Usage

needs numerous public tweets for constructing an artificially message. So, we have to setup database at first.

cd /path/to/bin
./bot setup

command for pick up tweets is:

./bot pick [num]

command for tweet is:

./bot post

Notes

  • You can't post message without picking up timeline. run ./bot pick before run ./bot post.
  • If you want to set limit on pick command, set num as option after ./bot pick.

About

A bot tweets an artificially created message using markov chain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%