How to make nGram in pytorch

I want to train dnn using bigram but I failed to create a way that can run using torch text or data loader.

Is there any way to make bigram that can be engaged with torch text and its classes like tabular data etc…

I reatched to this result

 ["[('email', 'yeah'), ('yeah', 'fast'), ('fast', 'extrem'), ('extrem', 'high'), ('high', 'damag'), ('damag', 'want'), ('want', 'fast'), ('fast', 'im'), ('im', 'gonna'), ('gonna', 'getyou')]"

but I don’t know how to train a pytorch network on this data, like how to numericalize it without accepting [] and () as string .
any idea that can fix it ?

Did you try using?
from nltk import bigrams

yes I tried, but it will be hard to work with torchtext because it will not know how to pad sequance or build vocabs etc…

is there any other way ?

if you know a method that work I will be so pleasure to here.