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'])
Esempio n. 4
0
 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))
Esempio n. 6
0
 def time_small_medium_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _med_num_tokens_wi_rep)
Esempio n. 7
0
 def time_small_large_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _large_num_tokens_wi_rep)
Esempio n. 8
0
 def time_medium_medium_wi_rep(self):
     simfunctions.overlap_coefficient(_med_num_tokens_wi_rep, _med_num_tokens_wi_rep)
Esempio n. 9
0
 def time_large_large_wo_rep(self):
     simfunctions.overlap_coefficient(_large_num_tokens_wo_rep, _large_num_tokens_wo_rep)
Esempio n. 10
0
 def time_small_small_wi_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wi_rep, _small_num_tokens_wi_rep)
Esempio n. 11
0
 def time_small_small_wo_rep(self):
     simfunctions.overlap_coefficient(_small_num_tokens_wo_rep, _small_num_tokens_wo_rep)
Esempio n. 12
0
 def test_invalid_input3(self):
     overlap_coefficient(None, None)
Esempio n. 13
0
 def test_invalid_input2(self):
     overlap_coefficient(None, ['b'])
Esempio n. 14
0
 def test_invalid_input1(self):
     overlap_coefficient(['a'], None)