{"id":20526556,"url":"https://github.com/nikvoronin/ngrams4alice","last_synced_at":"2026-04-17T22:31:26.929Z","repository":{"id":217124226,"uuid":"743128929","full_name":"nikvoronin/Ngrams4Alice","owner":"nikvoronin","description":"Using a Markov chain to generate readable nonsense in C#","archived":false,"fork":false,"pushed_at":"2024-01-30T21:36:46.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T11:27:05.307Z","etag":null,"topics":["csharp","dotnet","generative-text","markov-chain"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/nikvoronin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-14T12:26:56.000Z","updated_at":"2024-01-30T21:32:58.000Z","dependencies_parsed_at":"2024-01-14T18:38:33.485Z","dependency_job_id":"d2d928c2-d340-4c68-a353-e9377031af6c","html_url":"https://github.com/nikvoronin/Ngrams4Alice","commit_stats":null,"previous_names":["nikvoronin/markovngrams","nikvoronin/ngrams4alice"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FNgrams4Alice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FNgrams4Alice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FNgrams4Alice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FNgrams4Alice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikvoronin","download_url":"https://codeload.github.com/nikvoronin/Ngrams4Alice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133430,"owners_count":20077095,"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":["csharp","dotnet","generative-text","markov-chain"],"created_at":"2024-11-15T23:14:43.526Z","updated_at":"2026-04-17T22:31:26.918Z","avatar_url":"https://github.com/nikvoronin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ngrams For Alice\n\n## Outputs\n\nLewis Carroll. Alice's adventures in Wonderland\n\n```shell\n\u003e cat .\\alice.txt | .\\MarkovNgrams.exe\n```\n\n\"Just at this moment Alice felt a little more conversation with her face like the look of the shepherd boy--and the sneeze of the creature, but on second thoughts she decided on going into the wood.\"\n\n\"There's no pleasing them! Alice replied in an agony of terror.\"\n\n\"I know I do! said Alice in a trembling voice to a work or any part of this electronic work, you must return the medium with your written explanation.\"\n\n## Ngram internals\n\n\u003e [!NOTE]\n\u003e Define `Enable_PrintStatistics` constant as `true`, then rebuild project.\n\n### Top 10 most-branching n-grams\n\n```text\nin the      → United (10)\nthe terms   → of (13)\nterms of    → this (10)\nthe Project → Gutenberg (22)\nout of      → the (11)\none of      → the (14)\nshe said    → to (17)\nthe White   → Rabbit (10)\n* *         → * (54)\nsaid to     → herself, (10) | the (11)\nsaid the    → Caterpillar. (12) | King, (10) | Mock (19) | King. (10)\na minute    → or (11)\nthe March   → Hare (14) | Hare. (10)\nthe Mock    → Turtle (28)\n```\n\nQ: Repeated but why?\\\nA: Words are chosen randomly. If words are repeated more often, they will be appear more often.\n\n### Model statistics\n\n```text\nPrefixes (states):        19378\nUnique transitions:       26592\nTotal observations:       29571\nUnique words:             5974\nAvg transitions / state:  1,37\nAvg observations / state: 1,53\n```\n\n#### Prefixes (states)\n\nNumber of unique n-gram prefixes.\n\n```text\n[\"I\",\"am\"]\n[\"You\",\"are\"]\n[\"The\",\"cat\"]\n```\n\n#### Unique transitions\n\nNumber of unique transitions:\n\n```text\n[\"I\",\"am\"] → happy\n[\"I\",\"am\"] → tired\n```\n\n#### Total observations\n\nHow many times transitions appear in the corpus (sum of frequencies).\n\nExample:\n\n```text\nI am happy   (5)\nI am tired   (2)\n```\n\nTotal = 7\n\n#### Unique words\n\nThe size of the model's vocabulary.\n\n#### Avg transitions/state\n\nHow \"branchy\" the model is:\n\n- ~1 -- text is almost deterministic\n- 2-5 -- typical natural language\n- 10+ -- very diverse corpus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Fngrams4alice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikvoronin%2Fngrams4alice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Fngrams4alice/lists"}