ashkamath / mdetr

Apache License 2.0
969 stars 125 forks source link

How to generate `tokens_positive` for the sentence using Spacy in the Referring Expression Comprehension task? #77

Closed wettera closed 2 years ago

wettera commented 2 years ago

Hello, thank you for the great work. I would like to finetune on my own dataset. But I am not familiar with dependency parsing. I would be very grateful if you can provide the corresponding code for extracting the root of the sentence using Spacy.

wettera commented 2 years ago

I find the corresponding code in scripts/utils/text.py def get_root_and_nouns(text: str, lazy=True).