{"id":18082981,"url":"https://github.com/progval/markovgen","last_synced_at":"2025-06-28T18:35:07.263Z","repository":{"id":22306753,"uuid":"25641775","full_name":"progval/markovgen","owner":"progval","description":"Text generator based on Markov chains and IRC logs (or plain text).","archived":false,"fork":false,"pushed_at":"2018-04-17T07:51:39.000Z","size":23,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-13T23:15:40.559Z","etag":null,"topics":["irc","irc-bot","logs","markov-chain","python","text-generation"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/markovgen","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/progval.png","metadata":{"files":{"readme":"README.txt","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":"2014-10-23T14:39:59.000Z","updated_at":"2024-11-02T00:52:45.000Z","dependencies_parsed_at":"2022-08-21T02:00:58.132Z","dependency_job_id":null,"html_url":"https://github.com/progval/markovgen","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/progval/markovgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2Fmarkovgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2Fmarkovgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2Fmarkovgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2Fmarkovgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/progval","download_url":"https://codeload.github.com/progval/markovgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/progval%2Fmarkovgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262477044,"owners_count":23317406,"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":["irc","irc-bot","logs","markov-chain","python","text-generation"],"created_at":"2024-10-31T14:06:36.987Z","updated_at":"2025-06-28T18:35:07.237Z","avatar_url":"https://github.com/progval.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Installation\n============\n\nUsing pip:\n\n* pip3 install markovgen --user\n\nOr\n\nFrom the git repository:\n\n* git clone https://github.com/ProgVal/markovgen.git\n* cd markovgen\n* python3 setup.py install --user\n\n\nCommand-line usage\n==================\n\nUsage:\n    python3 -m markovgen \u003cextracter\u003e \u003cpath to log file\u003e\n\nSupported extracters are:\n\n* srt\n* supybot\n* weechat\n* xchat\n* plain\n\n\n\nUsage as a library\n==================\n\nmarkovgen.Markov:\n    __init__(messages=[]):\n        takes an optional list of initial messages.\n\n    feed(message):\n        takes a message and adds it to the cache.\n\n    feed_from_file(file_descriptor, extracter):\n        Reads the file descriptor line by line, apply the extracter to\n        it, and feeds the cache with the return value of the extracter.\n\n    generate_markov_text(max_size=30, seed=None, backward=False):\n        Generate a text based on the cache.\n        Selects a random word in the cache as the first (resp. last) word,\n        and continues forward (resp. backward) using the cache in the\n        right direction, until it selects a message end from the cache\n        or that the max_size is met.\n        The seed may be a string or a 2-tuple of strings.\n\n    available_seeds(backward=False):\n        Returns a view on the 2-tuples of words in the corpus.\n        Useful if you want to match them against a new message.\n\n@mixed_encoding_extracting:\n    decorator for extracters that handle decoding messages with the\n    right charset (if chardet or charade is installed) or as utf8\n    (otherwise)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogval%2Fmarkovgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogval%2Fmarkovgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogval%2Fmarkovgen/lists"}