Generate dictionary for text.