{"id":17933656,"url":"https://github.com/keyan/markovgen","last_synced_at":"2025-04-03T11:23:48.713Z","repository":{"id":25890697,"uuid":"29331182","full_name":"keyan/MarkovGen","owner":"keyan","description":"A module which generates strings from an input corpus using Markov chains.","archived":false,"fork":false,"pushed_at":"2015-04-04T01:25:19.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T00:42:35.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-16T03:38:54.000Z","updated_at":"2015-06-30T02:58:54.000Z","dependencies_parsed_at":"2022-08-24T14:16:19.509Z","dependency_job_id":null,"html_url":"https://github.com/keyan/MarkovGen","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/keyan%2FMarkovGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyan%2FMarkovGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyan%2FMarkovGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keyan%2FMarkovGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keyan","download_url":"https://codeload.github.com/keyan/MarkovGen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246990406,"owners_count":20865464,"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":[],"created_at":"2024-10-28T21:41:05.361Z","updated_at":"2025-04-03T11:23:48.684Z","avatar_url":"https://github.com/keyan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarkovGen\nThis module takes any string input and constructs a dictionary containing the frequency that following words occur. This can be used to probabilistically generate text which resembles the original input. The user can also specify how long to make the final output. \n\nI had originally planned to add the option of accepting a user defined n-gram length, but I feel that I reached the point of diminishing educational return. Currently uses n-gram of 2, which generates decent, but oftentimes nonsensical text.\n\nUsage: `python markov.py \u003cfilename\u003e.txt \u003c# of words\u003e`\n\nSome example text generate from [The Sayings of Confucius]:\n\u003eIn awe he is stable a man with enquiries to another state\n\n\u003eCome from afar do we not rejoice to live unknown\n\n\u003eThey are unprincipled stern men of arts and learning delights \n\n\u003eHis face changed when he was asked what is meant by kindness without waste\n\n\nI have also made this into a Flask web app, live @: [MarkovGen][mg]\n\n[The Sayings of Confucius]: https://www.gutenberg.org/ebooks/24055\n[mg]: http://www.keyanp.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyan%2Fmarkovgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeyan%2Fmarkovgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyan%2Fmarkovgen/lists"}