def category_words():
		cat_words = defaultdict([])
		for (words, cats) in train_instances:
			if isinstance(cats, collections.Iterable):
				for cat in cats:
					cat_words[cat].extend(words)
			else:
				cat_words[cats].extend(words)
		return iteritems(cat_words)
return an iteration of tuples of category and list of all words in instances of that category.
dataset/ETHPy150Open japerk/nltk-trainer/train_classifier.py/category_words