Function: doctor-svo

doctor-svo is a byte-compiled function defined in doctor.el.gz.

Signature

(doctor-svo SENT KEY TYPE MEM)

Documentation

Find subject, verb and object in sentence SENT with focus on word KEY.

TYPE is number of words preceding KEY to start looking for subject. MEM is t if results are to be put on Doctor's memory stack. Return in the global variables DOCTOR-SUBJ, DOCTOR-VERB, DOCTOR-OBJECT, and DOCTOR-OBJ.

Source Code

;; Defined in /usr/src/emacs/lisp/play/doctor.el.gz
(defun doctor-svo (sent key type mem)
  "Find subject, verb and object in sentence SENT with focus on word KEY.
TYPE is number of words preceding KEY to start looking for subject.
MEM is t if results are to be put on Doctor's memory stack.
Return in the global variables DOCTOR-SUBJ, DOCTOR-VERB, DOCTOR-OBJECT,
and DOCTOR-OBJ."
  (let ((foo (doctor-subjsearch sent key type)))
    (or foo
	(setq foo sent
	      mem nil))
    (while (and (null (doctor-verbp (car foo))) (cdr foo))
      (setq foo (cdr foo)))
    (setq doctor-verb (car foo))
    (setq doctor-obj (doctor-getnoun (cdr foo)))
    (cond ((eq doctor-object 'i) (setq doctor-object 'me))
	  ((eq doctor-subj 'me) (setq doctor-subj 'i)))
    (cond (mem (doctor-remember (list doctor-subj doctor-verb doctor-obj))))))