def read_collection(self, filename):
with open(filename, '<STR_LIT:rb>') as fd:<EOL><INDENT>lines = fd.read().decode('<STR_LIT>').splitlines()<EOL><DEDENT>collection = list(filter(bool, [line.strip() for line in lines]))<EOL>return collection<EOL>
Reads and returns a collection of stop words into a file.