semanticnet.b 2.48 KB
Newer Older
Finzel, Bettina's avatar
Finzel, Bettina committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
% Head declaration for target class
:- modeh(1, tracks_down(+being,+being)).

% Body declarations for relations
:- modeb(*, is_(+being,+being)).
:- modeb(*, is_(+being,-being)).
:- modeb(*, is_(-being,+being)).
:- modeb(*, is_(+being,#being)).
:- modeb(*, is_(#being,+being)).
:- modeb(*, is_(-being,#being)).
:- modeb(*, is_(#being,-being)).
:- modeb(*, is_(#being,#being)).

:- modeb(*, has(+being,+being)).
:- modeb(*, has(+being,-being)).
:- modeb(*, has(-being,+being)).
:- modeb(*, has(+being,#being)).
:- modeb(*, has(#being,+being)).
:- modeb(*, has(-being,#being)).
:- modeb(*, has(#being,-being)).
:- modeb(*, has(#being,#being)).

%:- modeb(*, is_a(+being,+being)).
%:- modeb(*, is_a(+being,-being)).
%:- modeb(*, is_a(-being,+being)).
%:- modeb(*, is_a(+being,#being)).
%:- modeb(*, is_a(#being,+being)).
%:- modeb(*, is_a(-being,#being)).
%:- modeb(*, is_a(#being,-being)).
%:- modeb(*, is_a(#being,#being)).

%:- modeb(*, has_p(+being,+being)).
%:- modeb(*, has_p(+being,-being)).
%:- modeb(*, has_p(-being,+being)).
%:- modeb(*, has_p(+being,#being)).
%:- modeb(*, has_p(#being,+being)).
%:- modeb(*, has_p(-being,#being)).
%:- modeb(*, has_p(#being,-being)).
%:- modeb(*, has_p(#being,#being)).

% Determinations
:- determination(tracks_down/2, is_/2).
:- determination(tracks_down/2, has/2).
%:- determination(tracks_down/2, is_a/2).
%:- determination(tracks_down/2, has_p/2).

% Aleph settings
:- set(i, 10).
:- set(clauselength, 10).
:- set(minpos, 2).
:- set(minscore, 0).
:- set(verbosity, 2).
:- set(noise, 0).
:- set(nodes, 180000).
:- set(rulefile,'Result').
:- set(record, true).
:- set(recordfile, 'Record').

% semantic concepts
is_a(plant,being).
is_a(animal,being).
is_a(flower,plant).
is_a(clover,flower).
is_a(dandelion,flower).
is_a(fish,animal).
is_a(bird,animal).
is_a(mammal,animal).
is_a(herbivore,mammal).
is_a(carnivore,mammal).
is_a(rabbit,herbivore).
is_a(fox,carnivore).
is_a(dog,carnivore).
is_a(stomach,organ).
has_p(being,metabolism).
has_p(animal,stomach).
has_p(fish,gills).
has_p(bird,feathers).
has_p(mammal,fur).

is_a(herb,plant).
is_a(parsley,herb).
is_a(rosemary,herb).
is_a(mouse,herbivore).

% background of examples
is_a(bobby,rabbit).
is_a(fluffy,rabbit).
is_a(tweety,bird).
is_a(blubbly,fish).
is_a(bello,dog).
is_a(samson,dog).
is_a(argo,dog).
is_a(bella,fox).

is_a(tipsie,mouse).

% reasoning rules
is_(A,B) :- is_a(A,B).
is_(A,B) :- is_a(A,C), is_(C,B).

has(A,X) :- has_p(A,X).
has(X,Z) :- has_p(X,Y), has(Y,Z).

has(A,X) :- is_(A,B), has(B,X).
has(A,X) :- has_p(A,Y), is_(Y,X).