Hebrew

Latest version: v0.8.1

Safety actively analyzes 625010 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.8.1

Fixed

- Corrected an issue with subclasses of `BaseHebrewChar` where use of `__eq__` would break when the type for the
comparison was not the same as itself.

What's Changed
* Fix __eq__ implementation by avi-perl in https://github.com/avi-perl/Hebrew/pull/17


**Full Changelog**: https://github.com/avi-perl/Hebrew/compare/0.8.0...0.8.1

0.8.0

Added

- Added `Hebrew.normalize`, a function for normalizing the hebrew characters in a string. This is typically needed with
text includes special hebrew characters.

Hidden among hebrew text can be special characters that are visually identical humans, but are made up of different
unicode characters. However, this can cause issues with presentation when there is no support for these characters.

![image](https://github.com/avi-perl/Hebrew/assets/86095449/0aac056b-66a2-4b0c-be56-05354a11e6e8)

In this case, the first letter is made up of 2 unicode characters, [sin with a dot](https://en.wiktionary.org/wiki/%D7%A9%D7%82)
and [qamatz](https://en.wiktionary.org/wiki/%D6%B8). The issue here is the sin. By normalizing the sin with a dot to 2 unicode
characters, [ש](https://en.wiktionary.org/wiki/%D7%A9) and the [dot](https://en.wiktionary.org/wiki/%D7%82), the display
will look right!

![image](https://github.com/avi-perl/Hebrew/assets/86095449/d601455f-fb1b-41ff-aa19-af497aa19052)

To normalize content, use the `Hebrew.normalize` function:
python
from hebrew import Hebrew

hs = Hebrew('שָׂחַקְתִּי כְּמוֹ')

assert len(hs.string) == 14
assert len(hs.normalize().string) == 18


Normalizing Yiddish

By default, special yiddish characters such as [ײ](https://en.wiktionary.org/wiki/%D7%B2) (double Yod) are _not_ normalized.
However, [ײַ](https://en.wiktionary.org/wiki/%EF%AC%9F) (double Yod with a Patah) will be converted to [ײַ](https://en.wiktionary.org/wiki/%D7%B2%D6%B7).

To fully "normalize" yiddish characters, pass `True` to `normalize`.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.