X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql-classes.lisp;h=2fc138bbe8aa6dcfcfe896e9b59905128dd69d97;hb=5a80d916816131a1d56a60790cd1e4b5e9c88810;hp=5aae593acb5fe9ca821ed7564535f035dbe9a47d;hpb=3c41df30a47a0f5b9473801941c0e56d8e7d6cbd;p=umlisp.git diff --git a/sql-classes.lisp b/sql-classes.lisp index 5aae593..2fc138b 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: sql-classes.lisp,v 1.3 2002/10/09 23:03:41 kevin Exp $ +;;;; $Id: sql-classes.lisp,v 1.4 2002/10/14 09:25:20 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -69,10 +69,10 @@ ;;; Lookup functions for uterms,ustr in ucons (defun find-uterm-in-ucon (ucon lui) - (find lui (s#term ucon) :key #'uterm-lui :test 'equal)) + (find lui (s#term ucon) :key #'lui :test 'equal)) (defun find-ustr-in-uterm (uterm sui) - (find sui (s#str uterm) :key #'ustr-sui :test 'equal)) + (find sui (s#str uterm) :key #'sui :test 'equal)) (defun find-ustr-in-ucon (ucon sui) (let ((found-ustr nil)) @@ -255,7 +255,7 @@ (defun find-ucon-rel-cui2 (cui2 &key (srl *current-srl*)) (mapcar - #'(lambda (cui) (find-ucon-cui cui :key srl)) + #'(lambda (cui) (find-ucon-cui cui :srl srl)) (remove-duplicates (mapcar #'cui1 (find-urel-cui2 cui2 :srl srl))))) (defun find-ucoc-cui (cui &key (srl *current-srl*)) @@ -300,7 +300,7 @@ (defun find-ucon-coc-cui2 (cui2 &key (srl *current-srl*)) "List of ucon with co-occurance cui2" (mapcar - #'(lambda (cui) (find-ucon-cui cui :key srl)) + #'(lambda (cui) (find-ucon-cui cui :srl srl)) (remove-duplicates (mapcar #'cui1 (find-ucoc-cui2 cui2 :srl srl))))) (defun find-ulo-cui (cui &key (srl *current-srl*)) @@ -561,18 +561,6 @@ (push (find-usty-tui (nth 0 tuple)) ustys)) (nreverse ustys))) -(defun find-usty_freq-all () - (let ((usty_freqs '())) - (dolist (tuple (mutex-sql-query "select distinct TUI from MRSTY")) - (let* ((tui (car tuple)) - (freq (ensure-integer - (caar (mutex-sql-query - (format nil "select count(*) from MRSTY where TUI=~a" tui)))))) - (push (make-instance 'usty_freq :usty (find-usty-tui tui) :freq freq) usty_freqs))) - (sort usty_freqs #'> :key #'usty_freq-freq))) - - - (defun find-cui-max () (let ((cui (caar (mutex-sql-query "select max(CUI) from MRCON"))))