INNER CODE UNIT · Python

ws_p

taishi-i/nagisa · nagisa/mecab_system_eval.py:91

    ws_p = round(100*ws_c/prec, 4)
    ws_r = round(100*ws_c/recall, 4)
    if ws_p+ws_r == 0:
        ws_f = round(0., 4)
    else:
        ws_f = round(2*ws_p*ws_r/(ws_p+ws_r), 4)

    pt_p = round(100*pt_c/prec, 4)
    pt_r = round(100*pt_c/recall, 4)
    if pt_p+pt_r == 0:
        pt_f = round(0., 4)
    else:
        pt_f = round(2*pt_p*pt_r/(pt_p+pt_r), 4)

    return [ws_p, ws_r, ws_f, pt_p, pt_r, pt_f]


def print_eval(r):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…