CrystalEye42 / OpenChemIE

MIT License
44 stars 5 forks source link

Question about using extract_molecule_corefs_from_figures #11

Closed yyh030806 closed 3 months ago

yyh030806 commented 4 months ago

I get this output when using extract_molecule_corefs_from_figures: output:

截屏2024-07-08 19 11 42

How can I get the identifier like README and achieve the function in the paper? README:

截屏2024-07-08 19 12 13

paper:

截屏2024-07-08 19 15 52

Thanks.

CrystalEye42 commented 3 months ago

Hello, the README was out of date and has been updated. The corefs returned are in the form [mol bbox index, idt bbox index], so to get the identifier, one could do something like

coref_idx = data['corefs'][i][1]
print(data['bboxes'][coref_idx]['text'])