def __resolveD(self, root: TxtWord, formation: str) -> str: if root.isAbbreviation(): return formation + 'd' if "0" <= self.__lastPhoneme(self.__formationToCheck) <= "9": if self.__lastPhoneme(self.__formationToCheck) == "3" or self.__lastPhoneme(self.__formationToCheck) == "4"\ or self.__lastPhoneme(self.__formationToCheck) == "5": return formation + 't' elif self.__lastPhoneme(self.__formationToCheck) == "0": if root.getName().endswith("40") or root.getName().endswith("60") or root.getName().endswith("70"): return formation + 't' else: return formation + 'd' else: return formation + 'd' else: if TurkishLanguage.isSertSessiz(self.__lastPhoneme(self.__formationToCheck)): return formation + 't' else: return formation + 'd'
def __resolveC(self, formation: str) -> str: """ The resolveC method takes a str formation as an input. If the last phoneme is on of the "çfhkpsşt", it concatenates given formation with 'ç', if not it concatenates given formation with 'c'. PARAMETERS ---------- formation : str String input. RETURNS ------- str Resolved String. """ if TurkishLanguage.isSertSessiz(self.__lastPhoneme(self.__formationToCheck)): return formation + 'ç' else: return formation + 'c'
def resolveC(self, formation: str) -> str: if TurkishLanguage.isSertSessiz( self.lastPhoneme(self.__formationToCheck)): return formation + 'ç' else: return formation + 'c'