Modelling Complex Sentences
Date: 4 May 2006 14:38:58 -0700
Message-ID: <1146778738.808972.303130_at_e56g2000cwe.googlegroups.com>
How can one use LISP to model the following 4 complex sentences in a systematic manner by building them from smallers ones having a subject-verb-object format.
- flower1's brightest color is fluorescent red.
- flower1's brightest color was fluorescent green on monday.
- flower1's brightest color willBe fluorescent blue on friday.
- john says line 3.
In normal speech/writing, relators that indicate the relationship
between adjectives and nouns are frequently dropped or are implied by
modification of the adjective. For example:
"hot modifies milk" becomes "hot milk",
or "bright modifies color" becomes "brightest color".
And sometimes the relator between subject and object is appended with
the subject, for example
"flower attribute color" becomes "flower's color".
Representing the sentences seem fairly straight forward in Prolog and dbd, but how does LISP implement it? Below is dbd's script to model the 4 complex sentences based on smallers ones having a subject-verb-object format.
(; Create a flower named flower1)
(new 'flower1' 'flower')
(; Create colors red, green and blue)
(new 'red' 'color')
(new 'green' 'color')
(new 'blue' 'color')
(; Create adjectives bright and fluorescent)
(new 'bright' 'adjective')
(new 'fluorescent' 'adjective')
(; Create weekdays monday and friday)
(new 'monday' 'weekday')
(new 'friday' 'weekday')
(; Create flower1 attribute brightest color is fluorescent red)
(; Long method)
(create bright modify color)
(create flower1 attribute (select bright modify color))
(create fluorescent modify red)
(create (select flower1 attribute (select bright modify color))
is
(select fluorescent modify red))
attribute (create bright modify color) willBe (create fluorescent modify blue) on friday)
(; Create a person named john)
(new 'john' 'person')
(; Create a verb named say)
(new 'say' 'verb')
(; Create john says
"flower1 attribute brightest color willBe fluorescent blue
on friday")
(create john
say (select flower1 attribute (select bright modify color) willBe (select fluorescent modify blue) on friday))Received on Thu May 04 2006 - 23:38:58 CEST