import pandas as pd


sub_csv = pd.read_csv('../ESPF/subword_units_map_chembl.csv')
idx2word_d = sub_csv['index'].values
# words2idx_d = dict(zip(idx2word_d, range(0, len(idx2word_d))))

with open('../ESPF/vocab76.to', 'r') as f:
    prot_vocab = f.readlines()

with open('../ESPF/vocab.txt', 'w') as f:
    for prot in prot_vocab:
        f.write(prot.strip() + '\n')
with open('../ESPF/vocab.txt', 'a') as f:
    for drug in idx2word_d:
        f.write(drug + '\n')

