{"id":17573909,"url":"https://github.com/zgiber/mctext","last_synced_at":"2025-03-29T15:31:37.313Z","repository":{"id":57618937,"uuid":"76347505","full_name":"zgiber/mctext","owner":"zgiber","description":"Random-text generator using Markov chain from user-provided sample.","archived":false,"fork":false,"pushed_at":"2017-12-21T23:10:03.000Z","size":732,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T16:23:24.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/zgiber.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-12-13T10:13:41.000Z","updated_at":"2017-07-14T21:39:57.000Z","dependencies_parsed_at":"2022-09-16T19:01:28.674Z","dependency_job_id":null,"html_url":"https://github.com/zgiber/mctext","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/zgiber%2Fmctext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Fmctext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Fmctext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zgiber%2Fmctext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zgiber","download_url":"https://codeload.github.com/zgiber/mctext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246204967,"owners_count":20740414,"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-21T21:43:02.820Z","updated_at":"2025-03-29T15:31:37.290Z","avatar_url":"https://github.com/zgiber.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mctext\n\nRandom-text generator using Markov chain from an user-provided sample. It's useful in cases where generated text must be relatively random,\nbut expected to contain a good average distribution and repetition of words.\n\nExample:\n\n```go\n\nimport \"github.com/zgiber/mctext\"\n\n...\n\n// provide an io.Reader with the sample. Ideally UTF encoded text.\n// ...\nvar r io.Reader\n\n...\n  mc := mctext.New()\n  mc.Parse(r)\n\n  output := mc.Generate(\"\",100) // Generate text with 100 words without defining any starting word.\n\n```\n\nIf you don't want to provide your own io.Reader you can use the sample in the library:\n\n```go\n...\n  mc := mctext.New()\n  mc.Parse(Sample) // The default sample is Tom Sawyer from Mark Twain :)\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgiber%2Fmctext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzgiber%2Fmctext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzgiber%2Fmctext/lists"}