X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=parse-rrf.lisp;h=0842d97135ebc174d7bf9b67be8a384a26816745;hb=8e895602ced5ab847ecc36c1eaa7be1c9a872a22;hp=4f54fb2de63755dcb8571479610d84e8435d9e8a;hpb=b9fe7fe8b8e24133538f78dbaf6af73b5f0bdec2;p=umlisp.git diff --git a/parse-rrf.lisp b/parse-rrf.lisp index 4f54fb2..0842d97 100644 --- a/parse-rrf.lisp +++ b/parse-rrf.lisp @@ -33,12 +33,12 @@ (defun make-preparse-hash-table () (if sui-lrl-hash (progn - (clrhash pfstr-hash) - (clrhash cui-lrl-hash) - (clrhash lui-lrl-hash) - (clrhash sui-lrl-hash) - (clrhash cuisui-lrl-hash) - (clrhash sab-srl-hash)) + (clrhash pfstr-hash) + (clrhash cui-lrl-hash) + (clrhash lui-lrl-hash) + (clrhash sui-lrl-hash) + (clrhash cuisui-lrl-hash) + (clrhash sab-srl-hash)) (setf pfstr-hash (make-hash-table :size 800000) cui-lrl-hash (make-hash-table :size 800000) @@ -49,8 +49,7 @@ (defun ensure-preparse (&optional (force-read nil)) (when (or force-read (not *preparse-hash-init?*)) - (make-preparse-hash-table) - (setq *preparse-hash-init?* t)) + (make-preparse-hash-table)) (with-umls-file (line "MRCONSO.RRF") (let ((cui (parse-ui (nth 0 line))) (lui (parse-ui (nth 3 line))) @@ -69,7 +68,8 @@ (multiple-value-bind (val found) (gethash sab sab-srl-hash) (declare (ignore val)) (unless found - (setf (gethash sab sab-srl-hash) srl)))))) + (setf (gethash sab sab-srl-hash) srl))))) + (setq *preparse-hash-init?* t)) (defun pfstr-hash (cui) (gethash cui pfstr-hash)) (defun cui-lrl (cui) (gethash cui cui-lrl-hash))