def similarity(self, other: '<STR_LIT>') -> float:
if not len(self._trigrams) or not len(other._trigrams):<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>count = float(len(self._trigrams & other._trigrams))<EOL>len1 = float(len(self._trigrams))<EOL>len2 = float(len(other._trigrams))<EOL>return count / (len1 + len2 - count)<EOL>
Compute the similarity with the provided other trigram.