Boolean operators in natural language
Purpose of boolean operators
To say things such as pair ("peter","macbook")
is either in relation ownsa
or wantsa
, requires us to use boolean operators , , and .
Meaning
Let us explain the meaning of relational operators , , and by means of examples.
Assume we have a relation, ownsa[Person*LaptopType]
, which contains the persons who own a particular type of laptop. A fact "peter" ownsa "macbook"
means that Peter owns a MacBook.
Also assume another relation wantsa[Person*LaptopType]
, which contains the persons who want a particular type of laptop. A fact "peter" wantsa "macbook"
means that Peter wants a MacBook.
Union
The sentence: "Peter owns a MacBook or Peter wants a MacBook." is represented as
"peter"
(ownsa
wantsa
) "macbook"
.
Intersection
The sentence: "Peter owns a MacBook and Peter wants a MacBook." is represented as
"peter"
(label
colour
) "macbook"
.
Difference
The sentence: "Peter owns a MacBook and Peter does not want a MacBook." is represented as
"peter"
(label
colour
) "macbook"
.
Natural language templates
Formally
Natural language template
a r b
or a s b
.
a r b
and a s b
.
a r b
and nota s b
.
Other explanation
Last updated