;;; Hey, emacs, this file is -*- Mode: common-lisp; -*- ... got that? (in-package :lkb) ;;; ;;; determine surface order of constituents in rule: returns list of paths into ;;; feature structure of rule, i.e. (nil (args first) (args rest first)) for a ;;; binary rule, where the first list element is the path to the mother node of ;;; the rule. ;;; (defun establish-linear-precedence (rule) (let ((daughters (loop for args = (existing-dag-at-end-of rule '(ARGS)) then (existing-dag-at-end-of args *list-tail*) for daughter = (when args (get-value-at-end-of args *list-head*)) for path = (list 'ARGS) then (append path *list-tail*) while (and daughter (not (eq daughter 'no-way-through))) collect (append path *list-head*)))) (if (null daughters) (cerror "Ignore it" "Rule without daughters") (cons nil daughters)))) (defun spelling-change-rule-p (rule) (declare (ignore rule)) nil) ;;; ;;; create feature structure representation of orthography value for insertion ;;; into the output structure of inflectional rules. ;;; (defun make-orth-tdfs (orthography) (let* ((unification (make-unification :lhs (create-path-from-feature-list *orth-path*) :rhs (make-u-value :type orthography))) (indef (process-unifications (list unification)))) (when indef (make-tdfs :indef (create-wffs indef)))))