{"id":13744812,"url":"https://github.com/csvance/armchair-expert","last_synced_at":"2025-05-09T04:30:50.342Z","repository":{"id":53138755,"uuid":"63035869","full_name":"csvance/armchair-expert","owner":"csvance","description":"Machine Learning Chatbot","archived":false,"fork":false,"pushed_at":"2021-04-07T23:20:47.000Z","size":3398,"stargazers_count":56,"open_issues_count":18,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-15T16:41:43.574Z","etag":null,"topics":["ai","bot","discord","machine-learning","markov","nlp","python","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csvance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-11T04:13:30.000Z","updated_at":"2024-10-11T21:36:35.000Z","dependencies_parsed_at":"2022-09-11T12:10:51.547Z","dependency_job_id":null,"html_url":"https://github.com/csvance/armchair-expert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvance%2Farmchair-expert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvance%2Farmchair-expert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvance%2Farmchair-expert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csvance%2Farmchair-expert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csvance","download_url":"https://codeload.github.com/csvance/armchair-expert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253191762,"owners_count":21868803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","discord","machine-learning","markov","nlp","python","twitter"],"created_at":"2024-08-03T05:01:16.555Z","updated_at":"2025-05-09T04:30:49.662Z","avatar_url":"https://github.com/csvance.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# About\narmchair-expert is a chatbot inspired by old Markov chain IRC bots like PyBorg. It regurgitates what it learns from you in unintentionally hilarious ways.\n\n## Features\n- Uses NLP to select the most optimal subjects for which to generate a response\n- Uses a Recurrent Neural Network (RNN) to structure and capitalize the output, mimicking sentence structure and capitalization of learned text\n- Learns new words in real-time with an n-gram markov chain, which is positionally aware of the distances between different words, creating a more coherent sentence\n\n## Requirements\n- 3+ GB of RAM\n- python 3.6+\n- keras (Tensorflow backend)\n- spaCy 2.0.0+\n- spacymoji\n- numpy\n- tweepy\n- discord.py\n- sqlalchemy\n\n## Setup \u0026 Training\n- Copy config/armchair_expert.example.py to config/armchair_expert.py\n- Copy config/ml.example.py to config/ml.py\n- Make sure you have the spacy 'en' dataset downloaded: 'python -m spacy download en'\n- I would suggest import some data for training before starting the bot. Here is one example: https://github.com/csvance/armchair-expert/blob/master/scripts/import_text_file.py\n- Every time the bot starts it will train on all new data it acquired since it started up last\n- The bots sentence structure model is only trained once on initial startup. To train it with the most recent acquired data, start the bot with the --retrain-structure flag. If you are noticing the bot is not generating sentences which the structure of learned material, this will help.\n\n# Connectors\n## Twitter\n- You will need to create an application on the twitter devleoper site on your bot's twitter account https://apps.twitter.com\n- After creating it, assign it permissions to do direct messages (this isn't default)\n- Create an access token for your account\n- Copy config/twitter.example.py to config/twitter.py\n- Fill in the tokens and secrets along with your handle\n- python armchair_expert.py\n\n## Discord\n- You will need to register a bot with Discord: https://discordapp.com/developers/applications/me#top\n- Once you register it take note of the Client ID, Username, and Token\n- Copy config/discord.example.py to config/discord.py and fill in the relevant fields\n- python armchair_expert.py\n- When the bot starts you should see a message print to the console containing a link which will allow you to join the bot to a server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsvance%2Farmchair-expert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsvance%2Farmchair-expert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsvance%2Farmchair-expert/lists"}