Torchtext for custom dataset

I have my own dataset.py file (for loading the data in the memory and other preprocessing steps on the CPU) is that possible to use torchtext only for bucketing?