'switch between \'intent\' and \'synonyms\' mode'

def set_current_state(self, state, value):

    if (state == u'intent'):
        self.current_intent = value
    elif (state == u'synonym'):
        self.current_intent = None
        self.entity_synonyms.append({u'value': value, u'synonyms': []})
    else:
        raise ValueError(u"State    must    be    either    'intent'    or    'synonym'")
