{"id":18023455,"url":"https://github.com/meooow25/syllable","last_synced_at":"2025-05-09T01:17:09.830Z","repository":{"id":150348769,"uuid":"299408870","full_name":"meooow25/syllable","owner":"meooow25","description":"A Python library to count syllables in English","archived":false,"fork":false,"pushed_at":"2021-02-13T16:05:42.000Z","size":533,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T01:17:04.427Z","etag":null,"topics":["python","syllable"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/meooow25.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":"2020-09-28T19:17:27.000Z","updated_at":"2024-08-19T03:41:07.000Z","dependencies_parsed_at":"2023-07-27T07:15:57.972Z","dependency_job_id":null,"html_url":"https://github.com/meooow25/syllable","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/meooow25%2Fsyllable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meooow25%2Fsyllable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meooow25%2Fsyllable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meooow25%2Fsyllable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meooow25","download_url":"https://codeload.github.com/meooow25/syllable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171281,"owners_count":21865298,"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":["python","syllable"],"created_at":"2024-10-30T07:09:32.117Z","updated_at":"2025-05-09T01:17:09.810Z","avatar_url":"https://github.com/meooow25.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# syllable\nA Python library to count syllables in English\n\nThis is a small fun project to count syllables and detect syllable patterns, inspired by [u/haikusbot](https://www.reddit.com/r/haikusbot/).\n\nThe library uses a model trained on the [CMUdict](https://github.com/cmusphinx/cmudict/) dictionary of pronunciations, and has an accuracy of ~95%.  \nThe model is intentionally small in size, so that it can run fast.\n\nThe model is probably terrible for non-English words.\n\n```py\n\u003e\u003e\u003e from syllable import CmudictSyllableCounter, ModelSyllableCounter\n\u003e\u003e\u003e csc, msc = CmudictSyllableCounter(), ModelSyllableCounter()\n\u003e\u003e\u003e csc.count_syllables('family')\n(2, 3)\n\u003e\u003e\u003e msc.count_syllables('family')\n(3,)\n\u003e\u003e\u003e\n\u003e\u003e\u003e from syllable import CompositeSyllableCounter, SyllablePatternMatcher\n\u003e\u003e\u003e comp = CompositeSyllableCounter([csc, msc])\n\u003e\u003e\u003e matcher = SyllablePatternMatcher(comp, (5, 7, 5)) # or SyllablePatternMatcher.haiku(comp)\n\u003e\u003e\u003e matcher.match(\"family can be two or three syllables, but thisweirdword's just three\")\n[['family', 'can', 'be'], ['two', 'or', 'three', 'syllables,', 'but'], [\"thisweirdword's\", 'just', 'three']]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeooow25%2Fsyllable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeooow25%2Fsyllable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeooow25%2Fsyllable/lists"}