{"id":15692247,"url":"https://github.com/healeycodes/markov-chain-generator","last_synced_at":"2025-06-29T09:34:21.708Z","repository":{"id":37653548,"uuid":"334322735","full_name":"healeycodes/markov-chain-generator","owner":"healeycodes","description":"🤖 Build and consume Markov chain models to generate random realistic text.","archived":false,"fork":false,"pushed_at":"2021-02-02T12:02:48.000Z","size":126,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T00:51:12.652Z","etag":null,"topics":["markov-chain","markov-model","text-generation"],"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/healeycodes.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":"2021-01-30T03:54:41.000Z","updated_at":"2024-10-02T05:46:27.000Z","dependencies_parsed_at":"2022-09-04T19:23:54.839Z","dependency_job_id":null,"html_url":"https://github.com/healeycodes/markov-chain-generator","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/healeycodes%2Fmarkov-chain-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fmarkov-chain-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fmarkov-chain-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fmarkov-chain-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healeycodes","download_url":"https://codeload.github.com/healeycodes/markov-chain-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252984943,"owners_count":21835886,"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":["markov-chain","markov-model","text-generation"],"created_at":"2024-10-03T18:30:10.586Z","updated_at":"2025-05-08T02:22:53.184Z","avatar_url":"https://github.com/healeycodes.png","language":"Python","readme":"# markov-chain-generator\n\nUse this library to generate random realistic text via Markov chain models.\n\nSee the example by running `python generate.py`.\n\n\u003cbr\u003e\n\n## How?\n\nPass in a corpus, a state size, and a minimum length. Make sure the corpus uses capital letters and full-stops.\n\n```python\nfrom generate import get_source, build_model, generate_text\n\nstate_size = 2\nmin_length = 100\nsource = get_source('poe') # or some corpus as a string\npoe = build_model(source, state_size)\ntext = generate_text(poe, state_size, min_length)\nprint(text)\n\n'''\nAnd really between two and three, there is no comfortable feeling. But the little spalpeen Mounseer Maiter-di-dauns that plumped his silf right down by the pond. Upon his own house, when wit and jollity reigned supreme-dampened a little, of course, expressed in regard to his conscience and himself. But although Hop-Frog, through the nose; the intestines through an avenue two miles long, and might have been a little amused. When we had great reason to congratulate ourselves upon our good fortune. Approaching the table, and in the way of indemnification inserted his left thumb in the external world, when, with many a fine thing.\n'''\n```\n\n\u003cbr\u003e\n\n## Tests\n\nSome basic tests can be ran with `python tests.py`\n\n\u003cbr\u003e\n\n\u003csub\u003eThe Edgar Allen Poe and Oscar Wilde text corpuses were taken from https://github.com/nlp-compromise/nlp-corpus and I'm unsure of their license. The code is MIT.\u003c/sub\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fmarkov-chain-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealeycodes%2Fmarkov-chain-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fmarkov-chain-generator/lists"}