CambridgeMolecularEngineering / chemdataextractor2

ChemDataExtractor Version 2.0
Other
120 stars 28 forks source link

Find entities from a list #15

Closed tcaceresm closed 2 years ago

tcaceresm commented 2 years ago

Hello everyone, I hope you are well. I bring you a question that I hope is basic! I have a list of a lot of entities. This is just a small example ['Aabaarnia', 'Aabaarnia siphulicola', 'Aaosphaeria', 'Aaosphaeria arxii', 'Abacina']

I'm creating some manual grammar rules to find a match with any of the entities in the list. Basically, I want to achieve this: I(Aabaarnia) | I(Aabaarnia siphulicola) | ... | I(n-entity) where | is the OR logic. I have tried without success, so I am attentive to every suggestion. Sorry for the non-technicality, I am new to bioinformatics and programming! Thanks in advance!

tcaceresm commented 2 years ago

Solved, the First() function found in chemdataextractor.parse.elements.py was the solution I needed.