Is the right way to use data loader in nlp?

Here is my understanding of dataloaders -

  • create dataset class with getitem and len attributes
    • build vocab
    • convert words to ids
    • pad the sentence
    • convert it into tensor?
  • pass into data loader
  • pass it into the model
    is this right?

i am working on imdb dataset rn, i have the review, the rating and sentiment, so i do this, and do i have to do more, can anyone link a code that does this, or a tutorial for dataloaders in nlp. or can someone give a detailed step by step (explain like i am 5) of dataloaders.

Yes, this is standard list of steps in that order. You might want to look online for torchtext examples.

And more docs related to DataLoader and Sampler here
A tutorial here

those are not related to NLP. Why would you link that when the OP asked for nlp specific things

a tutorial for dataloaders in nlp

did you find an example/tutorial for NLP data loaders?