(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)
(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)))
(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))