(path_wikisql, bert=False)
return w2i, wemb
Load pre-made subset of TAPI.
Load pre-made subset of TAPI.
Load pre - made subset of TAPI .
def load_w2i_wemb(path_wikisql, bert=False):
    """ Load pre-made subset of TAPI.
    """
    if bert:
        with open(os.path.join(path_wikisql, 'w2i_bert.json'), 'r') as f_w2i:
            w2i = json.load(f_w2i)
        wemb = load(os.path.join(path_wikisql, 'wemb_bert.npy'), )
    else:
        with open(os.path.join(path_wikisql, 'w2i.json'), 'r') as f_w2i:
            w2i = json.load(f_w2i)

        wemb = load(os.path.join(path_wikisql, 'wemb.npy'), )
    return w2i, wemb
def load_w2i_wemb ( path_wikisql , bert = False ) : if bert : with open ( os . path . join ( path_wikisql , 'w2i_bert.json' ) , 'r' ) as f_w2i : w2i = json . load ( f_w2i ) wemb = load ( os . path . join ( path_wikisql , 'wemb_bert.npy' ) , ) else : with open ( os . path . join ( path_wikisql , 'w2i.json' ) , 'r' ) as f_w2i : w2i = json . load ( f_w2i ) wemb = load ( os . path . join ( path_wikisql , 'wemb.npy' ) , ) return w2i , wemb