def create_ngrams(kw_iterable, max_n=False):
	"""takes a list of keywords and computes all possible ngrams e.g.
		in> ['nice', 'red', 'wine']
		out> [
			('nice',),
			('red',),
			('wine',),
			('nice', 'red'),
			('red', 'wine'),
			('nice', 'red', 'wine')
			]
	"""
	kwCount = len(kw_iterable)
	output = []
	for n in reversed(range(kwCount+1)[1:]):
		if n <= max_n:
			for tokenIndex in range(kwCount-n+1):
				output.append(tuple(kw_iterable[tokenIndex:tokenIndex+n]))
	return output