From ba1780b6f9d6b80b4940b2c58d611a9ff2a8afb0 Mon Sep 17 00:00:00 2001 From: Maxim Tarasov Date: Wed, 1 May 2024 12:50:30 -0700 Subject: [PATCH] using frequency 0 in place of explicit negation in tests --- Tests/test_NAL/test_NAL3.py | 16 ++++++++-------- Tests/test_NAL/test_NAL5.py | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Tests/test_NAL/test_NAL3.py b/Tests/test_NAL/test_NAL3.py index 76f5e1c..d737edf 100644 --- a/Tests/test_NAL/test_NAL3.py +++ b/Tests/test_NAL/test_NAL3.py @@ -150,7 +150,7 @@ def test_compound_decomposition_intensional_intersection(self): ''' tasks_derived = process_two_premises( ' (|,bird,swimmer)>. %1.00;0.90%', - '(--, swimmer>). %1.00;0.90%', + ' swimmer>. %0.00;0.90%', 20 ) self.assertTrue( @@ -160,7 +160,7 @@ def test_compound_decomposition_intensional_intersection(self): nars.reset() tasks_derived = process_two_premises( - '(--, swimmer>). %1.00;0.90%', + ' swimmer>. %0.00;0.90%', ' (|,bird,swimmer)>. %1.00;0.90%', 20 ) @@ -186,23 +186,23 @@ def test_compound_decomposition_extensional_difference(self): ''outputMustContain(' mammal>. %0.00;0.81%') ''' tasks_derived = process_two_premises( - '(--, swimmer>). %1.00;0.90%', - '(--, (-,mammal,swimmer)>). %1.00;0.90%', + ' swimmer>. %0.00;0.90%', + ' (-,mammal,swimmer)>. %0.00;0.90%', 32 ) self.assertTrue( - output_contains(tasks_derived, '(--, mammal>). %1.00;0.81%') + output_contains(tasks_derived, ' mammal>. %0.00;0.81%') ) nars.reset() tasks_derived = process_two_premises( - '(--, (-,mammal,swimmer)>). %1.00;0.90%', - '(--, swimmer>). %1.00;0.90%', + ' (-,mammal,swimmer)>. %0.00;0.90%', + ' swimmer>. %0.00;0.90%', 32 ) self.assertTrue( - output_contains(tasks_derived, '(--, mammal>). %1.00;0.81%') + output_contains(tasks_derived, ' mammal>. %0.00;0.81%') ) pass diff --git a/Tests/test_NAL/test_NAL5.py b/Tests/test_NAL/test_NAL5.py index 15d2671..9d767ce 100644 --- a/Tests/test_NAL/test_NAL5.py +++ b/Tests/test_NAL/test_NAL5.py @@ -557,12 +557,12 @@ def test_decomposition_0(self): ''outputMustContain('< bird> ==> animal>>. %0.00;0.81%') ''' tasks_derived = process_two_premises( - '(--, < bird> ==> (&&, animal>, [flying]>)>). %1.00;0.90%', + '< bird> ==> (&&, animal>, [flying]>)>. %0.00;0.90%', '< bird> ==> [flying]>>. %1.00;0.90%', - 10 + 200 ) self.assertTrue( - output_contains(tasks_derived, '(--, < bird> ==> animal>>). %1.00;0.81%') + output_contains(tasks_derived, '< bird> ==> animal>>. %0.00;0.81%') ) pass @@ -583,23 +583,23 @@ def test_decomposition_1(self): ''outputMustContain(' swimmer>. %0.00;0.81%') ''' tasks_derived = process_two_premises( - '(--, (&&, [flying]>, swimmer>)). %1.00;0.90% ', + '(&&, [flying]>, swimmer>). %0.00;0.90% ', ' [flying]>. %1.00;0.90%', - 20 + 100 ) self.assertTrue( - output_contains(tasks_derived, '(--, swimmer>). %1.00;0.81%') + output_contains(tasks_derived, ' swimmer>. %0.00;0.81%') ) nars.reset() tasks_derived = process_two_premises( ' [flying]>. %1.00;0.90%', - '(--, (&&, [flying]>, swimmer>)). %1.00;0.90% ', - 20 + '(&&, [flying]>, swimmer>). %0.00;0.90% ', + 100 ) self.assertTrue( - output_contains(tasks_derived, '(--, swimmer>). %1.00;0.81%') + output_contains(tasks_derived, ' swimmer>. %0.00;0.81%') ) pass @@ -622,7 +622,7 @@ def test_decomposition_2(self): ''' tasks_derived = process_two_premises( '(||, [flying]>, swimmer>). %1.00;0.90% ', - '(--, swimmer>). %1.00;0.90%', + ' swimmer>. %0.00;0.90%', 50 ) self.assertTrue(