Adjust the boundaries of the text map
        using the algorithm and parameters
        specified in the constructor,
        storing the sync map fragment list internally.

        :param dict aba_parameters: a dictionary containing the algorithm and its parameters,
                                    as produced by ``aba_parameters()`` in ``TaskConfiguration``
        :param boundary_indices: the current boundary indices,
                                 with respect to the audio file full MFCCs
        :type  boundary_indices: :class:`numpy.ndarray` (1D)
        :param real_wave_mfcc: the audio file MFCCs
        :type  real_wave_mfcc: :class:`~aeneas.audiofilemfcc.AudioFileMFCC`
        :param text_file: the text file containing the text fragments associated
        :type  text_file: :class:`~aeneas.textfile.TextFile`
        :param bool allow_arbitrary_shift: if ``True``, allow arbitrary shifts when adjusting zero length

        :rtype: list of :class:`~aeneas.syncmap.SyncMapFragmentList`

def adjust(
        self,
        aba_parameters,
        boundary_indices,
        real_wave_mfcc,
        text_file,
        allow_arbitrary_shift=False
    ):
        """
        Adjust the boundaries of the text map
        using the algorithm and parameters
        specified in the constructor,
        storing the sync map fragment list internally.

        :param dict aba_parameters: a dictionary containing the algorithm and its parameters,
                                    as produced by ``aba_parameters()`` in ``TaskConfiguration``
        :param boundary_indices: the current boundary indices,
                                 with respect to the audio file full MFCCs
        :type  boundary_indices: :class:`numpy.ndarray` (1D)
        :param real_wave_mfcc: the audio file MFCCs
        :type  real_wave_mfcc: :class:`~aeneas.audiofilemfcc.AudioFileMFCC`
        :param text_file: the text file containing the text fragments associated
        :type  text_file: :class:`~aeneas.textfile.TextFile`
        :param bool allow_arbitrary_shift: if ``True``, allow arbitrary shifts when adjusting zero length

        :rtype: list of :class:`~aeneas.syncmap.SyncMapFragmentList`
        """
        self.log(u"Called adjust")
        if boundary_indices is None:
            self.log_exc(u"boundary_indices is None", None, True, TypeError)
        if not isinstance(real_wave_mfcc, AudioFileMFCC):
            self.log_exc(u"real_wave_mfcc is not an AudioFileMFCC object", None, True, TypeError)
        if not isinstance(text_file, TextFile):
            self.log_exc(u"text_file is not a TextFile object", None, True, TypeError)

        nozero = aba_parameters["nozero"]
        ns_min, ns_string = aba_parameters["nonspeech"]
        algorithm, algo_parameters = aba_parameters["algorithm"]

        self.log(u"  Converting boundary indices to fragment list...")
        begin = real_wave_mfcc.middle_begin * real_wave_mfcc.rconf.mws
        end = real_wave_mfcc.middle_end * real_wave_mfcc.rconf.mws
        time_values = [begin] + list(boundary_indices * self.mws) + [end]
        self.intervals_to_fragment_list(
            text_file=text_file,
            time_values=time_values
        )
        self.log(u"  Converting boundary indices to fragment list... done")

        self.log(u"  Processing fragments with zero length...")
        self._process_zero_length(nozero, allow_arbitrary_shift)
        self.log(u"  Processing fragments with zero length... done")

        self.log(u"  Processing nonspeech fragments...")
        self._process_long_nonspeech(ns_min, ns_string, real_wave_mfcc)
        self.log(u"  Processing nonspeech fragments... done")

        self.log(u"  Adjusting...")
        ALGORITHM_MAP = {
            self.AFTERCURRENT: self._adjust_aftercurrent,
            self.AUTO: self._adjust_auto,
            self.BEFORENEXT: self._adjust_beforenext,
            self.OFFSET: self._adjust_offset,
            self.PERCENT: self._adjust_percent,
            self.RATE: self._adjust_rate,
            self.RATEAGGRESSIVE: self._adjust_rate_aggressive,
        }
        ALGORITHM_MAP[algorithm](real_wave_mfcc, algo_parameters)
        self.log(u"  Adjusting... done")

        self.log(u"  Smoothing...")
        self._smooth_fragment_list(real_wave_mfcc.audio_length, ns_string)
        self.log(u"  Smoothing... done")

        return self.smflist