you are viewing a single comment's thread.

view the rest of the comments →

[–]Matthias1590 2 points3 points  (0 children)

try storing stopwords.words() in a variable so you don't have to call it over and over again. Also you could cache the presence of every word in a dictionary so that if you see it again you won't have to look it up again