{"id":21586083,"url":"https://github.com/magiclen/words-count","last_synced_at":"2025-04-10T20:20:22.681Z","repository":{"id":57672356,"uuid":"287513595","full_name":"magiclen/words-count","owner":"magiclen","description":"Count the words and characters, with or without whitespaces.","archived":false,"fork":false,"pushed_at":"2024-04-24T21:26:17.000Z","size":29,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T17:55:20.735Z","etag":null,"topics":["rust"],"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/magiclen.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-08-14T11:06:33.000Z","updated_at":"2025-01-01T06:09:10.000Z","dependencies_parsed_at":"2024-11-24T18:01:10.917Z","dependency_job_id":null,"html_url":"https://github.com/magiclen/words-count","commit_stats":{"total_commits":10,"total_committers":4,"mean_commits":2.5,"dds":0.4,"last_synced_commit":"43e49e4e191eff1689e1ed7cf1a12e72229e7bce"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwords-count","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwords-count/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwords-count/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwords-count/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/words-count/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248289805,"owners_count":21078921,"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":["rust"],"created_at":"2024-11-24T15:12:38.344Z","updated_at":"2025-04-10T20:20:22.661Z","avatar_url":"https://github.com/magiclen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Words Count\n====================\n\n[![CI](https://github.com/magiclen/words-count/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/words-count/actions/workflows/ci.yml)\n\nCount the words and characters, with or without whitespaces.\n\nThe algorithm is roughly aligned with the way LibreOffice is counting words. This means that it does not exactly match the [Unicode Text Segmentation](https://unicode.org/reports/tr29/#Word_Boundaries) standard.\n\n## Examples\n\n```rust\nuse words_count::WordsCount;\n\nassert_eq!(WordsCount {\n    words: 20,\n    characters: 31,\n    whitespaces: 2,\n    cjk: 18,\n}, words_count::count(\"Rust是由 Mozilla 主導開發的通用、編譯型程式語言。\"));\n```\n\n```rust\nlet result = words_count::count_separately(\"apple banana apple\");\n\nassert_eq!(2, result.len());\nassert_eq!(Some(\u00262), result.get(\"apple\"));\n```\n\n## Crates.io\n\nhttps://crates.io/crates/words-count\n\n## Documentation\n\nhttps://docs.rs/words-count\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fwords-count","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Fwords-count","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fwords-count/lists"}