def step_impl(context, jisu1, jisu2):
    found_first_then_second = RimeApiConsole.output_candidates_fit_orders(
        context.out, jisu1, jisu2)
    if found_first_then_second:
        pass
    else:
        raise AssertionError('無照順序出現 {}, {} tī \n{}'.format(
            jisu1, jisu2, context.out))
Esempio n. 2
0
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
Esempio n. 3
0
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
Esempio n. 4
0
def step_impl(context, jisu):
    found_jisu = RimeApiConsole.output_exists_candidate(context.out, jisu)
    if found_jisu:
        pass
    else:
        raise AssertionError('無出現 {} tī \n{}'.format(jisu, context.out))
Esempio n. 5
0
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
Esempio n. 8
0
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
Esempio n. 10
0
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
Esempio n. 11
0
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