def determine_intent(self, utterance, num_results=<NUM_LIT:1>):
intents = []<EOL>for domain in self.domains:<EOL><INDENT>gen = self.domains[domain].determine_intent(utterance=utterance,<EOL>num_results=<NUM_LIT:1>)<EOL>for intent in gen:<EOL><INDENT>intents.append(intent)<EOL><DEDENT><DEDENT>heapq.nlargest(<EOL>num_results, intents, key=lambda domain: domain['<STR_LIT>'])<EOL>for intent in intents:<EOL><INDENT>yield intent<EOL><DEDENT>
Given an utterance, provide a valid intent.

utterance(str): an ascii or unicode string representing natural language speech
num_results(int): a maximum number of results to be returned.

Returns: A generator the yields dictionaries.