emits a word based on previous states (=token) and previous emissions (=words)
        The states and emissions are weighted according to their defined probabilities
            self.prob_hmm_states and self.prob_hmm_emissions

def _emitHMM_with_past(self, token_type, past_states, past_emissions):
        """ emits a word based on previous states (=token) and previous emissions (=words)
        The states and emissions are weighted according to their defined probabilities
            self.prob_hmm_states and self.prob_hmm_emissions"""
        assert token_type in self.emissions
        states_items = [(x[0], x[1] * self.prob_hmm_states)
                        for x in self.emissions[token_type].items()]
        key_emissions = tuple(past_emissions)
        if key_emissions in self.emissions_past[token_type]:
            states_emissions = [(x[0], x[1] * self.prob_hmm_emissions) for x in self.emissions_past[
                                token_type][tuple(past_emissions)].items()]
            return utils.weighted_choice(states_items + states_emissions)
        return utils.weighted_choice(states_items)