{"id":16208689,"url":"https://github.com/cloudef/zig-budoux","last_synced_at":"2025-07-26T13:33:43.195Z","repository":{"id":224394994,"uuid":"763149090","full_name":"Cloudef/zig-budoux","owner":"Cloudef","description":"Budoux for Zig and C","archived":false,"fork":false,"pushed_at":"2025-03-12T02:28:48.000Z","size":36,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T00:41:21.558Z","etag":null,"topics":["c","chinese","dependency-free","internationalization","japanese","machine-learning","natural-language-processing","no-std","text","thai","typography","word","word-wrapping","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/Cloudef.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-02-25T17:27:45.000Z","updated_at":"2025-03-12T02:28:51.000Z","dependencies_parsed_at":"2024-10-27T20:25:40.602Z","dependency_job_id":"ee0b0479-c359-4d4a-aa74-29a2273f417c","html_url":"https://github.com/Cloudef/zig-budoux","commit_stats":null,"previous_names":["cloudef/zig-budoux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cloudef/zig-budoux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudef%2Fzig-budoux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudef%2Fzig-budoux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudef%2Fzig-budoux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudef%2Fzig-budoux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cloudef","download_url":"https://codeload.github.com/Cloudef/zig-budoux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cloudef%2Fzig-budoux/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267174884,"owners_count":24047711,"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-07-26T02:00:08.937Z","response_time":62,"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":["c","chinese","dependency-free","internationalization","japanese","machine-learning","natural-language-processing","no-std","text","thai","typography","word","word-wrapping","zig"],"created_at":"2024-10-10T10:25:17.632Z","updated_at":"2025-07-26T13:33:43.150Z","avatar_url":"https://github.com/Cloudef.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-budoux\n\n[Budoux](https://github.com/google/budoux) for Zig (and C)\n\n---\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nProject is tested on zig version 0.15.0-dev.27+17b40b1d6\n\n## Example\n\n### Zig\n\n```zig\nconst budoux = @import(\"zig-budoux\");\nvar model = try budoux.init(allocator, .ja);\ndefer model.deinit(allocator);\nvar iter = model.iterator(\"今日は天気です。\");\ntry std.testing.expectEqualSlices(u8, \"今日は\", iter.next().?);\ntry std.testing.expectEqualSlices(u8, \"天気です。\", iter.next().?);\n```\n\n### C\n\n```c\n#include \u003cbudoux.h\u003e\nBudouxModel model = budoux_init(budoux_model_ja);\nBudouxChunkIterator iter = budoux_iterator_init(model, \"今日は天気です。\");\nBudouxChunk chunk;\nchunk = budoux_iterator_next(\u0026iter); // 今日は\nchunk = budoux_iterator_next(\u0026iter); // 天気です。\nbudoux_deinit(model);\n```\n\n\u003e [!NOTE]\n\u003e zig-budoux does not allocate any strings, thus it won't add any html markup or zero width spaces.\n\u003e However with `model.iterator` it is simple to construct strings for your needs.\n\u003e To parse html you need to bring your own html parser.\n\n## Depend\n\n`build.zig.zon`\n```zig\n.zig_budoux = .{\n  .url = \"https://github.com/Cloudef/zig-budoux/archive/{COMMIT}.tar.gz\",\n  .hash = \"{HASH}\",\n},\n```\n\n`build.zig`\n```zig\nconst zig_budoux = b.dependency(\"zig_budoux\", .{}).module(\"zig-budoux\");\nexe.root_module.addImport(\"zig-budoux\", zig_budoux);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudef%2Fzig-budoux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudef%2Fzig-budoux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudef%2Fzig-budoux/lists"}