{"id":18628565,"url":"https://github.com/sr-murthy/word-n-grams","last_synced_at":"2025-11-04T02:30:31.969Z","repository":{"id":92607756,"uuid":"77089659","full_name":"sr-murthy/word-n-grams","owner":"sr-murthy","description":"Computes word-n-gram stats from a given piece of text (local file or a string literal)","archived":false,"fork":false,"pushed_at":"2017-12-31T21:22:28.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-27T06:43:56.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/sr-murthy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-21T22:09:35.000Z","updated_at":"2016-12-21T22:09:44.000Z","dependencies_parsed_at":"2023-04-23T15:31:28.555Z","dependency_job_id":null,"html_url":"https://github.com/sr-murthy/word-n-grams","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/sr-murthy%2Fword-n-grams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-murthy%2Fword-n-grams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-murthy%2Fword-n-grams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-murthy%2Fword-n-grams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sr-murthy","download_url":"https://codeload.github.com/sr-murthy/word-n-grams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239425338,"owners_count":19636346,"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-11-07T04:48:17.567Z","updated_at":"2025-02-18T06:44:24.287Z","avatar_url":"https://github.com/sr-murthy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word n-Grams\n\nA simple script that scans a piece of text (a local file in the same location as the script, or a string literal enclosed in quotes) and displays the top *k* word *n*-grams (word sequences of length *n*) from the text, including their absolute and relative frequencies. For example, in the following sentence\n\n\u003e \"It is raining today, and I will need an umbrella.\"\n\nthe word *4*-grams are *\"It is raining today\"*, *\"is raining today and\"*, *\"raining today and I\"*, *\"and I will need\"*, *\"I will need an\"*, *\"will need an umbrella.\"* Case and punctuation marks and ignored when comparing word grams, so that the word *4*-grams \"It is raining today,\" and \"it is raining today\" are considered the same.\n\nAn example:\n\n    The top 10 word 5-grams and their frequencies (absolute and relative) are as follows.\n\n        it's important to be confident 4 (0.014)\n        a photo is real or 4 (0.014)\n        be confident and stand up 4 (0.014)\n        photo is real or retouched 4 (0.014)\n        important to be confident and 3 (0.01)\n        idea of what beauty is 3 (0.01)\n        confident and stand up to 3 (0.01)\n        think words can never hurt 3 (0.01)\n        to be confident and stand 3 (0.01)\n        and stand up to bullies 3 (0.01)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr-murthy%2Fword-n-grams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsr-murthy%2Fword-n-grams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr-murthy%2Fword-n-grams/lists"}