{"categories":[{"label":"Linguistic","url":"https://skillfed.io/packages/category/text-processing-linguistic"}],"enrichment":{"capability":"Provides string manipulation functions that work with grapheme clusters\u2014user-perceived characters\u2014rather than individual Unicode code points, enabling correct length calculations and slicing for strings with combining marks, emoji modifiers, and other multi-codepoint characters.","skillfed_tags":["unicode","text-processing","abandoned"],"use_cases":["Count user-perceived character length in strings with combining marks or emoji modifiers without overcounting code points.","Truncate or slice text at user-perceived boundaries to avoid splitting multi-codepoint characters and corrupting display.","Format text-based tables or monospaced output by actual visible character width rather than Unicode code point count.","Validate user input length constraints based on what users actually see rather than internal Unicode representation."],"what_it_does":"grapheme is a Python library for working with grapheme clusters\u2014the user-perceived characters that the Unicode Standard defines\u2014rather than raw Unicode code points. Standard Python string functions treat each Unicode code point as a separate unit, which breaks strings containing combining marks (like underlines or accents), emoji with skin-tone modifiers, Korean Hangul, and other multi-codepoint sequences. This library implements the Unicode default rules for extended grapheme clusters and provides functions like `length()`, `substr()`, `slice()`, and `contains()` that operate on graphemes instead.\n\nThe package is useful when you need to count, truncate, or format text the way users actually see it\u2014for example, when building text-based tables in monospaced fonts or ensuring that user input doesn't corrupt multi-codepoint characters. Performance scales linearly with string length, and the library is designed for short strings or the beginning of long strings; the documentation notes that grapheme calculation is notably slower than counting code points and recommends using standard Python functions when performance is prioritized over correctness.","worth_installing":"No. The package is abandoned (last release 2020-03-07, last commit 2022-03-21) and carries high installation friction due to compilation requirements. While it solves a real problem\u2014correct grapheme handling\u2014the lack of maintenance means compatibility issues with newer Python versions or Unicode standards will not be fixed. Consider it only if you are locked into an older Python environment and have no alternative; otherwise, seek an actively maintained grapheme library or implement grapheme logic inline if your use case is narrow."},"id":"grapheme","links":{"html":"https://skillfed.io/packages/grapheme","md":"https://skillfed.io/packages/grapheme.md","pypi":"https://pypi.org/project/grapheme/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2020-03-07","license_spdx":null,"license_treatment":"permissive","name":"grapheme","python_support":"unspecified","summary":"Unicode grapheme helpers"},"popularity":{"monthly_downloads":1192529,"position":4237,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.6.0"}
