Custom Dataloader for ABSA task

I am working on Aspect based sentiment analysis task. absa_SharedScreenshot
This is how my dataset looks. I want to pass “text” + “drug” as features and “sentiment” as label. I am using “TextList” for Databunch creation but it takes only a single column as input. I have used other other dataloader which append aspect word embedding to text but they are very very slow and also, I don’t want to miss on the text processing that fastai has to offer. So, I tried creating a custom dataloader which will use “TextList” for processing “text” and append “drug” word embedding to it. But I was unable to do so. If someone could help me with it like redirect me to some resources and links that I could refer to.

Also, If this custom dataloader works, it will make many other scenario’s possible were we have to stack multiple features demanding different types of pre-processing.
Thank you so very much :slight_smile:

Hi, did you make any progress with this, I have a similar task.

I didn’t finish it but I am planning on doing ABSA as a Sentence Pair Classification Task. Here is the example I was planning on trying out.

OK. Thanks for the lead.

1 Like