Mar-04-2019, 01:55 AM
Your regexes start with '^', so they only match the beginning of the string. So even though you are using findall, they can only ever match once, because their is only one start of the string. Second, you are searching on the string 'negative.txt', not the contents of the file negative.txt. So the only work in neg_word_list is 'negative'. That's limiting your matches. You need to read the contents of the file with something like
negative_text = open('negative.txt').read()
.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures