Skip to content

Constants

Constants for each Hebrew character and classes to represent them, and metadata about them.

ALEF_MAPIQ = HebrewChar('אּ', name='Alef with Mapiq') module-attribute ל

An instance of HebrewChar representing the letter 'אּ'. This is a rarely used special character.

ALEF_PATAH = HebrewChar('אַ', name='Alef with Patah') module-attribute ל

An instance of HebrewChar representing the letter 'אַ'. This is a rarely used special character.

ALEF_QAMATZ = HebrewChar('אָ', name='Alef with Qamats') module-attribute ל

An instance of HebrewChar representing the letter 'אָ'. This is a rarely used special character.

ALEF_WIDE = HebrewChar('ﬡ', name='Wide Alef') module-attribute ל

An instance of HebrewChar representing the letter 'ﬡ'. This is a rarely used special character.

ALEPH = HebrewChar(char='א', name='Aleph', hebrew_name='אָלֶף', name_alts=['Alef']) module-attribute ל

An instance of HebrewChar representing the letter 'א'

ALEPH_LAMED = HebrewChar('ﭏ', name='Alef Lamed') module-attribute ל

An instance of HebrewChar representing the letter 'ﭏ'. This is a rarely used special character.

ALEPH_SYMBOL = HebrewChar('ℵ', name='Aleph Symbol') module-attribute ל

An instance of HebrewChar representing the letter 'ℵ'. This is a rarely used special character.

ALL_CHARS: List[Union[HebrewChar, YiddishChar, NiqqudChar, TaamimChar, OtherChar]] = [ALEPH, BET, VET, GIMEL, DALET, HE, VAV, ZAYIN, CHET, TET, YOD, CAF, KAF_SOFIT, CHAF, CHAF_SOFIT, LAMED, MEM, MEM_SOFIT, NUN, NUN_SOFIT, SAMEKH, AYIN, PE, FE, PE_SOFIT, FE_SOFIT, TSADI, TSADI_SOFIT, QOF, RESH, SHIN, SIN, PLAIN_SIN, TAV, SAV, DOUBLE_YOD, DOUBLE_VAV, VAV_YOD, SIN_DOT, SHIN_DOT, DAGESH, QUBUTS, SHURUK, HOLAM, QAMATS, PATAH, SEGOL, TSERE, HIRIQ, HATAF_QAMATS, HATAF_PATAH, HATAF_SEGOL, SHEVA, UPPER_DOT, MAQAF, PASEQ, SOF_PASSUK, ETNAHTA, SEGOL_TOP, SHALSHELET, ZAQEF_QATAN, ZAQEF_GADOL, TIFCHA, REVIA, ZINOR, PASHTA, PASHTA_2, YETIV, TEVIR, PAZER, TELISHA_GEDOLA, TELISHA_KETANNAH, GERESH, AZLA_GERESH, GERSHAYIM, GERSHAYIM_2, MERCHA, MUNACH, MAHPACH, DARGA, MERCHA_KEFULA, YERACH_BEN_YOMO, MASORA, DEHI, ZARQA, GERESH_MUQDAM, QARNEY_PARA, OLA, ILUY, RAFE, METEG, ATNAH_HAFUKH, HOLAM_HASER, LOWER_DOT, INVERTED_NUN, ALEPH_SYMBOL, BET_SYMBOL, GIMEL_SYMBOL, DALET_SYMBOL, YOD_HIRIQ, YOD_YOD_PATAH, YOD_YOD_PATAH2, AYIN_ALT, ALEF_WIDE, DALET_WIDE, HE_WIDE, KAF_WIDE, LAMED_WIDE, FINAL_MEM_WIDE, RESH_WIDE, TAV_WIDE, SHIN_SHIN_DOT, SHIN_SIN_DOT, SHIN_DAGESH_SHIN_DOT, SHIN_DAGESH_SIN_DOT, ALEF_PATAH, ALEF_QAMATZ, ALEF_MAPIQ, BET_DAGESH, GIMEL_DAGESH, DALET_DAGESH, HE_MAPIQ, VAV_DAGESH, ZAYIN_DAGESH, TET_DAGESH, YOD_DAGESH, FINAL_KAF_DAGESH, KAF_DAGESH, LAMED_DAGESH, MEM_DAGESH, NUN_DAGESH, SAMEKH_DAGESH, FINAL_PE_DAGESH, PE_DAGESH, TSADI_DAGESH, QOF_DAGESH, RESH_DAGESH, SHIN_DAGESH, TAV_DAGESH, VAV_HOLAM, BET_RAFE, KAF_RAFE, PE_RAFE, ALEPH_LAMED, QAMATS_KATAN, YOD_TRIANGLE, JUDEO_SPANISH_VARIKA, ALTERNATIVE_PLUS_SIGN] module-attribute ל

Every instance of a character class. This is used for defining collections with list comprehensions based on the Chars metadata. It can be relied on as being a complete list of Unicode characters used in Hebrew (and Yiddish etc).

ALTERNATIVE_PLUS_SIGN = OtherChar(char='﬩', name='Alternative Plus Sign') module-attribute ל

An instance of OtherChar representing the character '﬩'.

ATNAH_HAFUKH = TaamimChar(char='֢', name='Atnah Hafukh') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֢'.

AYIN = HebrewChar(char='ע', name='Ayin', hebrew_name='עַיִן') module-attribute ל

An instance of HebrewChar representing the letter 'ע'.

AYIN_ALT = HebrewChar('ﬠ', name='Alternative Ayin') module-attribute ל

An instance of HebrewChar representing the letter 'ﬠ'. This is a rarely used special character.

AZLA_GERESH = TaamimChar(char='֜', name='Azla Geresh') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֜'.

BES = BET module-attribute ל

Simple pointer to BET.

BET = HebrewChar(char='בּ', name='Bet', hebrew_name='בֵּית', hebrew_name_alts=['בת']) module-attribute ל

An instance of HebrewChar representing the letter 'בּ'. This is not strictly a letter, but is included because it is often treated as one.

BET_DAGESH = HebrewChar('בּ', name='Bet with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'בּ'. This is a rarely used special character.

BET_RAFE = HebrewChar('בֿ', name='Bet with Rafe') module-attribute ל

An instance of HebrewChar representing the letter 'בֿ'. This is a rarely used special character.

BET_SYMBOL = HebrewChar('ℶ', name='Bet Symbol') module-attribute ל

An instance of HebrewChar representing the letter 'ℶ'. This is a rarely used special character.

CAF = HebrewChar(char='כּ', name='Kaf', hebrew_name='כַּף') module-attribute ל

An instance of HebrewChar representing the letter 'כּ'. This is not strictly a letter, but is included because it is often treated as one.

CHAF = HebrewChar(char='כ', name='Chaf', hebrew_name='כַף') module-attribute ל

An instance of HebrewChar representing the letter 'כ'.

CHAF_SOFIT = HebrewChar(char='ך', name='Chaf Sofit', final_letter=True, hebrew_name='כַף סוֹפִית', name_alts=['Final Chaf']) module-attribute ל

An instance of HebrewChar representing the letter 'ך'.

CHARS: Dict[str, Union[HebrewChar, YiddishChar, NiqqudChar, TaamimChar, OtherChar]] = {c.char: cfor c in ALL_CHARS} module-attribute ל

A dict of all instances of all supported Char types where the key is the char and the value is an instance of BaseHebrewChar. This is useful for when you have a hebrew char and want to get its metadata class.

assert CHARS['א'] == ALEPH

CHES = CHET module-attribute ל

Simple pointer to CHET.

CHET = HebrewChar(char='ח', name='Chet', hebrew_name='חֵית', hebrew_name_alts=['חת'], name_alts=['Het', 'Ches']) module-attribute ל

An instance of HebrewChar representing the letter 'ז'.

CHIRIK = HIRIQ module-attribute ל

Simple pointer to HIRIQ

DAGESH = NiqqudChar(char='ּ', name='Dagesh') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ּ'.

DALED = DALET module-attribute ל

Simple pointer to DALET.

DALET = HebrewChar(char='ד', name='Dalet', hebrew_name='דָלֶת', hebrew_name_alts=['דלית'], name_alts=['Daled']) module-attribute ל

An instance of HebrewChar representing the letter 'ד'.

DALET_DAGESH = HebrewChar('דּ', name='Dalet with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'דּ'. This is a rarely used special character.

DALET_SYMBOL = HebrewChar('ℸ', name='Dalet Symbol') module-attribute ל

An instance of HebrewChar representing the letter 'ℸ'. This is a rarely used special character.

DALET_WIDE = HebrewChar('ﬢ', name='Wide Dalet') module-attribute ל

An instance of HebrewChar representing the letter 'ﬢ'. This is a rarely used special character.

DARGA = TaamimChar(char='֧', name='Darga') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֧'.

DEHI = TaamimChar(char='֭', name='Dehi') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֭'.

DOUBLE_VAV = YiddishChar(char='װ', name='Double Vav', name_alts=['Double Vuv']) module-attribute ל

An instance of YiddishChar representing the letter 'װ'.

DOUBLE_VUV = DOUBLE_VAV module-attribute ל

Simple pointer to DOUBLE_VAV.

DOUBLE_YOD = YiddishChar(char='ײ', name='Double Yod', name_alts=['Saf']) module-attribute ל

An instance of YiddishChar representing the letter 'ײ'.

DOUBLE_YUD = DOUBLE_YOD module-attribute ל

Simple pointer to DOUBLE_YOD.

ETNAHTA = TaamimChar(char='֑', name='Etnahta') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֑'.

FE = HebrewChar(char='פ', name='Fe', hebrew_name='פֵא', hebrew_name_alts=['פי', 'פה']) module-attribute ל

An instance of HebrewChar representing the letter 'פ'.

FE_SOFIT = HebrewChar(char='ף', name='Fe Sofit', final_letter=True, hebrew_name='פֵא סוֹפִית', name_alts=['Final Fe']) module-attribute ל

An instance of HebrewChar representing the letter 'ף'.

FINAL_CHAF = CHAF_SOFIT module-attribute ל

Simple pointer to CHAF_SOFIT.

FINAL_FE = FE_SOFIT module-attribute ל

Simple pointer to FE_SOFIT.

FINAL_KAF = KAF_SOFIT module-attribute ל

Simple pointer to KAF_SOFIT.

FINAL_KAF_DAGESH = HebrewChar('ךּ', name='Final Kaf with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'ךּ'. This is a rarely used special character.

FINAL_LETTERS: List[HebrewChar] = [c for c in ALL_CHARS if isinstance(c, HebrewChar) and c.final_letter and len(c.char) == 1] module-attribute ל

A list of all Hebrew characters that are final letters. While we do have letters like 'ףּ' defined, they do not return in this array; it contains only the plain final letters.

FINAL_MEM = MEM_SOFIT module-attribute ל

Simple pointer to MEM_SOFIT.

FINAL_MEM_WIDE = HebrewChar('ﬦ', name='Wide Final Mem') module-attribute ל

An instance of HebrewChar representing the letter 'ﬦ'. This is a rarely used special character.

FINAL_MINOR_LETTER_MAPPINGS: Dict[str, str] = {'כ': 'ך', 'ך': 'כ', 'מ': 'ם', 'ם': 'מ', 'נ': 'ן', 'ן': 'נ', 'פ': 'ף', 'ף': 'פ', 'צ': 'ץ', 'ץ': 'צ'} module-attribute ל

A map of final letters to their regular counterparts, and vice versa.

FINAL_NUN = NUN_SOFIT module-attribute ל

Simple pointer to NUN_SOFIT.

FINAL_PE = PE_SOFIT module-attribute ל

Simple pointer to PE_SOFIT.

FINAL_PE_DAGESH = HebrewChar('ףּ', name='Final Pe with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'ףּ'. This is a rarely used special character.

FINAL_TSADI = TSADI_SOFIT module-attribute ל

Simple pointer to TSADI_SOFIT.

FINAL_TZADIK = TSADI_SOFIT module-attribute ל

Simple pointer to TSADI_SOFIT.

GERESH = OtherChar(char='׳', name='Geresh') module-attribute ל

An instance of OtherChar representing the character '׳'.

GERESH_MUQDAM = TaamimChar(char='֝', name='Geresh Muqdam') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֝'.

GERSHAYIM = OtherChar(char='״', name='Gershayim') module-attribute ל

An instance of OtherChar representing the character '״'.

GERSHAYIM_2 = TaamimChar(char='֞', name='Gershayim 2') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֞'.

GIMEL = HebrewChar(char='ג', name='Gimel', hebrew_name='גִימֵל', hebrew_name_alts=['גמל']) module-attribute ל

An instance of HebrewChar representing the letter 'ג'.

GIMEL_DAGESH = HebrewChar('גּ', name='Gimel with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'גּ'. This is a rarely used special character.

GIMEL_SYMBOL = HebrewChar('ℷ', name='Gimel Symbol') module-attribute ל

An instance of HebrewChar representing the letter 'ℷ'. This is a rarely used special character.

HATAF_PATAH = NiqqudChar(char='ֲ', name='Hataf Patah', name_alts=['Hataf Patach']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֲ'.

HATAF_QAMATS = NiqqudChar(char='ֳ', name='Hataf Qamatz', name_alts=['Hataf Kumatz']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֳ'.

HATAF_SEGOL = NiqqudChar(char='ֱ', name='Hataf Segol') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֱ'.

HE = HebrewChar(char='ה', name='He', hebrew_name='הֵא', hebrew_name_alts=['הי', 'הה'], name_alts=['Hei', 'Hey']) module-attribute ל

An instance of HebrewChar representing the letter 'ה'.

HEBREW_CHARS: List[HebrewChar] = [c for c in ALL_CHARS if isinstance(c, HebrewChar) and c.char in 'אבגדהוזחטיכךלמםנןסעפףצץקרשת'] module-attribute ל

A List of all instances of HebrewChar. This will include letters like 'ףּ'

HEI = HE module-attribute ל

Simple pointer to HE.

HET = CHET module-attribute ל

Simple pointer to CHET.

HEY = HE module-attribute ל

Simple pointer to HE.

HE_MAPIQ = HebrewChar('הּ', name='He with Mapiq') module-attribute ל

An instance of HebrewChar representing the letter 'הּ'. This is a rarely used special character.

HE_WIDE = HebrewChar('ﬣ', name='Wide He') module-attribute ל

An instance of HebrewChar representing the letter 'ﬣ'. This is a rarely used special character.

HIRIQ = NiqqudChar(char='ִ', name='Hiriq', name_alts=['Chirik']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ִ'.

HOLAM = NiqqudChar(char='ֹ', name='Holam') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֹ'.

HOLAM_HASER = NiqqudChar(char='ֺ', name='Holam Haser') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֺ'.

ILUY = TaamimChar(char='֬', name='Iluy') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֬'.

INVERTED_NUN = OtherChar(char='׆', name='Inverted Nun', hebrew_name='נו"ן מנוזרת', name_alts=['Nun Hafukha']) module-attribute ל

An instance of OtherChar representing the letter '׆'. This is a rarely used special character.

JUDEO_SPANISH_VARIKA = TaamimChar(char='ﬞ', name='Judeo-Spanish Varika') module-attribute ל

An instance of TaamimChar representing the Ta'amim 'ﬞ'.

KAF_DAGESH = HebrewChar('כּ', name='Kaf with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'כּ'. This is a rarely used special character.

KAF_RAFE = HebrewChar('כֿ', name='Kaf with Rafe') module-attribute ל

An instance of HebrewChar representing the letter 'כֿ'. This is a rarely used special character.

KAF_SOFIT = HebrewChar(char='ךּ', name='Kaf Sofit', final_letter=True, hebrew_name='כַּף סוֹפִית', name_alts=['Final Kaf']) module-attribute ל

An instance of HebrewChar representing the letter 'ךּ'. This is not strictly a letter, but is included because it is often treated as one.

KAF_WIDE = HebrewChar('ﬤ', name='Wide Kaf') module-attribute ל

An instance of HebrewChar representing the letter 'ﬤ'. This is a rarely used special character.

KUBUTZ = QUBUTS module-attribute ל

Simple pointer to QUBUTS

KUF = QOF module-attribute ל

Simple pointer to TSADI_SOFIT.

KUMATZ = QAMATS module-attribute ל

Simple pointer to QAMATS

LAMED = HebrewChar(char='ל', name='Lamed', hebrew_name='לָמֶד', name_alts=['Lamid']) module-attribute ל

An instance of HebrewChar representing the letter 'ל'.

LAMED_DAGESH = HebrewChar('לּ', name='Lamed with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'לּ'. This is a rarely used special character.

LAMED_WIDE = HebrewChar('ﬥ', name='Wide Lamed') module-attribute ל

An instance of HebrewChar representing the letter 'ﬥ'. This is a rarely used special character.

LAMID = LAMED module-attribute ל

Simple pointer to LAMED.

LOWER_DOT = NiqqudChar(char='ׅ', name='Lower Dot') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ׅ'.

MAHPACH = TaamimChar(char='֤', name='Mahpach') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֤'.

MAQAF = OtherChar(char='־', name='Maqaf') module-attribute ל

An instance of TaamimChar representing the character '־'.

MASORA = TaamimChar(char='֯', name='Masora') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֯'.

MEM = HebrewChar(char='מ', name='Mem', hebrew_name='מֵם') module-attribute ל

An instance of HebrewChar representing the letter 'מ'.

MEM_DAGESH = HebrewChar('מּ', name='Mem with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'מּ'. This is a rarely used special character.

MEM_SOFIT = HebrewChar(char='ם', name='Mem Sofit', final_letter=True, hebrew_name='מֵם סוֹפִית', name_alts=['Final Mem']) module-attribute ל

An instance of HebrewChar representing the letter 'ם'.

MERCHA = TaamimChar(char='֥', name='Mercha') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֥'.

MERCHA_KEFULA = TaamimChar(char='֦', name='Mercha Kefula') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֦'.

METEG = TaamimChar(char='ֽ', name='Meteg') module-attribute ל

An instance of TaamimChar representing the Ta'amim 'ֽ'.

MUNACH = TaamimChar(char='֣', name='Munach') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֣'.

NIQQUD_CHARS: List[NiqqudChar] = [c for c in ALL_CHARS if isinstance(c, NiqqudChar)] module-attribute ל

A List of all instances of NiqqudChar.

NUN = HebrewChar(char='נ', name='Nun', hebrew_name='נוּן') module-attribute ל

An instance of HebrewChar representing the letter 'נ'.

NUN_DAGESH = HebrewChar('נּ', name='Nun with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'נּ'. This is a rarely used special character.

NUN_HAFUKHA = INVERTED_NUN module-attribute ל

Simple pointer to INVERTED_NUN.

NUN_SOFIT = HebrewChar(char='ן', name='Nun Sofit', final_letter=True, hebrew_name='נוּן סוֹפִית', name_alts=['Final Nun']) module-attribute ל

An instance of HebrewChar representing the letter 'ן'.

OLA = TaamimChar(char='֫', name='Ola') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֫'.

OTHER_CHARS: List[OtherChar] = [c for c in ALL_CHARS if isinstance(c, OtherChar)] module-attribute ל

A List of all instances of OtherChar.

PASEQ = OtherChar(char='׀', name='Paseq') module-attribute ל

An instance of TaamimChar representing the character '׀'.

PASHTA = TaamimChar(char='֙', name='Pashta') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֙'.

PASHTA_2 = TaamimChar(char='֨', name='Pashta 2', name_alts=['Qadma']) module-attribute ל

An instance of TaamimChar representing the Ta'amim '֨'.

PATACH = PATAH module-attribute ל

Simple pointer to PATAH

PATAH = NiqqudChar(char='ַ', name='Patah', name_alts=['Patach']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ַ'.

PAZER = TaamimChar(char='֡', name='Pazer') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֡'.

PAZER_GADOL = QARNEY_PARA module-attribute ל

Simple pointer to QARNEY_PARA since they share the same Unicode character.

PE = HebrewChar(char='פּ', name='Pe', hebrew_name_alts=['פי', 'פה']) module-attribute ל

An instance of HebrewChar representing the letter 'פּ'. This is not strictly a letter, but is included because it is often treated as one.

PE_DAGESH = HebrewChar('פּ', name='Pe with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'פּ'. This is a rarely used special character.

PE_RAFE = HebrewChar('פֿ', name='Pe with Rafe') module-attribute ל

An instance of HebrewChar representing the letter 'פֿ'. This is a rarely used special character.

PE_SOFIT = HebrewChar(char='ףּ', name='Fe Sofit', final_letter=True, hebrew_name='פֵּא סוֹפִית', name_alts=['Final Pe']) module-attribute ל

An instance of HebrewChar representing the letter 'ףּ'. This is not strictly a letter, but is included because it is often treated as one.

PLAIN_SIN = HebrewChar(char='ש', name='Plain Sin', hebrew_name='שִׂן', hebrew_name_alts=['שִׂין']) module-attribute ל

An instance of HebrewChar representing the letter 'ש'.

QADMA = PASHTA_2 module-attribute ל

Simple pointer to PASHTA_2 since they share the same Unicode character.

QAMATS = NiqqudChar(char='ָ', name='Qamats', name_alts=['Kumatz']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ָ'.

QAMATS_KATAN = NiqqudChar(char='ׇ', name='Qamats Qatan', name_alts=['Kumatz Katan']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ׇ'.

QARNEY_PARA = TaamimChar(char='֟', name='Qarney Para', name_alts=['Pazer Gadol']) module-attribute ל

An instance of TaamimChar representing the Ta'amim '֟'.

QOF = HebrewChar(char='ק', name='Qof', hebrew_name='קוֹף', name_alts=['Kuf']) module-attribute ל

An instance of HebrewChar representing the letter 'ק'.

QOF_DAGESH = HebrewChar('קּ', name='Qof with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'קּ'. This is a rarely used special character.

QUBUTS = NiqqudChar(char='ֻ', name='Qubuts', name_alts=['Kubutz']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֻ'.

RAFE = TaamimChar(char='ֿ', name='Rafe') module-attribute ל

An instance of TaamimChar representing the Ta'amim 'ֿ'.

RESH = HebrewChar(char='ר', name='Resh', hebrew_name='רֵישׁ', hebrew_name_alts=['רש']) module-attribute ל

An instance of HebrewChar representing the letter 'ר'.

RESH_DAGESH = HebrewChar('רּ', name='Resh with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'רּ'. This is a rarely used special character.

RESH_WIDE = HebrewChar('ﬧ', name='Wide Resh') module-attribute ל

An instance of HebrewChar representing the letter 'ﬧ'. This is a rarely used special character.

REVIA = TaamimChar(char='֗', name='Revia') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֗'.

SAF = SAV module-attribute ל

Simple pointer to SAV.

SAMACH = SAMEKH module-attribute ל

Simple pointer to SAMEKH.

SAMEKH = HebrewChar(char='ס', name='Samekh', hebrew_name='סָמֶך', name_alts=['Samach']) module-attribute ל

An instance of HebrewChar representing the letter 'ס'.

SAMEKH_DAGESH = HebrewChar('סּ', name='Samekh with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'סּ'. This is a rarely used special character.

SAV = HebrewChar(char='ת', name='Sav', hebrew_name='תָו', name_alts=['Saf'], hebrew_name_alts=['תיו', 'תאו']) module-attribute ל

An instance of HebrewChar representing the letter 'ת'.

SEGOL = NiqqudChar(char='ֶ', name='Segol') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֶ'.

SEGOL_TOP = TaamimChar(char='֒', name='Segol Top') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֒'.

SHALSHELET = TaamimChar(char='֓', name='Shalshelet') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֓'.

SHEVA = NiqqudChar(char='ְ', name='Sheva', name_alts=['Shivah']) module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ְ'.

SHIN = HebrewChar(char='שׁ', name='Shin', hebrew_name='שִׁן', hebrew_name_alts=['שִׁין']) module-attribute ל

An instance of HebrewChar representing the letter 'שׁ'. This is not strictly a letter, but is included because it is often treated as one.

SHIN_DAGESH = HebrewChar('שּ', name='Shin with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'שּ'. This is a rarely used special character.

SHIN_DAGESH_SHIN_DOT = HebrewChar('שּׁ', name='Shin with Dagesh and Shin Dot') module-attribute ל

An instance of HebrewChar representing the letter 'שּׁ'. This is a rarely used special character.

SHIN_DAGESH_SIN_DOT = HebrewChar('שּׂ', name='Shin with Dagesh and Sin Dot') module-attribute ל

An instance of HebrewChar representing the letter 'שּׂ'. This is a rarely used special character.

SHIN_DOT = NiqqudChar(char='ׁ', name='Shin Dot') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ׁ'.

SHIN_SHIN_DOT = HebrewChar('שׁ', name='Shin with Shin Dot') module-attribute ל

An instance of HebrewChar representing the letter 'שׁ'. This is a rarely used special character.

SHIN_SIN_DOT = HebrewChar('שׂ', name='Shin with Sin Dot') module-attribute ל

An instance of HebrewChar representing the letter 'שׂ'. This is a rarely used special character.

SHIVAH = SHEVA module-attribute ל

Simple pointer to SHEVA

SHURUK = NiqqudChar(char='וּ', name='Shuruk') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'וּ'.

SIN = HebrewChar(char='שׂ', name='Sin', hebrew_name='שִׂן', hebrew_name_alts=['שִׂין']) module-attribute ל

An instance of HebrewChar representing the letter 'שׂ'. This is not strictly a letter, but is included because it is often treated as one.

SIN_DOT = NiqqudChar(char='ׂ', name='Sin Dot') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ׂ'.

SOF_PASSUK = OtherChar(char='׃', name='Sof Passuk') module-attribute ל

An instance of TaamimChar representing the character '׃'.

SPECIAL_CHARACTER_NORMALIZED_MAPPING: Dict[BaseHebrewChar, Union[BaseHebrewChar, List[BaseHebrewChar]]] = {ALEPH_SYMBOL: ALEPH, BET_SYMBOL: VET, GIMEL_SYMBOL: GIMEL, DALET_SYMBOL: DALET, YOD_YOD_PATAH: [YOD, PATAH, YOD], YOD_YOD_PATAH2: [YOD, PATAH, YOD], AYIN_ALT: AYIN, ALEF_WIDE: ALEPH, DALET_WIDE: DALET, HE_WIDE: HE, KAF_WIDE: CHAF, LAMED_WIDE: LAMED, FINAL_MEM_WIDE: FINAL_MEM, RESH_WIDE: RESH, TAV_WIDE: SAV, SHIN_SIN_DOT: SIN, SHIN_DAGESH_SHIN_DOT: [SHIN, DAGESH], SHIN_DAGESH_SIN_DOT: [SIN, DAGESH], ALEPH_LAMED: [ALEPH, LAMED], DOUBLE_YOD: [YOD, YOD], DOUBLE_VAV: [VAV, VAV], VAV_YOD: [YOD, VAV]} module-attribute ל

A map of special characters to their normal spelled out equivalent. For example, ﭏ becomes אל

TAAMIM_CHARS: List[TaamimChar] = [c for c in ALL_CHARS if isinstance(c, TaamimChar)] module-attribute ל

A List of all instances of TaamimChar.

TAF = TAV module-attribute ל

Simple pointer to TAV.

TAV = HebrewChar(char='תּ', name='Tav', hebrew_name='תּו', hebrew_name_alts=['תיו', 'תאו'], name_alts=['Taf']) module-attribute ל

An instance of HebrewChar representing the letter 'תּ'. This is not strictly a letter, but is included because it is often treated as one.

TAV_DAGESH = HebrewChar('תּ', name='Tav with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'תּ'. This is a rarely used special character.

TAV_WIDE = HebrewChar('ﬨ', name='Wide Tav') module-attribute ל

An instance of HebrewChar representing the letter 'ﬨ'. This is a rarely used special character.

TELISHA_GEDOLA = TaamimChar(char='֠', name='Telisha Gedola') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֠'.

TELISHA_KETANNAH = TaamimChar(char='֩', name='Telisha Ketannah') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֩'.

TES = TET module-attribute ל

Simple pointer to TET.

TET = HebrewChar(char='ט', name='Tet', hebrew_name='טֵית', hebrew_name_alts=['טת'], name_alts=['Tes']) module-attribute ל

An instance of HebrewChar representing the letter 'ט'.

TET_DAGESH = HebrewChar('טּ', name='Tet with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'טּ'. This is a rarely used special character.

TEVIR = TaamimChar(char='֛', name='Tevir') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֛'.

TIFCHA = TaamimChar(char='֖', name='Tifcha') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֖'.

TSADI = HebrewChar(char='צ', name='Tsadi', hebrew_name='צַדִי', hebrew_name_alts=['צדיק'], name_alts=['Tzadik']) module-attribute ל

An instance of HebrewChar representing the letter 'צ'.

TSADI_DAGESH = HebrewChar('צּ', name='Tsadi with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'צּ'. This is a rarely used special character.

TSADI_SOFIT = HebrewChar(char='ץ', name='Tsadi Sofit', final_letter=True, hebrew_name='צַדִי סוֹפִית', hebrew_name_alts=['צדיק סופית']) module-attribute ל

An instance of HebrewChar representing the letter 'ץ'.

TSERE = NiqqudChar(char='ֵ', name='Tsere') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ֵ'.

TZADIK = TSADI module-attribute ל

Simple pointer to TSADI.

TZADIK_SOFIT = TSADI_SOFIT module-attribute ל

Simple pointer to TSADI_SOFIT.

UPPER_DOT = NiqqudChar(char='ׄ', name='Upper Dot') module-attribute ל

An instance of NiqqudChar representing the Niqqud 'ׄ'.

VAV = HebrewChar(char='ו', name='Vav', hebrew_name='וָו', hebrew_name_alts=['ויו', 'ואו'], name_alts=['Vuv']) module-attribute ל

An instance of HebrewChar representing the letter 'ו'.

VAV_DAGESH = HebrewChar('וּ', name='Vav with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'וּ'. This is a rarely used special character.

VAV_HOLAM = HebrewChar('וֹ', name='Vav with Holam') module-attribute ל

An instance of HebrewChar representing the letter 'וֹ'. This is a rarely used special character.

VAV_YOD = YiddishChar(char='ױ', name='Vav Yod') module-attribute ל

An instance of YiddishChar representing the letter 'ױ'.

VAV_YUD = VAV_YOD module-attribute ל

Simple pointer to VAV_YOD.

VET = HebrewChar(char='ב', name='Vet', hebrew_name='בֵית', hebrew_name_alts=['בת']) module-attribute ל

An instance of HebrewChar representing the letter 'ב'.

VUV = VAV module-attribute ל

Simple pointer to VAV.

VUV_YOD = VAV_YOD module-attribute ל

Simple pointer to VAV_YOD.

VUV_YUD = VAV_YOD module-attribute ל

Simple pointer to VAV_YOD.

YERACH_BEN_YOMO = TaamimChar(char='֪', name='Yerach Ben Yomo') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֪'.

YETIV = TaamimChar(char='֚', name='Yetiv') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֚'.

YIDDISH_CHARS: List[YiddishChar] = [c for c in ALL_CHARS if isinstance(c, YiddishChar) and c.char in ['ױ', 'װ', 'ײ']] module-attribute ל

A List of all instances of YiddishChar.

YOD = HebrewChar(char='י', name='Yod', hebrew_name='יוֹד', name_alts=['Yud']) module-attribute ל

An instance of HebrewChar representing the letter 'י'.

YOD_DAGESH = HebrewChar('יּ', name='Yod with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'יּ'. This is a rarely used special character.

YOD_HIRIQ = HebrewChar('יִ', name='Yod with Hiriq') module-attribute ל

An instance of HebrewChar representing the letter 'יִ'. This is a rarely used special character.

YOD_TRIANGLE = HebrewChar(char='ׯ', name='Yod Triangle', name_alts=['Yud Triangle']) module-attribute ל

An instance of HebrewChar representing the letter 'ׯ'.

YOD_YOD_PATAH = YiddishChar('ײַ', name='Yod Yod Patah') module-attribute ל

An instance of YiddishChar representing the letter 'ײַ'. This is a rarely used special character.

YOD_YOD_PATAH2 = YiddishChar('ײַ', name='Yod Yod Patah') module-attribute ל

An instance of YiddishChar representing the letters 'ײַ'. This is a variation of YOD_YOD_PATAH made up of a double Yud, and a Patah.

YUD = YOD module-attribute ל

Simple pointer to YOD.

YUD_TRIANGLE = YOD_TRIANGLE module-attribute ל

Simple pointer to YOD_TRIANGLE.

ZAQEF_GADOL = TaamimChar(char='֕', name='Zaqef Gadol') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֕'.

ZAQEF_QATAN = TaamimChar(char='֔', name='Zaqef Qatan') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֔'.

ZARQA = TaamimChar(char='֘', name='Zarqa') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֘'.

ZAYIN = HebrewChar(char='ז', name='Zayin', hebrew_name='זַיִן') module-attribute ל

An instance of HebrewChar representing the letter 'ז'.

ZAYIN_DAGESH = HebrewChar('זּ', name='Zayin with Dagesh') module-attribute ל

An instance of HebrewChar representing the letter 'זּ'. This is a rarely used special character.

ZINOR = TaamimChar(char='֮', name='Zinor') module-attribute ל

An instance of TaamimChar representing the Ta'amim '֮'.

BaseHebrewChar dataclass ל

Base class with the metadata that all Hebrew characters share. This class should be used internally by hebrew.Chars only.

Source code in hebrew/chars.py
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@dataclass
class BaseHebrewChar:
    """
    Base class with the metadata that all Hebrew characters share.
    This class should be used internally by `hebrew.Chars` only.
    """

    char: str
    """Unicode character(s) for this class instance."""

    name: str
    """Primary name of the character in English."""

    hebrew_name: Optional[str] = None
    """
    Primary name of the character in Hebrew.

    The choice of primary name is non trivial as it is used as the primary spelling 
    for the Mispar Shemi Gematria method.
    """

    name_alts: Optional[List[str]] = None
    """Alternative names of the character in English."""

    hebrew_name_alts: Optional[List[str]] = None
    """Alternative names of the character in Hebrew."""

    @property
    def hebrew_names(self) -> List[str]:
        """
        All Hebrew names for this character.
        :return: A list of all Hebrew names for this character made up of the `hebrew_name` and `hebrew_name_alts`.
        """
        return [self.hebrew_name] + (self.hebrew_name_alts or [])

    @property
    def names(self) -> List[str]:
        """
        All english names for this character.
        :return: A list of all english names for this character made up of the `name` and `name_alts`.
        """
        return [self.name] + (self.name_alts or [])

    def __str__(self):
        return self.char

char: str instance-attribute ל

Unicode character(s) for this class instance.

hebrew_name: Optional[str] = None class-attribute instance-attribute ל

Primary name of the character in Hebrew.

The choice of primary name is non trivial as it is used as the primary spelling for the Mispar Shemi Gematria method.

hebrew_name_alts: Optional[List[str]] = None class-attribute instance-attribute ל

Alternative names of the character in Hebrew.

hebrew_names: List[str] property ל

All Hebrew names for this character.

Returns:

  • List[str]

    A list of all Hebrew names for this character made up of the hebrew_name and hebrew_name_alts.

name: str instance-attribute ל

Primary name of the character in English.

name_alts: Optional[List[str]] = None class-attribute instance-attribute ל

Alternative names of the character in English.

names: List[str] property ל

All english names for this character.

Returns:

  • List[str]

    A list of all english names for this character made up of the name and name_alts.

HebrewChar dataclass ל

Bases: BaseHebrewChar

A class representing characters that are part of the Hebrew alphabet (to the exclusion of Nekuds, etc).

Source code in hebrew/chars.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
@dataclass
class HebrewChar(BaseHebrewChar):
    """
    A class representing characters that are part of the Hebrew alphabet (to the exclusion of Nekuds, etc).
    """

    final_letter: bool = False
    """Whether or not the letter is a "final" or "Sofit" letter."""

    @property
    def base_letter(self) -> "HebrewChar":
        """
        Returns the base letter of the character.

        This library provides HebrewChar values for both standard Hebrew letters and user-perceived letters such as "בּ".
        This property will always return the base letter of the HebrewChar instance, in the above example, "ב".

        :return: An instance of `HebrewChar` representing a single unicode character; the base letter of
         this instance of `HebrewChar`.
        """
        return CHARS[self.char[0]]

    @property
    def mispar_hechrachi(self) -> int:
        """
        :return: The value of the character for use in the mispar_hechrachi method of gematria.
        """
        return MISPAR_HECHRACHI.get(self.base_letter.char)

    @property
    def mispar_gadol(self) -> int:
        """
        :return: The value of the character for use in the mispar_gadol method of gematria.
        """
        return MISPAR_GADOL.get(self.base_letter.char)

    @property
    def mispar_siduri(self) -> int:
        """
        :return: The value of the character for use in the mispar_siduri method of gematria.
        """
        return MISPAR_SIDURI.get(self.base_letter.char)

    @property
    def mispar_katan(self) -> int:
        """
        :return: The value of the character for use in the mispar_katan method of gematria.
        """
        return MISPAR_KATAN.get(self.base_letter.char)

    @property
    def mispar_perati(self) -> int:
        """
        :return: The value of the character for use in the mispar_perati method of gematria.
        """
        return MISPAR_PERATI.get(self.base_letter.char)

    @property
    def atbash(self) -> int:
        """
        :return: The value of the character for use in the AtBash method of gematria.
        """
        return ATBASH.get(self.base_letter.char)

    @property
    def albam(self) -> int:
        """
        :return: The value of the character for use in the AtBash method of gematria.
        """
        return ALBAM.get(self.base_letter.char)

    @property
    def mispar_meshulash(self) -> int:
        """
        :return: The value of the character for use in the AtBash method of gematria.
        """
        return MISPAR_MESHULASH.get(self.base_letter.char)

    @property
    def mispar_kidmi(self) -> int:
        """
        :return: The value of the character for use in the mispar_kidmi method of gematria.
        """
        return MISPAR_KIDMI.get(self.base_letter.char)

    @property
    def mispar_mispari(self) -> int:
        """
        :return: The value of the character for use in the mispar_mispari method of gematria.
        """
        return MISPAR_MISPARI.get(self.base_letter.char)

    @property
    def ayak_bachar(self) -> int:
        """
        :return: The value of the character for use in the ayak_bachar method of gematria.
        """
        return AYAK_BACHAR.get(self.base_letter.char)

    @property
    def ofanim(self) -> int:
        """
        :return: The value of the character for use in the ofanim method of gematria.
        """
        return OFANIM.get(self.base_letter.char)

    @property
    def achas_beta(self) -> int:
        """
        :return: The value of the character for use in the achas_beta method of gematria.
        """
        return ACHAS_BETA.get(self.base_letter.char)

    @property
    def avgad(self) -> int:
        """
        :return: The value of the character for use in the avgad method of gematria.
        """
        return AVGAD.get(self.base_letter.char)

    @property
    def reverse_avgad(self) -> int:
        """
        :return: The value of the character for use in the reverse_avgad method of gematria.
        """
        return REVERSE_AVGAD.get(self.base_letter.char)

    @classmethod
    def search(cls, char_name: str) -> Optional["HebrewChar"]:
        """
        Searches for an instance of `HebrewChar` by name.
        The search input is case insensitive and is compared to `names` list for this search.

        To search for any Hebrew character, use `hebrew.chars.char_search`.

        :param char_name: A single string representing the name of the character to search for.
        :return: An instance of `HebrewChar` representing the character with the given name, or `None` if no
        character is found.
        """
        return char_search(char_name, HEBREW_CHARS)

    def __hash__(self):
        return hash(self.char)

achas_beta: int property ל

Returns:

  • int

    The value of the character for use in the achas_beta method of gematria.

albam: int property ל

Returns:

  • int

    The value of the character for use in the AtBash method of gematria.

atbash: int property ל

Returns:

  • int

    The value of the character for use in the AtBash method of gematria.

avgad: int property ל

Returns:

  • int

    The value of the character for use in the avgad method of gematria.

ayak_bachar: int property ל

Returns:

  • int

    The value of the character for use in the ayak_bachar method of gematria.

base_letter: HebrewChar property ל

Returns the base letter of the character.

This library provides HebrewChar values for both standard Hebrew letters and user-perceived letters such as "בּ". This property will always return the base letter of the HebrewChar instance, in the above example, "ב".

Returns:

  • HebrewChar

    An instance of HebrewChar representing a single unicode character; the base letter of this instance of HebrewChar.

final_letter: bool = False class-attribute instance-attribute ל

Whether or not the letter is a "final" or "Sofit" letter.

mispar_gadol: int property ל

Returns:

  • int

    The value of the character for use in the mispar_gadol method of gematria.

mispar_hechrachi: int property ל

Returns:

  • int

    The value of the character for use in the mispar_hechrachi method of gematria.

mispar_katan: int property ל

Returns:

  • int

    The value of the character for use in the mispar_katan method of gematria.

mispar_kidmi: int property ל

Returns:

  • int

    The value of the character for use in the mispar_kidmi method of gematria.

mispar_meshulash: int property ל

Returns:

  • int

    The value of the character for use in the AtBash method of gematria.

mispar_mispari: int property ל

Returns:

  • int

    The value of the character for use in the mispar_mispari method of gematria.

mispar_perati: int property ל

Returns:

  • int

    The value of the character for use in the mispar_perati method of gematria.

mispar_siduri: int property ל

Returns:

  • int

    The value of the character for use in the mispar_siduri method of gematria.

ofanim: int property ל

Returns:

  • int

    The value of the character for use in the ofanim method of gematria.

reverse_avgad: int property ל

Returns:

  • int

    The value of the character for use in the reverse_avgad method of gematria.

search(char_name) classmethod ל

Searches for an instance of HebrewChar by name. The search input is case insensitive and is compared to names list for this search.

To search for any Hebrew character, use hebrew.chars.char_search.

Parameters:

  • char_name (str) –

    A single string representing the name of the character to search for.

Returns:

  • Optional[HebrewChar]

    An instance of HebrewChar representing the character with the given name, or None if no character is found.

Source code in hebrew/chars.py
208
209
210
211
212
213
214
215
216
217
218
219
220
@classmethod
def search(cls, char_name: str) -> Optional["HebrewChar"]:
    """
    Searches for an instance of `HebrewChar` by name.
    The search input is case insensitive and is compared to `names` list for this search.

    To search for any Hebrew character, use `hebrew.chars.char_search`.

    :param char_name: A single string representing the name of the character to search for.
    :return: An instance of `HebrewChar` representing the character with the given name, or `None` if no
    character is found.
    """
    return char_search(char_name, HEBREW_CHARS)

NiqqudChar dataclass ל

Bases: BaseHebrewChar

A class representing Niqqud characters used in Hebrew and Yiddish text.

Source code in hebrew/chars.py
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
@dataclass
class NiqqudChar(BaseHebrewChar):
    """
    A class representing Niqqud characters used in Hebrew and Yiddish text.
    """

    @classmethod
    def search(cls, char_name: str) -> Optional["NiqqudChar"]:
        """
        Searches for an instance of `NiqqudChar` by name.
        The search input is case insensitive and is compared to `names` list for this search.

        To search for any Hebrew character, use `hebrew.chars.char_search`.

        :param char_name: A single string representing the name of the character to search for.
        :return: An instance of `NiqqudChar` representing the character with the given name, or `None` if no
        character is found.
        """
        return char_search(char_name, NIQQUD_CHARS)

    def __hash__(self):
        return hash(self.char)

search(char_name) classmethod ל

Searches for an instance of NiqqudChar by name. The search input is case insensitive and is compared to names list for this search.

To search for any Hebrew character, use hebrew.chars.char_search.

Parameters:

  • char_name (str) –

    A single string representing the name of the character to search for.

Returns:

  • Optional[NiqqudChar]

    An instance of NiqqudChar representing the character with the given name, or None if no character is found.

Source code in hebrew/chars.py
256
257
258
259
260
261
262
263
264
265
266
267
268
@classmethod
def search(cls, char_name: str) -> Optional["NiqqudChar"]:
    """
    Searches for an instance of `NiqqudChar` by name.
    The search input is case insensitive and is compared to `names` list for this search.

    To search for any Hebrew character, use `hebrew.chars.char_search`.

    :param char_name: A single string representing the name of the character to search for.
    :return: An instance of `NiqqudChar` representing the character with the given name, or `None` if no
    character is found.
    """
    return char_search(char_name, NIQQUD_CHARS)

OtherChar dataclass ל

Bases: BaseHebrewChar

A class representing the "other" or "uncharacterized" characters used in Hebrew (and Yiddish) text.

Source code in hebrew/chars.py
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
@dataclass
class OtherChar(BaseHebrewChar):
    """
    A class representing the "other" or "uncharacterized" characters used in Hebrew (and Yiddish) text.
    """

    @classmethod
    def search(cls, char_name: str) -> Optional["OtherChar"]:
        """
        Searches for an instance of `TaamimChar` by name.
        The search input is case insensitive and is compared to `names` list for this search.

        To search for any Hebrew character, use `hebrew.chars.char_search`.

        :param char_name: A single string representing the name of the character to search for.
        :return: An instance of `OtherChar` representing the character with the given name, or `None` if no
        character is found.
        """
        return char_search(char_name, OTHER_CHARS)

    def __hash__(self):
        return hash(self.char)

search(char_name) classmethod ל

Searches for an instance of TaamimChar by name. The search input is case insensitive and is compared to names list for this search.

To search for any Hebrew character, use hebrew.chars.char_search.

Parameters:

  • char_name (str) –

    A single string representing the name of the character to search for.

Returns:

  • Optional[OtherChar]

    An instance of OtherChar representing the character with the given name, or None if no character is found.

Source code in hebrew/chars.py
305
306
307
308
309
310
311
312
313
314
315
316
317
@classmethod
def search(cls, char_name: str) -> Optional["OtherChar"]:
    """
    Searches for an instance of `TaamimChar` by name.
    The search input is case insensitive and is compared to `names` list for this search.

    To search for any Hebrew character, use `hebrew.chars.char_search`.

    :param char_name: A single string representing the name of the character to search for.
    :return: An instance of `OtherChar` representing the character with the given name, or `None` if no
    character is found.
    """
    return char_search(char_name, OTHER_CHARS)

TaamimChar dataclass ל

Bases: BaseHebrewChar

A class representing the "Trup" or Hebrew cantillation characters used alongside Hebrew letters.

Source code in hebrew/chars.py
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
@dataclass
class TaamimChar(BaseHebrewChar):
    """
    A class representing the "Trup" or [Hebrew cantillation](https://en.wikipedia.org/wiki/Hebrew_cantillation)
    characters used alongside Hebrew letters.
    """

    @classmethod
    def search(cls, char_name: str) -> Optional["TaamimChar"]:
        """
        Searches for an instance of `TaamimChar` by name.
        The search input is case insensitive and is compared to `names` list for this search.

        To search for any Hebrew character, use `hebrew.chars.char_search`.

        :param char_name: A single string representing the name of the character to search for.
        :return: An instance of `TaamimChar` representing the character with the given name, or `None` if no
        character is found.
        """
        return char_search(char_name, TAAMIM_CHARS)

    def __hash__(self):
        return hash(self.char)

search(char_name) classmethod ל

Searches for an instance of TaamimChar by name. The search input is case insensitive and is compared to names list for this search.

To search for any Hebrew character, use hebrew.chars.char_search.

Parameters:

  • char_name (str) –

    A single string representing the name of the character to search for.

Returns:

  • Optional[TaamimChar]

    An instance of TaamimChar representing the character with the given name, or None if no character is found.

Source code in hebrew/chars.py
281
282
283
284
285
286
287
288
289
290
291
292
293
@classmethod
def search(cls, char_name: str) -> Optional["TaamimChar"]:
    """
    Searches for an instance of `TaamimChar` by name.
    The search input is case insensitive and is compared to `names` list for this search.

    To search for any Hebrew character, use `hebrew.chars.char_search`.

    :param char_name: A single string representing the name of the character to search for.
    :return: An instance of `TaamimChar` representing the character with the given name, or `None` if no
    character is found.
    """
    return char_search(char_name, TAAMIM_CHARS)

YiddishChar dataclass ל

Bases: BaseHebrewChar

A class representing special characters used in Yiddish text.

Source code in hebrew/chars.py
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
@dataclass
class YiddishChar(BaseHebrewChar):
    """
    A class representing special characters used in Yiddish text.
    """

    @classmethod
    def search(cls, char_name: str) -> Optional["YiddishChar"]:
        """
        Searches for an instance of `YiddishChar` by name.
        The search input is case insensitive and is compared to `names` list for this search.

        To search for any Hebrew character, use `hebrew.chars.char_search`.

        :param char_name: A single string representing the name of the character to search for.
        :return: An instance of `YiddishChar` representing the character with the given name, or `None` if no
        character is found.
        """
        return char_search(char_name, YIDDISH_CHARS)

    def __hash__(self):
        return hash(self.char)

search(char_name) classmethod ל

Searches for an instance of YiddishChar by name. The search input is case insensitive and is compared to names list for this search.

To search for any Hebrew character, use hebrew.chars.char_search.

Parameters:

  • char_name (str) –

    A single string representing the name of the character to search for.

Returns:

  • Optional[YiddishChar]

    An instance of YiddishChar representing the character with the given name, or None if no character is found.

Source code in hebrew/chars.py
232
233
234
235
236
237
238
239
240
241
242
243
244
@classmethod
def search(cls, char_name: str) -> Optional["YiddishChar"]:
    """
    Searches for an instance of `YiddishChar` by name.
    The search input is case insensitive and is compared to `names` list for this search.

    To search for any Hebrew character, use `hebrew.chars.char_search`.

    :param char_name: A single string representing the name of the character to search for.
    :return: An instance of `YiddishChar` representing the character with the given name, or `None` if no
    character is found.
    """
    return char_search(char_name, YIDDISH_CHARS)

Search for a character by its name.

Character classes contain alternate names which are supported by this function! Currently, only english names are supported. TODO: Support search in hebrew, which will need to support hebrew text with or without nikud.

Parameters:

  • char_name (str) –

    A string containing the name of the character to search for.

  • char_list (Optional[List[Union[HebrewChar, YiddishChar, NiqqudChar, TaamimChar, OtherChar]]], default: None ) –

    A list of BaseHebrewChar characters to use for this search. When None, defaults to all characters (ALL_CHARS).

Returns:

Source code in hebrew/chars.py
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
def char_search(
    char_name: str,
    char_list: Optional[
        List[Union[HebrewChar, YiddishChar, NiqqudChar, TaamimChar, OtherChar]]
    ] = None,
) -> Optional[Union[HebrewChar, YiddishChar, NiqqudChar, TaamimChar, OtherChar]]:
    """
    Search for a character by its name.

    Character classes contain alternate names which are supported by this function!
    Currently, only english names are supported.
    TODO: Support search in hebrew, which will need to support hebrew text with or without nikud.

    :param char_name: A string containing the name of the character to search for.
    :param char_list: A list of `BaseHebrewChar` characters to use for this search.
    When None, defaults to all characters (ALL_CHARS).
    :return:
    """
    char_list = char_list if char_list else ALL_CHARS
    for char in char_list:
        if char_name.lower() in [n.lower() for n in char.names]:
            return CHARS[char.char]
    return None