Skip to content

send discord messages to your friends using a text generator created with Markov chain in python. Data scraped from Reddit

Notifications You must be signed in to change notification settings

VelocityDv/markovbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install all requirements by calling pip install -r requirements.txt

To install nltk requirements open python

import nltk
nltk.download('punkt')

Create a new file called secret_settings.py and add usertokens to secret_settings.py to send messages on discord or to scrap data from reddit To only send messages on discord do not need first 3 secret tokens as used for reddit.

# string
reddit_user_agent = ""
reddit_client_id = ""
reddit_client_secret = ""

# string
discord_token_secret = ''
# integar 
discord_channel_id = 

discord token secret is found through: inspect element -> application -> local storage -> token

discord channel id can be found through: inspect element -> network -> messages -> channelid

To generate the text run python generator.py n corpus_data. The recommended n for ngrams is 2 or 3.

The text generation has some imperfection as the code is not set to deal with the imperfections of comments from reddit users, therefore users can change the data corpus to something more appropriate

About

send discord messages to your friends using a text generator created with Markov chain in python. Data scraped from Reddit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages