import nltk f=open('my-file.txt','r') raw=f.read() tokens = nltk.word_tokenize(raw) faceapp = nltk.Text(tokens) faceapp.concordance('you')