{"id":27293114,"url":"https://github.com/bipinkrish/signwriting-dart","last_synced_at":"2025-04-11T22:42:13.150Z","repository":{"id":224217286,"uuid":"762755629","full_name":"bipinkrish/signwriting-dart","owner":"bipinkrish","description":"Dart utilities for SignWriting formats, tokenizer and visualizer","archived":false,"fork":false,"pushed_at":"2024-07-13T18:17:22.000Z","size":3508,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-21T11:23:18.213Z","etag":null,"topics":["sign","signwriting"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/signwriting","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bipinkrish.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["bipinkrish"]}},"created_at":"2024-02-24T15:51:48.000Z","updated_at":"2024-07-13T18:17:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d7edcd3-66df-4db7-b38d-01105b3fb8a1","html_url":"https://github.com/bipinkrish/signwriting-dart","commit_stats":null,"previous_names":["bipinkrish/signwriting"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipinkrish%2Fsignwriting-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipinkrish%2Fsignwriting-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipinkrish%2Fsignwriting-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bipinkrish%2Fsignwriting-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bipinkrish","download_url":"https://codeload.github.com/bipinkrish/signwriting-dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493022,"owners_count":21113159,"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":["sign","signwriting"],"created_at":"2025-04-11T22:42:12.233Z","updated_at":"2025-04-11T22:42:13.135Z","avatar_url":"https://github.com/bipinkrish.png","language":"Dart","funding_links":["https://github.com/sponsors/bipinkrish"],"categories":["🤟 Notation Systems"],"sub_categories":[],"readme":"# SignWriting\n\n[![pub package](https://img.shields.io/pub/v/signwriting.svg)](https://pub.dev/packages/signwriting)\n\nThis is dart implementation of its [python counterpart](https://github.com/sign-language-processing/signwriting). Dart utilities for SignWriting formats, tokenizer, visualizer and utils.\n\n## Features\n\n- ✔️ Formats\n- ✔️ Tokenizer\n- ❌ Visualizer ([implemented here](https://pub.dev/packages/signwriting_flutter))\n- ✔️ Utils\n\n## Usage\n\n### Formats\n\nThis module provides utilities for converting between different formats of SignWriting. We include a few examples:\n\n1. To parse an FSW string into a Sign object, representing the sign as a dictionary:\n\n```dart\nprint(fswToSign(\"M123x456S1f720487x492\"));\n// Sign { box: SignSymbol { symbol: 'M', position: [123, 456] }, symbols: [SignSymbol { symbol: 'S1f720', position: [487, 492] }] }\n```\n\n2. To convert a SignWriting string in SWU format to FSW format:\n\n```dart\nprint(swu2fsw('𝠃𝤟𝤩񋛩𝣵𝤐񀀒𝤇𝣤񋚥𝤐𝤆񀀚𝣮𝣭'));\n// M525x535S2e748483x510S10011501x466S2e704510x500S10019476x475\n```\n\n### Tokenizer\n\nThis module provides utilities for tokenizing SignWriting strings for use in NLP tasks1. We include a few usage non-exhaustive examples:\n\n1. To tokenize a SignWriting string into a list of tokens:\n\n```dart\nSignWritingTokenizer tokenizer = SignWritingTokenizer();\nString fsw = 'M123x456S1f720487x492S1f720487x492';\nList\u003cString\u003e tokens = tokenizer.textToTokens(fsw, boxPosition: true);\nprint(tokens);\n// [M, p123, p456, S1f7, c2, r0, p487, p492, S1f7, c2, r0, p487, p492]\n```\n\n2. To convert a list of tokens back to a SignWriting string:\n\n```dart\nprint(tokenizer.tokensToText(tokens));\n// M123x456S1f720487x492S1f720487x492\n```\n\n3. For machine learning purposes, we can convert the tokens to a list of integers:\n\n```dart\nprint(tokenizer.tokenize(fsw, bos: false, eos: false));\n// [6, 932, 932, 255, 678, 660, 919, 924, 255, 678, 660, 919, 924]\n```\n\n4. Or to remove 'A' information, and separate signs by spaces, we can use:\n\n```dart\nprint(normalizeSignWriting(fsw));\n// M123x456S1f720487x492S1f720487x492\n```\n\n### Visualizer\n\n([implemented here](https://pub.dev/packages/signwriting_flutter))\n\nThis module is used to visualize SignWriting strings as images. Unlike [sutton-signwriting/font-db](https://github.com/sutton-signwriting/font-db/) which it is based on, this module does not support custom styling. Benchmarks show that this module is ~5000x faster than the original implementation.\n\n```dart\nString fsw = \"AS10011S10019S2e704S2e748M525x535S2e748483x510S10011501x466S20544510x500S10019476x475\";\nsignwritingToImage(fsw);\n```\n\n### Utils\n\nThis module includes general utilities that were not covered in the other modules.\n\n1. `join_signs` joins a list of signs into a single sign. This is useful for example for fingerspelling words out of individual character signs.\n\n```dart\nString charA = 'M507x507S1f720487x492';\nString charB = 'M507x507S14720493x485';\nString resultSign = joinSigns(fsws: [charA, charB]);\nprint(resultSign);\n// M500x500S1f720487x493S14720493x508\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbipinkrish%2Fsignwriting-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbipinkrish%2Fsignwriting-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbipinkrish%2Fsignwriting-dart/lists"}