Using DataLoader for .txt files?


I’m trying to get into using pytorch for text classification. I’d like to use DataLoader for having a simpler way of using my training and test data.
Now it looks like this:

   -> NO (Label of all the text files in this folder)
      -> a.txt (Whole text)
      -> b.txt
   -> NW
   -> SO
   -> SW

   (Same as Training-Data)

I want to classify one whole text for its right label. So the thing is that every text has a different length, so I also need to padd the ones which are shorter.
Does anyone know how to do this? Or should I just convert it to .csv files? I’m clueless…

Thank you for your help! :slight_smile: