(unicode_char)
Converts a single Hebrew unicode character into its Hebrew numerical equivalent.
Converts a single Hebrew unicode character into its Hebrew numerical equivalent.
Converts a single Hebrew unicode character into its Hebrew numerical equivalent .
def heb_to_int(unicode_char):
	"""Converts a single Hebrew unicode character into its Hebrew numerical equivalent."""

	hebrew_numerals = {
		"\u05D0": 1,
		"\u05D1": 2,
		"\u05D2": 3,
		"\u05D3": 4,
		"\u05D4": 5,
		"\u05D5": 6,
		"\u05D6": 7,
		"\u05D7": 8,
		"\u05D8": 9,
		"\u05D9": 10,
		"\u05DB": 20,
		"\u05DC": 30,
		"\u05DE": 40,
		"\u05E0": 50,
		"\u05E1": 60,
		"\u05E2": 70,
		"\u05E4": 80,
		"\u05E6": 90,
		"\u05E7": 100,
		"\u05E8": 200,
		"\u05E9": 300,
		"\u05EA": 400,  	# u"\u05F3": "'", # Hebrew geresh  # u"\u05F4": '"', # Hebrew gershayim  # u"'":	   "'",
		"\u05DA": 20,		# khaf sofit
		"\u05DD": 40,		# mem sofit
		"\u05DF": 50, 		# nun sofit
		"\u05E3": 80, 		# peh sofit
		"\u05E5": 90, 		# tzadi sofit
	}

	if unicode_char not in list(hebrew_numerals.keys()):
		raise KeyError("Invalid Hebrew numeral character {}".format(unicode_char))

	else:
		return hebrew_numerals[unicode_char]
def heb_to_int ( unicode_char ) : hebrew_numerals = { "\u05D0" : 1 , "\u05D1" : 2 , "\u05D2" : 3 , "\u05D3" : 4 , "\u05D4" : 5 , "\u05D5" : 6 , "\u05D6" : 7 , "\u05D7" : 8 , "\u05D8" : 9 , "\u05D9" : 10 , "\u05DB" : 20 , "\u05DC" : 30 , "\u05DE" : 40 , "\u05E0" : 50 , "\u05E1" : 60 , "\u05E2" : 70 , "\u05E4" : 80 , "\u05E6" : 90 , "\u05E7" : 100 , "\u05E8" : 200 , "\u05E9" : 300 , "\u05EA" : 400 , # u"\u05F3": "'", # Hebrew geresh  # u"\u05F4": '"', # Hebrew gershayim  # u"'":	   "'", "\u05DA" : 20 , # khaf sofit "\u05DD" : 40 , # mem sofit "\u05DF" : 50 , # nun sofit "\u05E3" : 80 , # peh sofit "\u05E5" : 90 , # tzadi sofit } if unicode_char not in list ( hebrew_numerals . keys ( ) ) : raise KeyError ( "Invalid Hebrew numeral character {}" . format ( unicode_char ) ) else : return hebrew_numerals [ unicode_char ]