Skip to content

Unnecessary ZWNJ inserted before ها after non-left-joining letters #367

Description

@amirivojdan

Bug

Normalizer inserts a ZWNJ (\u200c) before ها when the preceding letter is non-left-joining (ا, د, ذ, ر, ز, ژ, و). The ZWNJ is unnecessary here since these letters already produce a visual gap.

Reproduce

from hazm import Normalizer
print(repr(Normalizer().normalize("بندر ها")))

Actual: 'بندر\u200cها'
Expected: 'بندرها'

Works correctly for left-joining letters: "کتاب ها""کتاب\u200cها"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions