docs: def convert_to_merged_ids(self, id_run):
          """
          Converts any identified phrases in the run into phrase_ids.  The dictionary provides all acceptable phrases
          :param id_run: a run of token ids
          :param dictionary: a dictionary of acceptable phrases described as there component token ids
          :return: a run of token and phrase ids.
          """
          i = 0
          rv = []
          while i < len(id_run):
              phrase_id, offset = self.max_phrase(id_run, i)
              if phrase_id:
                  rv.append(phrase_id)
                  i = offset
              else:
                  rv.append(id_run[i])
                  i += 1
          return rv