(s_sc, s_sa, s_wn, s_wc, s_wo, s_wv, pr_sc, pr_sa, pr_wn, pr_wc, pr_wo, pr_wvi)
return p_tot, p_select, p_where, p_sc, p_sa, p_wn, p_wc, p_wo, p_wvi
:param s_sc: [B, l_h]
    :param s_sa: [B, l_a] # 16
    :param s_wn: [B, 5]
    :param s_wc: [B, l_h]
    :param s_wo: [B, 4, l_o] #
    :param s_wv: [B, 4, 22]
    :return:
def cal_prob(s_sc, s_sa, s_wn, s_wc, s_wo, s_wv, pr_sc, pr_sa, pr_wn, pr_wc, pr_wo, pr_wvi):
    """

    :param s_sc: [B, l_h]
    :param s_sa: [B, l_a] # 16
    :param s_wn: [B, 5]
    :param s_wc: [B, l_h]
    :param s_wo: [B, 4, l_o] #
    :param s_wv: [B, 4, 22]
    :return:
    """
    # First get selected index

    #

    # Predict prob
    p_sc = cal_prob_sc(s_sc, pr_sc)
    p_sa = cal_prob_sa(s_sa, pr_sa)
    p_wn = cal_prob_wn(s_wn, pr_wn)
    p_wc = cal_prob_wc(s_wc, pr_wc)
    p_wo = cal_prob_wo(s_wo, pr_wo)
    p_wvi = cal_prob_wvi_se(s_wv, pr_wvi)

    # calculate select-clause probability
    p_select = cal_prob_select(p_sc, p_sa)

    # calculate where-clause probability
    p_where  = cal_prob_where(p_wn, p_wc, p_wo, p_wvi)

    # calculate total probability
    p_tot = cal_prob_tot(p_select, p_where)

    return p_tot, p_select, p_where, p_sc, p_sa, p_wn, p_wc, p_wo, p_wvi
def cal_prob ( s_sc , s_sa , s_wn , s_wc , s_wo , s_wv , pr_sc , pr_sa , pr_wn , pr_wc , pr_wo , pr_wvi ) : # First get selected index # # Predict prob p_sc = cal_prob_sc ( s_sc , pr_sc ) p_sa = cal_prob_sa ( s_sa , pr_sa ) p_wn = cal_prob_wn ( s_wn , pr_wn ) p_wc = cal_prob_wc ( s_wc , pr_wc ) p_wo = cal_prob_wo ( s_wo , pr_wo ) p_wvi = cal_prob_wvi_se ( s_wv , pr_wvi ) # calculate select-clause probability p_select = cal_prob_select ( p_sc , p_sa ) # calculate where-clause probability p_where = cal_prob_where ( p_wn , p_wc , p_wo , p_wvi ) # calculate total probability p_tot = cal_prob_tot ( p_select , p_where ) return p_tot , p_select , p_where , p_sc , p_sa , p_wn , p_wc , p_wo , p_wvi