Skip to content

docs: clarify Unicode sequence representation - #100

Open
whitescreendev wants to merge 3 commits into
rapidfuzz:mainfrom
whitescreendev:docs/unicode-text
Open

whitescreendev wants to merge 3 commits into
rapidfuzz:mainfrom
whitescreendev:docs/unicode-text

Conversation

@whitescreendev

Copy link
Copy Markdown

Summary

Clarify the sequence representation used for Unicode and byte-string inputs.

For Python str input, the extension reads the CPython Unicode representation,
so Levenshtein operates on the string's Unicode code-point sequence rather than
its UTF-8 byte encoding.

For bytes input, the sequence elements are byte values.

The documentation also clarifies that code-point distance is distinct from
grapheme-cluster distance, and that Unicode normalization or grapheme
segmentation must be performed by the caller when those semantics are required.

No implementation behavior is changed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant