{"id":15674434,"url":"https://github.com/shnewto/ttaw","last_synced_at":"2025-08-09T20:11:25.599Z","repository":{"id":55185248,"uuid":"216967637","full_name":"shnewto/ttaw","owner":"shnewto","description":"a piecemeal natural language processing library","archived":false,"fork":false,"pushed_at":"2024-03-23T01:47:59.000Z","size":3445,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T15:36:40.818Z","etag":null,"topics":["alliteration","cmu","cmudict","crates","double-metaphone","language","metaphone","natural","natural-language","natural-language-processing","nlp","phonemes","phones","processing","pronounce","pronounciation","rhyme","rust","syllables"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/shnewto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-10-23T04:26:29.000Z","updated_at":"2024-05-07T12:11:27.000Z","dependencies_parsed_at":"2023-11-12T23:20:59.190Z","dependency_job_id":"09d211fa-7113-4da9-9a6c-d13c340dae21","html_url":"https://github.com/shnewto/ttaw","commit_stats":{"total_commits":110,"total_committers":5,"mean_commits":22.0,"dds":"0.13636363636363635","last_synced_commit":"e3661e27ea16472c682a01dc1d21e3d9d20f62d8"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shnewto/ttaw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Fttaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Fttaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Fttaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Fttaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shnewto","download_url":"https://codeload.github.com/shnewto/ttaw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnewto%2Fttaw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269631157,"owners_count":24450144,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alliteration","cmu","cmudict","crates","double-metaphone","language","metaphone","natural","natural-language","natural-language-processing","nlp","phonemes","phones","processing","pronounce","pronounciation","rhyme","rust","syllables"],"created_at":"2024-10-03T15:44:41.861Z","updated_at":"2025-08-09T20:11:25.487Z","avatar_url":"https://github.com/shnewto.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![.github/workflows/ci.yml](https://github.com/shnewto/ttaw/workflows/.github/workflows/ci.yml/badge.svg?branch=main)](https://github.com/shnewto/ttaw/actions)\n[![codecov](https://codecov.io/gh/shnewto/ttaw/branch/main/graph/badge.svg?token=7I6VUOOLC2)](https://codecov.io/gh/shnewto/ttaw)\n[![Crates.io Version](https://img.shields.io/crates/v/ttaw.svg)](https://crates.io/crates/ttaw)\n[![Crates.io](https://img.shields.io/crates/d/ttaw.svg)](https://crates.io/crates/ttaw)\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n# ttaw\ntalking to a wall, a piecemeal natural language processing library.\n\n## Functionality\n- Determine if two words rhyme using the Double Metaphone phonetic encoding\n- Determine if two words rhyme using CMUdict phonetic encoding\n\n- Determine if two words alliterate using the Double Metaphone phonetic encoding\n- Determine if two words alliterate using CMUdict phonetic encoding\n\n- Get the CMUdict phonetic encoding of a word\n- Get the Double Metaphone phonetic encoding of a word (port of [words/double-metahone](https://github.com/words/double-metaphone) library)\n\n\n## Rhyme\n```rust\nextern crate ttaw;\nuse ttaw;\n\n// Initialize the CmuDict with a path to the existing serialized CMU dictionary\n// or a directoy containing it. If the dictionary doesn't exisit, it will be\n// downloaded and serialized at the location specified by the path parameter.\nlet cmudict = ttaw::cmu::CmuDict::new(\"cmudict.json\").unwrap();\n\nassert_eq!(Ok(true), cmudict.rhyme(\"far\", \"tar\"));\nassert_eq!(Ok(true), ttaw::metaphone::rhyme(\"far\", \"tar\"));\n\nassert_eq!(Ok(false), cmudict.rhyme(\"shopping\", \"cart\"));\nassert_eq!(Ok(false), ttaw::metaphone::rhyme(\"shopping\", \"cart\"));\n\n// Deviations in cmu and metaphone\nassert_eq!(true, ttaw::metaphone::rhyme(\"hear\", \"near\"));\nassert_eq!(Ok(false), cmudict.rhyme(\"hear\", \"near\"));\n```\n\n## Alliteration\n```rust\nextern crate ttaw;\nuse ttaw;\n\n// Initialize the CmuDict with a path to the existing serialized CMU dictionary\n// or a directoy containing it. If the dictionary doesn't exisit, it will be\n// downloaded and serialized at the location specified by the path parameter.\nlet cmudict = ttaw::cmu::CmuDict::new(\"cmudict.json\").unwrap();\n\nassert_eq!(Ok(true), cmudict.alliteration(\"bounding\",\"bears\"));\nassert_eq!(true, ttaw::metaphone::alliteration(\"bounding\",\"bears\"));\n\nassert_eq!(Ok(false), cmudict.alliteration(\"lazy\", \"dog\"));\nassert_eq!(false, ttaw::metaphone::alliteration(\"lazy\", \"dog\"));\n```\n\n\n## CMUdict\n```rust\nextern crate ttaw;\nuse ttaw;\n\n// Initialize the CmuDict with a path to the existing serialized CMU dictionary\n// or a directoy containing it. If the dictionary doesn't exisit, it will be\n// downloaded and serialized at the location specified by the path parameter.\nlet cmudict = ttaw::cmu::CmuDict::new(\"cmudict.json\").unwrap();\n\nassert_eq!(\n    cmudict.encoding((\"unearthed\"),\n    Ok(Some(vec![vec![\n        \"AH0\".to_string(),\n        \"N\".to_string(),\n        \"ER1\".to_string(),\n        \"TH\".to_string(),\n        \"T\".to_string()\n    ]]))\n);\n```\n\n## Double Metaphone\n```rust\nextern crate ttaw;\nuse ttaw;\nassert_eq!(ttaw::metaphone::encoding(\"Arnow\").primary, \"ARN\");\nassert_eq!(ttaw::metaphone::encoding(\"Arnow\").secondary, \"ARNF\");\n\nassert_eq!(\n    ttaw::metaphone::encoding(\"detestable\").primary,\n    \"TTSTPL\"\n);\nassert_eq!(\n    ttaw::metaphone::encoding(\"detestable\").secondary,\n    \"TTSTPL\"\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnewto%2Fttaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshnewto%2Fttaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnewto%2Fttaw/lists"}