(pr_wvi, nlu_t, nlu_wp_t, wp_to_wh_index, nlu)
return pr_wv_str, pr_wv_str_wp
- Convert to the string in whilte-space-separated tokens
    - Add-hoc addition.
- Convert to the string in whilte-space-separated tokens
    - Add-hoc addition.
- Convert to the string in whilte - space - separated tokens - Add - hoc addition .
def convert_pr_wvi_to_string(pr_wvi, nlu_t, nlu_wp_t, wp_to_wh_index, nlu):
    """
    - Convert to the string in whilte-space-separated tokens
    - Add-hoc addition.
    """
    pr_wv_str_wp = [] # word-piece version
    pr_wv_str = []
    for b, pr_wvi1 in enumerate(pr_wvi):
        pr_wv_str_wp1 = []
        pr_wv_str1 = []
        wp_to_wh_index1 = wp_to_wh_index[b]
        nlu_wp_t1 = nlu_wp_t[b]
        nlu_t1 = nlu_t[b]

        for i_wn, pr_wvi11 in enumerate(pr_wvi1):
            st_idx, ed_idx = pr_wvi11

            # Ad-hoc modification of ed_idx to deal with wp-tokenization effect.
            # e.g.) to convert "butler cc (" ->"butler cc (ks)" (dev set 1st question).
            pr_wv_str_wp11 = nlu_wp_t1[st_idx:ed_idx+1]
            pr_wv_str_wp1.append(pr_wv_str_wp11)

            st_wh_idx = wp_to_wh_index1[st_idx]
            ed_wh_idx = wp_to_wh_index1[ed_idx]
            pr_wv_str11 = nlu_t1[st_wh_idx:ed_wh_idx+1]

            pr_wv_str1.append(pr_wv_str11)

        pr_wv_str_wp.append(pr_wv_str_wp1)
        pr_wv_str.append(pr_wv_str1)

    return pr_wv_str, pr_wv_str_wp
def convert_pr_wvi_to_string ( pr_wvi , nlu_t , nlu_wp_t , wp_to_wh_index , nlu ) : pr_wv_str_wp = [ ] # word-piece version pr_wv_str = [ ] for b , pr_wvi1 in enumerate ( pr_wvi ) : pr_wv_str_wp1 = [ ] pr_wv_str1 = [ ] wp_to_wh_index1 = wp_to_wh_index [ b ] nlu_wp_t1 = nlu_wp_t [ b ] nlu_t1 = nlu_t [ b ] for i_wn , pr_wvi11 in enumerate ( pr_wvi1 ) : st_idx , ed_idx = pr_wvi11 # Ad-hoc modification of ed_idx to deal with wp-tokenization effect. # e.g.) to convert "butler cc (" ->"butler cc (ks)" (dev set 1st question). pr_wv_str_wp11 = nlu_wp_t1 [ st_idx : ed_idx + 1 ] pr_wv_str_wp1 . append ( pr_wv_str_wp11 ) st_wh_idx = wp_to_wh_index1 [ st_idx ] ed_wh_idx = wp_to_wh_index1 [ ed_idx ] pr_wv_str11 = nlu_t1 [ st_wh_idx : ed_wh_idx + 1 ] pr_wv_str1 . append ( pr_wv_str11 ) pr_wv_str_wp . append ( pr_wv_str_wp1 ) pr_wv_str . append ( pr_wv_str1 ) return pr_wv_str , pr_wv_str_wp