def dist_abs(<EOL>self, src, tar, qval=<NUM_LIT:2>, pval=<NUM_LIT:1>, normalized=False, alphabet=None<EOL>):
q_src, q_tar = self._get_qgrams(src, tar, qval)<EOL>diffs = ((q_src - q_tar) + (q_tar - q_src)).values()<EOL>normalizer = <NUM_LIT:1><EOL>if normalized:<EOL><INDENT>totals = (q_src + q_tar).values()<EOL>if alphabet is not None:<EOL><INDENT>normalizer = (<EOL>alphabet if isinstance(alphabet, Number) else len(alphabet)<EOL>)<EOL><DEDENT>elif pval == <NUM_LIT:0>:<EOL><INDENT>normalizer = len(totals)<EOL><DEDENT>else:<EOL><INDENT>normalizer = sum(_ ** pval for _ in totals) ** (<NUM_LIT:1> / pval)<EOL><DEDENT><DEDENT>if len(diffs) == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT>if pval == float('<STR_LIT>'):<EOL><INDENT>return max(diffs) / normalizer<EOL><DEDENT>if pval == <NUM_LIT:0>:<EOL><INDENT>return len(diffs) / normalizer<EOL><DEDENT>return sum(_ ** pval for _ in diffs) ** (<NUM_LIT:1> / pval) / normalizer<EOL>
Return the Minkowski distance (:math:`L^p`-norm) of two strings.

        Parameters
        ----------
        src : str
            Source string (or QGrams/Counter objects) for comparison
        tar : str
            Target string (or QGrams/Counter objects) for comparison
        qval : int
            The length of each q-gram; 0 for non-q-gram version
        pval : int or float
            The :math:`p`-value of the :math:`L^p`-space
        normalized : bool
            Normalizes to [0, 1] if True
        alphabet : collection or int
            The values or size of the alphabet

        Returns
        -------
        float
            The Minkowski distance

        Examples
        --------
        >>> cmp = Minkowski()
        >>> cmp.dist_abs('cat', 'hat')
        4.0
        >>> cmp.dist_abs('Niall', 'Neil')
        7.0
        >>> cmp.dist_abs('Colin', 'Cuilen')
        9.0
        >>> cmp.dist_abs('ATCG', 'TAGC')
        10.0