Skip to content

Look a title up without a ZWNJ typed at the end of the word (Persian مهندس‌ علی رضایی gives given مهندس‌, not the title) #1335

Closed

Description

@derek73

A ZWNJ (U+200C) joins nothing at a word's edge, but it stays in the token, so the word no longer matches the vocabulary. One Expediency Council decree types a ZWNJ after every word: جناب‌ حجةالاسلام‌ والمسلمین‌ آقای‌. parse("مهندس‌ علی رضایی") gives given مهندس‌, where مهندس علی رضایی reads the title.

decisions/T1 (separators, not joiners) leaves an edge joiner to the caller, at the tokenizer (#851). Stripping one only when looking a word up, and leaving the token text alone, is a narrower question than T1 asked.

Questions

  • Should the lookup (_normalize, or only the title lookup) drop a ZWNJ at a word's edge?
  • If it goes in _normalize, the match's _fold has to change alike. Read Persian titles and Persian spellings of the Arabic ones (#1151) #1331's tatweel fix first changed only _normalize and made محمـــد and محمد read as a listed spelling, found by review.
  • What about a ZWNJ inside a word that the vocabulary spells without one (آیتالله against آیت‌الله)?

What to measure: how often a source types an edge ZWNJ outside that one decree. A Persian-script source of running names would show it better than the member pages.

Follows #1151.

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Nov 11, 2026
  2. added
    vocabulary
    titles
    non-latin-script
    on Nov 11, 2026
  3. changed the title [-]Should a ZWNJ at the end of a word be ignored when looking a title up? (`مهندس‌ علی رضایی` gives given `مهندس‌`)[/-] [+]Look a title up without a ZWNJ typed at the end of the word (Persian `مهندس‌ علی رضایی` gives given `مهندس‌`, not the title)[/+] on Nov 21, 2026
  4. added this to the 3.2 milestone on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementnon-latin-scripttitlesvocabulary

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions