{"id":18006052,"url":"https://github.com/brianhicks/markov-generator","last_synced_at":"2025-03-26T10:32:18.714Z","repository":{"id":1023643,"uuid":"851583","full_name":"BrianHicks/Markov-Generator","owner":"BrianHicks","description":"a simple gibberish / random text generator using a markov chain.","archived":false,"fork":false,"pushed_at":"2010-08-20T16:52:43.000Z","size":108,"stargazers_count":20,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T16:06:21.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/BrianHicks.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":"2010-08-20T16:44:49.000Z","updated_at":"2021-11-11T10:57:10.000Z","dependencies_parsed_at":"2022-08-16T11:50:29.727Z","dependency_job_id":null,"html_url":"https://github.com/BrianHicks/Markov-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/BrianHicks%2FMarkov-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2FMarkov-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2FMarkov-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2FMarkov-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHicks","download_url":"https://codeload.github.com/BrianHicks/Markov-Generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245637305,"owners_count":20648127,"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-30T00:23:06.119Z","updated_at":"2025-03-26T10:32:18.249Z","avatar_url":"https://github.com/BrianHicks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Markov Text Generator\r\n=====================\r\n\r\nWhy?\r\n----\r\n\r\nBecause to understand markov chains I needed to hack something together. And to be honest, it produces some pretty interesting little stories, given the right input.\r\n\r\nHow?\r\n----\r\n\r\nAfter including json2.js and markov.js in your page...\r\n\r\n    var test = new markov(text, type, regex);\r\n  \r\nThe text can be anything you so desire.\r\nThe type should be \"string\" or \"json\".\r\nAnd the regex should always be global. All matches are used.\r\n\r\nMethods\r\n-------\r\n\r\nto generate a phrase of a given length:\r\n\r\n    test.gen(length); \r\n  \r\nto see the object containing the data:\r\n\r\n    test.data;\r\n  \r\nto get the JSON generated by JSON2.js of the data:\r\n\r\n    test.getJson();\r\n  \r\nA warning though, you probably only want to use the JSON for making things a bit faster on the processing end with long text, as the JSON tends to be an order of magnitude greater in file size than the input text.\r\n\r\nCopyright\r\n---------\r\n\r\nThis is all open source, you can use it however you like. Especially to learn.\r\n\r\nThat said, I would enjoy it if you would send me a sample to work produced by this.\r\n\r\nOh, and JSON2.js isn't mine, the source can be found at http://www.json.org/json2.js","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Fmarkov-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhicks%2Fmarkov-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Fmarkov-generator/lists"}