def step_impl(context): split_words = context.phengim_with_space.split() string_builder = StringIO() for split_word in split_words: string_builder.write(split_word[0]) string_builder.seek(0) phengim_sujip = string_builder.read() context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): split_words = context.phengim_with_space.split() string_builder = StringIO() for split_word in split_words: if split_word.lower().startswith("chh"): string_builder.write(split_word[:3]) elif split_word.lower().startswith( "ch") or split_word.lower().startswith("ng"): string_builder.write(split_word[:2]) else: string_builder.write(split_word[0]) string_builder.seek(0) phengim_sujip = string_builder.read() context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): phengim_sujip = context.phengim_with_space.replace(" ", "").replace( "oa", "ua").replace("Oa", "Ua").replace("OA", "UA").replace( "oe", "ue").replace("Oe", "Ue").replace("OE", "UE") context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): phengim_sujip = context.phengim_with_space.replace(" ", "") context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): phengim_sujip = context.phengim_with_space.replace(" ", "").replace("ian", "en").replace("Ian", "En").replace("IAN", "EN").replace("iat", "et").replace("Iat", "Et").replace("IAT", "ET") context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context, phengim_sujip): context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): remove_digits = str.maketrans('', '', digits) phengim_sujip = context.phengim_with_space.replace( " ", "").translate(remove_digits) context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): phengim_sujip = context.phengim_with_space.replace(" ", "").replace( "chh", "tsh").replace("Chh", "Tsh").replace("CHH", "TSH").replace( "ch", "ts").replace("Ch", "Ts").replace("CH", "TS") context.out = RimeApiConsole.call(phengim_sujip) pass
def step_impl(context): phengim_sujip = context.phengim_with_space.replace(" ", "").replace("eng", "ing").replace("Eng", "Ing").replace("ENG", "ING").replace("ek", "ik").replace("Ek", "Ik").replace("EK", "IK") context.out = RimeApiConsole.call(phengim_sujip) pass