Skip to content

Commit

Permalink
fix reuse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kylepjohnson committed Feb 28, 2016
1 parent 9ee9125 commit d2494bd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cltk/tests/test_text_reuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ def test_distance_ratio(self):
def test_distance_sentences(self):
"""Test comparing two passages tokenized at the sentence level"""
t = TextReuse()
comparisons = t.compare_sentences(demo_verg, demo_prop)
self.assertEqual(comparisons[1][0]['ratio'], 0.39)
comparisons = t.compare_sentences(demo_verg, demo_prop, 'latin')
self.assertEqual(comparisons[1][0].ratio, 0.40)

def test_distance_sliding_window(self):
"""Test comparing two passages with the sliding window strategy"""
t = TextReuse()
comparisons = t.compare_sliding_window(demo_verg, demo_prop)
self.assertEqual(comparisons[19][3]['ratio'], 0.64)
self.assertEqual(comparisons[19][3].ratio, 0.64)


if __name__ == '__main__':
unittest.main()

0 comments on commit d2494bd

Please sign in to comment.