Exemple #1
0
def test_featureconcept():
    from csc.divisi.flavors import FeatureByConceptMatrix
    mat = FeatureByConceptMatrix()
    mat.add_triple(('dog', 'IsA', 'pet'), 1.5)
    eq_(mat[('right', 'IsA', 'pet'), 'dog'], 1.5)
    eq_(mat[('left', 'IsA', 'dog'), 'pet'], 1.5)
    eq_(len(mat), 2)
Exemple #2
0
def test_featureconcept():
    from csc.divisi.flavors import FeatureByConceptMatrix
    mat = FeatureByConceptMatrix()
    mat.add_triple(('dog', 'IsA', 'pet'), 1.5)
    eq_(mat[('right', 'IsA', 'pet'), 'dog'], 1.5)
    eq_(mat[('left', 'IsA', 'dog'), 'pet'], 1.5)
    eq_(len(mat), 2)