def compare_longest_common_substring(self, other_text): """Gives the longest excerpt that this and any passed text have in common. Args: other_text (:obj:`str`) String for comparison Returns: :obj:`str` Longest common substring Example: >>> text = LatinText('Gallia est omnis divisa in partes tres') >>> print(text.compare_longest_common_substring('Galliae sunt omnis divisae in partes tres')) in partes tres """ # noqa from cltk.text_reuse.comparison import long_substring return long_substring(self.data, other_text)
def test_long_substring(self): """Test to check for the longest substring in the two passages""" substring = long_substring(demo_verg, demo_prop) self.assertEqual(substring, "dique deaeque omnes,")
def test_long_substring(self): """Test to check for the longest substring in the two passages""" substring = long_substring(demo_verg, demo_prop) self.assertEqual(substring,"dique deaeque omnes,")
def compare_longest_common_substring(self, other_text): return long_substring(self.data, other_text)