code: def add(self, phrase, id=None):
          
          if len(phrase) > 0 and type(phrase[0]) in (tuple, list):
              phrase = [token[0] for token in phrase]
          super(NounPhraseDictionary, self).add(phrase, id)
docs: Adds a new phrase to the dictionary
          :param phrase: the new phrase as a list of tokens
          :param phrase_id: optionally the phrase_id can be set on addition.  Beware, if you set one id you should set
              them all as the auto-generated ids do not take into account phrase_ids set this way.
          :return: None