def test_invalid_input3(self):
     overlap_coefficient(None, None)
 def test_invalid_input1(self):
     overlap_coefficient(['a'], None)
 def test_invalid_input2(self):
     overlap_coefficient(None, ['b'])
 def time_medium_large_wi_rep(self):
     simfunctions.overlap_coefficient(_med_num_tokens_wo_rep, _large_num_tokens_wo_rep)
 def test_valid_input(self):
     self.assertEqual(overlap_coefficient([], []), 1.0)
     self.assertEqual(overlap_coefficient(['data', 'science'], ['data']), 1.0 / min(2.0, 1.0))
     self.assertEqual(overlap_coefficient(['data', 'science'], ['science', 'good']), 1.0 / min(2.0, 3.0))
     self.assertEqual(overlap_coefficient([], ['data']), 0)
     self.assertEqual(overlap_coefficient(['data', 'data', 'science'], ['data', 'management']), 1.0 / min(3.0, 2.0))
 def time_small_medium_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _med_num_tokens_wi_rep)
 def time_small_large_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _large_num_tokens_wi_rep)
Exemple #8
0
 def time_medium_medium_wi_rep(self):
     simfunctions.overlap_coefficient(_med_num_tokens_wi_rep, _med_num_tokens_wi_rep)
Exemple #9
0
 def time_large_large_wo_rep(self):
     simfunctions.overlap_coefficient(_large_num_tokens_wo_rep, _large_num_tokens_wo_rep)
Exemple #10
0
 def time_small_small_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _small_num_tokens_wi_rep)
 def time_small_small_wo_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wo_rep, _small_num_tokens_wo_rep)
Exemple #12
0
 def test_invalid_input3(self):
     overlap_coefficient(None, None)
Exemple #13
0
 def test_invalid_input2(self):
     overlap_coefficient(None, ['b'])
Exemple #14
0
 def test_invalid_input1(self):
     overlap_coefficient(['a'], None)