Much nicer -

for d, doc in enumerate(self.texts): 

Same for below. You can also get rid of self.num_*