def shakl_compare(self, other): first = self.normalize_shaping(self) second = self.normalize_shaping(other) firstN = strip_tashkeel(first) secondN = strip_tashkeel(second) if firstN != secondN: return False else: l1 = self.list_harakat() l2 = other.list_harakat() return self.compare_harakat(l1, l2)
def shakl_compare( self, other ): first = self.normalize_shaping( self ) second = self.normalize_shaping( other ) firstN = strip_tashkeel( first ) secondN = strip_tashkeel( second ) if firstN != secondN: return False else: l1 = self.list_harakat() l2 = other.list_harakat() return self.compare_harakat( l1, l2 )
def normalize_all( self, text ): if self.__shaping: text = normalize_lamalef( text ) text = unicode_.normalize_shaping( text ) text = strip_tatweel( text ) if self.__tashkil: text = strip_tashkeel( text ) if self.__spellerrors: text = normalize_spellerrors( text ) if self.__hamza: text = normalize_hamza( text ) return text
def normalize_all(self, text): if self.__shaping: text = normalize_lamalef(text) text = unicode_.normalize_shaping(text) text = strip_tatweel(text) if self.__tashkil: text = strip_tashkeel(text) if self.__spellerrors: text = normalize_spellerrors(text) if self.__hamza: text = normalize_hamza(text) return text