{"id":20426003,"url":"https://github.com/seleb/markov-multi-order","last_synced_at":"2026-05-10T15:46:29.649Z","repository":{"id":57291387,"uuid":"291192948","full_name":"seleb/markov-multi-order","owner":"seleb","description":"Simple markov chain implementation supporting multiple orders of ngrams","archived":false,"fork":false,"pushed_at":"2020-11-22T22:55:10.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-16T03:05:21.188Z","etag":null,"topics":["chain","generation","markov","procedural","text"],"latest_commit_sha":null,"homepage":"https://seleb.github.io/markov-multi-order","language":"TypeScript","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/seleb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-29T03:25:55.000Z","updated_at":"2022-12-29T15:22:54.000Z","dependencies_parsed_at":"2022-09-18T23:22:01.889Z","dependency_job_id":null,"html_url":"https://github.com/seleb/markov-multi-order","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fmarkov-multi-order","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fmarkov-multi-order/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fmarkov-multi-order/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seleb%2Fmarkov-multi-order/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seleb","download_url":"https://codeload.github.com/seleb/markov-multi-order/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241967055,"owners_count":20050331,"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":["chain","generation","markov","procedural","text"],"created_at":"2024-11-15T07:14:56.304Z","updated_at":"2026-05-10T15:46:24.620Z","avatar_url":"https://github.com/seleb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `markov-multi-order`\n\nSimple markov chain implementation supporting multiple orders of ngrams\n\n```sh\nnpm i markov-multi-order\n```\n\n```ts\nimport { Markov } from 'markov-multi-order';\n\nconst markov = new Markov({\n\tdelimeter: '', // how to split up strings for ngrams (e.g. '' for letters, ' ' for words)\n\tminOrder: 1, // minimum ngram order\n\tmaxOrder: 2, // maximum ngram order\n\tsource: ['123','abc'], // source used to generate ngrams\n});\n\nmarkov.randomSequence('a', 3); // generate string of length 3, starting with 'a'\nmarkov.randomSequence('1', '3'); // generate string until the string '3' is reached, starting with '1'\nmarkov.randomSequence(); // generate string until a natural end is reached, using a random start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseleb%2Fmarkov-multi-order","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseleb%2Fmarkov-multi-order","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseleb%2Fmarkov-multi-order/lists"}