-;;;; $Id: composite.lisp,v 1.1 2002/10/08 22:08:56 kevin Exp $
+;;;; $Id: composite.lisp,v 1.2 2002/10/09 00:34:47 kevin Exp $
(in-package :umlisp)
;;; Semantic type constants
(defun find-tui-word (words)
- (gu:aif (car (find-usty-word words))
- (tui gu::it)
+ (kmrcl:aif (car (find-usty-word words))
+ (tui kmrcl::it)
nil))
-(gu:memoize 'find-tui-word)
+(kmrcl:memoize 'find-tui-word)
(defun tui-disease-or-syndrome ()
(find-tui-word "disease or syndrome"))
(remove-duplicates
(filter
#'(lambda (c)
- (gu:aif (funcall cui2-func c)
- (let ((ucon2 (find-ucon-cui gu::it)))
+ (kmrcl:aif (funcall cui2-func c)
+ (let ((ucon2 (find-ucon-cui kmrcl::it)))
(when (ucon-is-tui? ucon2 tui)
ucon2))
nil))
"Return sorted list of tuples with ucon and freq that have co-occuring concepts of semantic type tui"
(let ((ucon_freqs '()))
(dolist (ucoc (s#coc ucon))
- (gu:aif (cui2 ucoc)
- (let ((ucon2 (find-ucon-cui gu::it)))
+ (kmrcl:aif (cui2 ucoc)
+ (let ((ucon2 (find-ucon-cui kmrcl::it)))
(when (ucon-is-tui? ucon2 tui)
(push (make-instance 'ucon_freq :ucon ucon2 :freq (cof ucoc))
ucon_freqs)))))
(let ((ucon_freqs (make-array (1+ (find-cui-max)) :initial-element nil)))
(dolist (ucon (find-ucon-tui tui)) ;; for all disease-or-syn
(dolist (ucon2 (funcall ucon2-tui-func ucon tui)) ;; for each related disease
- (gu:aif (aref ucon_freqs (cui ucon2))
- (setf (freq gu::it) (1+ (freq gu::it)))
+ (kmrcl:aif (aref ucon_freqs (cui ucon2))
+ (setf (freq kmrcl::it) (1+ (freq kmrcl::it)))
(setf (aref ucon_freqs (cui ucon2))
(make-instance 'ucon_freq :ucon ucon2 :freq 1)))))
(let ((ucon_freq-list '()))
(dotimes (i (find-cui-max))
(declare (fixnum i))
- (gu:awhen (aref ucon_freqs i)
- (push gu::it ucon_freq-list)))
+ (kmrcl:awhen (aref ucon_freqs i)
+ (push kmrcl::it ucon_freq-list)))
(sort ucon_freq-list #'> :key #'freq))))
(defun find-ucon2_freq-rel-tui-all (tui)