def sim(self, src: str, tar: str) -> float:
        """Return the Roberts similarity of two strings.

        Parameters
        ----------
        src : str
            Source string (or QGrams/Counter objects) for comparison
        tar : str
            Target string (or QGrams/Counter objects) for comparison

        Returns
        -------
        float
            Roberts similarity

        Examples
        --------
        >>> cmp = Roberts()
        >>> cmp.sim('cat', 'hat')
        0.5
        >>> cmp.sim('Niall', 'Neil')
        0.36363636363636365
        >>> cmp.sim('aluminum', 'Catalan')
        0.11764705882352941
        >>> cmp.sim('ATCG', 'TAGC')
        0.0


        .. versionadded:: 0.4.0

        """
        if src == tar:
            return 1.0

        self._tokenize(src, tar)

        alphabet = self._total().keys()

        return sum(
            (self._src_tokens[i] + self._tar_tokens[i])
            * min(self._src_tokens[i], self._tar_tokens[i])
            / max(self._src_tokens[i], self._tar_tokens[i])
            for i in alphabet
        ) / sum((self._src_tokens[i] + self._tar_tokens[i]) for i in alphabet)