Esempio n. 1
0
 def test_term_permutations_with_repetition(self):
     predicate = Predicate(
         content="$organizer1 and $organizer2 planned for $organizer1 to play $game with $organizer2."
     )
     assert predicate.term_index_permutations() == [
         (0, 1, 2),
         (1, 0, 2),
     ]
Esempio n. 2
0
 def test_term_permutations(self):
     predicate = Predicate(
         content="$organizer1 and $organizer2 planned for $player1 to play $game with $player2."
     )
     assert predicate.term_index_permutations() == [
         (0, 1, 2, 3, 4),
         (0, 1, 4, 3, 2),
         (1, 0, 2, 3, 4),
         (1, 0, 4, 3, 2),
     ]