Your code is quite long (~2800 lines of code), so that it would be helpful if you could narrow down possible issues to some functions.
I’m not an NLP expert, but usually it helps me to scale down the problem, i.e. use a simple model, little dataset, and check my code for possible bugs.