def convertData(self, tabNum, data): result = data if tabNum == 1: if self.cktol.isChecked(): result = ku.Hemwar().transliterate(result) elif self.cktoe.isChecked(): result = ku.Hemwar().Ku_Char_to_En(result) elif self.cetok.isChecked(): result = ku.Hemwar().En_Char_to_Ku(result) elif self.catok.isChecked(): result = ku.Hemwar().Ar_Char_to_Ku(result) elif self.caktok.isChecked(): result = ku.Hemwar().ali_k_to_uni(result) elif tabNum == 2: if self.cdetok.isChecked(): result = ku.Hemwar().En_Digit_to_Ku(result) elif self.cdktoe.isChecked(): result = ku.Hemwar().Ku_Digit_to_En(result) elif self.cdptok.isChecked(): result = ku.Hemwar().Fa_Digit_to_Ku(result) elif self.cdktop.isChecked(): result = ku.Hemwar().Ku_Digit_to_Fa(result) else: #Reusing kurdish.ku.Hemwar().getUniNum(self, x) # to get output instead of priting it to the console # #result = ku.Hemwar().getUniNum(result) result_ = result result = '' for i, char in enumerate(result_, start=1): try: result += str(i) + ". " + char + " = U+%04x " % ord(char) + name(char) except: result += str(i) + ". " + ' Error we couldn\'t get the Unicode code.' result += '\n' return result
Fixer().vev3, Fixer().vev, Fixer().vev2, Fixer().vev4, Fixer().e_start, Fixer().ee, Fixer().hee, Fixer().hee1, Fixer().hee2, Fixer().eww, Fixer().a_startt, Fixer().o_startt, Fixer().h_startt, Fixer().e_end, ) for func in all_funcs: content = func(content) return content with open("kurdi_words.txt", "r", encoding="utf-8") as f: for word in f: with open("new_list.txt", "a", encoding="utf-8") as f: if word: word = Fixer().result(ku.Hemwar().Ar_Char_to_Ku(word)) f.write(word) else: pass
def gv_clicked(self): result = [str(x) for x in ku.Hemwar().ku_all_V] self.out.setPlainText(json.dumps(result, ensure_ascii=False))
def gl_clicked(self): result = [str(x) for x in ku.Hemwar().ku_alphabet_La_uppercase] self.out.setPlainText(json.dumps(result, ensure_ascii=False))