(defvar *sentence-structures*) (setf *sentence-structures* '((lambda () "The [random(, .5)] [random(' in ' . , .2)] is " (let* ((sentence "")) (if (<= 5 (random 10)) (setf sentence (find-pos words "ADJECTIVE" 'false)) ) (setf sentence (format nil "~A ~A" sentence (find-pos words "NOUN" 'true))) (if (<= 2 (random 10)) (setf sentence (format nil "~A in ~A" sentence (find-noun-with-article words))) ) (setf sentence (format nil "~A is ~A" sentence (find-pos words "ADJECTIVE" 'false))) sentence)) (lambda () "The [random(, .5)] [random(' in ' . , .2)] is not " (let* ((sentence "")) (if (<= 5 (random 10)) (setf sentence (format nil "~A" (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A" sentence (find-noun-with-article words))) (if (<= 2 (random 10)) (setf sentence (format nil "~A in ~A" sentence (find-noun-with-article words))) ) (setf sentence (format nil "~A is not ~A" sentence (find-pos words "ADJECTIVE" 'false))) sentence)) (lambda () "The from will go to " (let* ((sentence "")) (setf sentence (format nil "~A ~A from ~A will go to ~A" sentence (find-pos words "NOUN" 'false) (find-place-noun words) (find-place-noun words))) sentence)) (lambda () " must take the from " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A must take the ~A from ~A" sentence (find-pos words "NOUN" 'true) (find-place-noun words))) sentence)) (lambda () " is and the is " (let* ((sentence (find-place-noun words))) (setf sentence (format nil "~A is ~A and the ~A is ~A" sentence (find-pos words "ADJECTIVE" 'false) (find-pos words "NOUN" 'true) (find-pos words "ADJECTIVE" 'false))) sentence)) (lambda () " for the " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A ~A ~A for the ~A ~A" sentence (find-pos words "PREPOSITION" 'false) (find-place-noun words) (find-pos words "ADJECTIVE" 'false) (find-pos words "NOUN" 'true))) sentence)) (lambda () "The from the the " (let* ((sentence "")) (setf sentence (format nil "~A ~A from the ~A ~A the ~A" sentence (find-pos words "NOUN" 'true) (find-place-noun words) (find-pos words "VERB" 'false) (find-pos words "NOUN" 'true))) sentence )) (lambda () "The [random(, .5)] the [random('in ' . , .2]" (let* ((sentence "")) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A ~A the ~A ~A" sentence (find-pos words "NOUN" 'true) (find-pos words "VERB" 'false) (find-pos words "ADJECTIVE" 'false) (find-pos words "NOUN" 'true))) (if (<= 2 (random 10)) (setf sentence (format nil "~A in ~A" sentence (find-place-noun words))) ) sentence)) (lambda () " and " (let* ((sentence "")) (setf sentence (format nil "~A ~A ~A and ~A ~A" (find-noun-with-article words) (find-pos words "PREPOSITION" 'false) (find-place-noun words) (find-pos words "VERB" 'false) (find-noun-with-article words))) sentence)) (lambda () " takes [random(, .5)] and " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A takes ~A" sentence (find-pos words "PRONOUN" 'false))) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A and ~A ~A" sentence (find-pos words "NOUN" 'true) (find-pos words "PREPOSITION" 'false) (find-place-noun words))) sentence)) (lambda () " the [random(, .5)] " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A ~A the" sentence (find-pos words "VERB" 'false))) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A" sentence (find-pos words "NOUN" 'true))) sentence)) (lambda () " and [random(, .5)] " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A ~A ~A and ~A" sentence (find-pos words "VERB" 'false) (find-noun-with-article words) (find-pos words "PRONOUN" 'false))) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A" sentence (find-pos words "NOUN" 'true))) sentence)) (lambda () "The is the [random(,.5)] ; " (let* ((sentence (find-noun-with-article words))) (setf sentence (format nil "~A is the" sentence)) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A ~A; ~A ~A" sentence (find-noun-with-article words) (find-noun-with-article words) (find-pos words "PREPOSITION" 'false) (find-place-noun words))) sentence)) (lambda () "You must meet at and retrieve the [random(, .5)] " (let* ((sentence "You must meet")) (setf sentence (format nil "~A ~A at ~A and retrieve the " sentence (find-noun-with-article words) (find-place-noun words))) (if (<= 5 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A" sentence (find-noun-with-article words))) sentence)) (lambda () "Without [random(,.3)] , the !" (let* ((sentence "Without")) (if (<= 3 (random 10)) (setf sentence (format nil "~A ~A" sentence (find-pos words "ADJECTIVE" 'false))) ) (setf sentence (format nil "~A ~A, ~A ~A ~A ~A!" sentence (find-pos words "NOUN" 'false) (find-noun-with-article words) (find-pos words "VERB" 'false) (find-pos words "PREPOSITION" 'false) (find-place-noun words))) sentence))))