def test_nested(self): x = [1.0] * 13 fee = fe.FeatureExtendedExtractor( "D(D(B8, B7, B2), D(B1, B2, B3), R(B10, B8A))") self.assertEqual(fee(x), [4.0])
def test_simple(self): x = [1.0] * 13 fee = fe.FeatureExtendedExtractor( "B8A ; B09 ; B08 ; I(B02, B03) ; S(B05, B03) ; R(B01, B02) ; D(B01, B02, B03)" " ; I(B8A, B04)") self.assertEqual(fee(x), [1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 2.0, 0.0])