(hs_t, w2i, no_BE=False)
return w2i_hpu, l_hpu, l_hs
Zero-padded when word is not available (teated as <UNK>)
    Treat each "header tokens" as if they are NL-utterance tokens.
Zero-padded when word is not available (teated as <UNK>)
    Treat each "header tokens" as if they are NL-utterance tokens.
Zero - padded when word is not available ( teated as <UNK > ) Treat each header tokens as if they are NL - utterance tokens .
def hs_to_idx(hs_t, w2i, no_BE=False):
    """ Zero-padded when word is not available (teated as <UNK>)
    Treat each "header tokens" as if they are NL-utterance tokens.
    """

    bS = len(hs_t)  # now, B = B_NLq
    hpu_t = [] # header pseudo-utterance
    l_hs = []
    for hs_t1 in hs_t:
        hpu_t  += hs_t1
        l_hs1 = len(hs_t1)
        l_hs.append(l_hs1)

    w2i_hpu, l_hpu = words_to_idx(hpu_t, w2i, no_BE=no_BE)
    return w2i_hpu, l_hpu, l_hs
def hs_to_idx ( hs_t , w2i , no_BE = False ) : bS = len ( hs_t ) # now, B = B_NLq hpu_t = [ ] # header pseudo-utterance l_hs = [ ] for hs_t1 in hs_t : hpu_t += hs_t1 l_hs1 = len ( hs_t1 ) l_hs . append ( l_hs1 ) w2i_hpu , l_hpu = words_to_idx ( hpu_t , w2i , no_BE = no_BE ) return w2i_hpu , l_hpu , l_hs