{"id":17279497,"url":"https://github.com/reagentx/markov_python","last_synced_at":"2025-03-26T14:45:43.985Z","repository":{"id":68633689,"uuid":"111976772","full_name":"ReagentX/markov_python","owner":"ReagentX","description":"Codecademy Final Project supplementary code patched for Python 3.6.x","archived":false,"fork":false,"pushed_at":"2017-11-25T04:41:22.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T16:15:00.468Z","etag":null,"topics":["learning-python","markov-chain","patch"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReagentX.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-25T04:38:41.000Z","updated_at":"2017-11-25T04:41:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea15c3bd-1b92-4aa8-b608-32177c41294c","html_url":"https://github.com/ReagentX/markov_python","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/ReagentX%2Fmarkov_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fmarkov_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fmarkov_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReagentX%2Fmarkov_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReagentX","download_url":"https://codeload.github.com/ReagentX/markov_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245675390,"owners_count":20654361,"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":["learning-python","markov-chain","patch"],"created_at":"2024-10-15T09:17:48.183Z","updated_at":"2025-03-26T14:45:43.963Z","avatar_url":"https://github.com/ReagentX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# markov_python\nCodecademy Final Project supplementary code patched for Python 3.6.x\n\n# Description\nCodecademy Markov Chain text generator module.\nThis is an implementation of a [Markov Chain](https://en.wikipedia.org/wiki/Markov_chain) that generates random text based on content provided by the user. It is designed to be used as a local Python module for instructional purposes.\n\n## How to add this to your project\n1. Clone this repository into your Python project folder. Alternatively, you can download the zip archive and extract it into a directory in your project folder called `markov_python`.\n2. You will need to import this file based on it's relative path. If your main runnable Python script is in the same directory as the `markov_python` directory, you can import this by including the following at the top of the runnable script: `from markov_python.cc_markov import MarkovChain`\n\n\n## How to use the Markov Chain text generator\n1. After importing this module into your main project script, create an instance of MarkovChain and assign it to a variable. For example `mc = MarkovChain()`\n2. Use one of the methods `mc.add_string()` or `mc.add_file()` to read a local text file or a string. You can call this method multiple times to add additional data.\n3. Call the `generate_text()` function on the instance of MarkovChain you created to generate text from the Markov Chain. You can call this method multiple times to generate additional data. This function will output a list of words. If your project requires a different format, you should convert the output accordingly.\n\n\n## License\n\nThis code is released under the terms of the GPL v3 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagentx%2Fmarkov_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freagentx%2Fmarkov_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freagentx%2Fmarkov_python/lists"}