How to unpack pubmed_data.pkl ?

#1
by chidochipotle - opened

Hi @ATLASBIOINFO , could you share some code to unpack the pubmed_data.pkl file ?
I have tried to unpack it with modules such as python's pickle, panda's pickle, hugging face datasets, to no avail.

For example with panda's pickle I just get a list with a single TextNode object:

df = pd.read_pickle("pubmed_embeddings_project/pubmed_data.pkl")
df
[TextNode(id_='node-21-0', embedding=None, metadata={'title': "[Biochemical studies on camomile components/III. In vitro studies about the antipeptic activity of (--)-alpha-bisabolol (author's transl)].", 'author': 'Isaac et al.', 'pubmed': 21, 'date': 1976, 'key': 21, 'source': 'Pubmed'}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={: RelatedNodeInfo(node_id='5c685c9e-c571-4510-bef5-96febafd271d', node_type=, metadata={}, hash='ff7bd716a3d59f675240fc9d7456c391290a5a1192f739752413b8a59a30202f')}, text='(--)-alpha-Bisabolol has a primary antipeptic action depending on dosage, which is not caused by an alteration of the pH-value. The proteolytic activity of pepsin is reduced by 50 percent through addition of bisabolol in the ratio of 1/0.5. The antipeptic action of bisabolol only occurs in case of direct contact. In case of a previous contact with the substrate, the inhibiting effect is lost.', mimetype='text/plain', start_char_idx=0, end_char_idx=395, text_template='{metadata_str}\n\n{content}', metadata_template='{key}: {value}', metadata_seperator='\n')]

Thanks !

Sign up or log in to comment