Newer
Older
ai / lab4 / testUnifit.py
@Andreas Jaggi Andreas Jaggi on 10 Apr 2006 797 bytes Add existing code.
print "Test fonctions unifit" 
print "\t",unifit(['?x', 'is a', 'doctorant'], ['vincent', 'is a', 'doctorant'])
print "\t",unifit(['vincent', 'is a', 'doctorant'],['?x', 'is a', 'doctorant'])
print "\t",unifit(['vincent', 'is a', '?y'],['?x', 'is a', 'doctorant'])
print "\t",unifit(['vincent', 'is a', 'doctorant'],['vincent', 'is a', 'doctorant'])
print "\t",unifit(['vincent', 'is a', 'doctorant'],['micheal', 'is a', 'doctorant'])
print "\t",unifit(['foo', '?x', ['?y', 'bar', 'jean']],['foo', 'jean', ['marc', 'bar', '?z']])
print "\t",unifit(['foo', '?x', ['?y', 'bar', 'jean']],['foo', 'jean', ['marc', 'bar', '?x']])
print "\t",unifit(['foo', '?x', ['?y', 'bar', 'paul']],['foo', 'jean', ['marc', 'bar', '?x']])
print "\t",unifit(['p', '?x', ['f', '?y']],['p', ['f','a'], '?x'])