def parse_stop_word(source):
 result = set()
 for line in source.splitlines():
  line = line.split('|')[0]
  result.update(line.split())
 return result

def parse_stop_word ( source ) : result = set ( ) for line in source . splitlines ( ) : line = line . split ( '|' ) [ 0 ] result . update ( line . split ( ) ) return result
parse snowball style word list like this: * URL .