def norm_words(words):
	if not args.no_lowercase:
		words = (w.lower() for w in words)
	
	if not args.punctuation:
		words = (w.strip(string.punctuation) for w in words)
		words = (w for w in words if w)
	
	if stopset:
		words = (w for w in words if w.lower() not in stopset)
	
	# in case we modified words in a generator, ensure it's a list so we can add together
	if not isinstance(words, list):
		words = list(words)
	
	if args.ngrams:
		return functools.reduce(operator.add, [words if n is 1 else list(ngrams(words, n)) for n in args.ngrams])
	else:
		return words


#####################
## text extraction ##
#####################
dataset/ETHPy150Open japerk/nltk-trainer/train_classifier.py/norm_words/operator `==` -> `is`