projects
/
umlisp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes needed for 2009AB version of UMLS
[umlisp.git]
/
create-sql.lisp
diff --git
a/create-sql.lisp
b/create-sql.lisp
index 93c90d541af858522d8ec657aca23e6e15aa7b13..79732ebc649e4cc5816049944be951ce9f6ac470 100644
(file)
--- a/
create-sql.lisp
+++ b/
create-sql.lisp
@@
-7,10
+7,8
@@
;;;; Author: Kevin M. Rosenberg
;;;; Created: Apr 2000
;;;;
;;;; Author: Kevin M. Rosenberg
;;;; Created: Apr 2000
;;;;
-;;;; $Id$
-;;;;
;;;; This file, part of UMLisp, is
;;;; This file, part of UMLisp, is
-;;;; Copyright (c) 2000-20
06
by Kevin M. Rosenberg, M.D.
+;;;; Copyright (c) 2000-20
10
by Kevin M. Rosenberg, M.D.
;;;;
;;;; UMLisp users are granted the rights to distribute and use this software
;;;; as governed by the terms of the GNU General Public License.
;;;;
;;;; UMLisp users are granted the rights to distribute and use this software
;;;; as governed by the terms of the GNU General Public License.
@@
-264,15
+262,15
@@
This is much faster that using create-umls-db-insert."
(dolist (file *umls-files*)
(when verbose (format t "UMLS Import: Importing file ~A to SQL.~%" (fil file)))
(sql-execute (funcall copy-cmd file extension) conn))
(dolist (file *umls-files*)
(when verbose (format t "UMLS Import: Importing file ~A to SQL.~%" (fil file)))
(sql-execute (funcall copy-cmd file extension) conn))
- (
W
hen verbose (format t "UMLS Import: Creating SQL indices.~%"))
+ (
w
hen verbose (format t "UMLS Import: Creating SQL indices.~%"))
(sql-create-indexes conn :verbose verbose)
(sql-create-indexes conn :verbose verbose)
- (
W
hen verbose (format t "UMLS Import: Creating custom tables.~%"))
+ (
w
hen verbose (format t "UMLS Import: Creating custom tables.~%"))
(sql-create-custom-tables conn)
(sql-create-custom-tables conn)
- (
W
hen verbose (format t "UMLS Import: Creating custom indices.~%"))
+ (
w
hen verbose (format t "UMLS Import: Creating custom indices.~%"))
(sql-create-indexes conn :indexes +custom-index-cols+ :verbose verbose)
(sql-create-indexes conn :indexes +custom-index-cols+ :verbose verbose)
- (
W
hen verbose (format t "UMLS Import: Creating special tables.~%"))
+ (
w
hen verbose (format t "UMLS Import: Creating special tables.~%"))
(sql-create-special-tables conn)))
(sql-create-special-tables conn)))
- (
W
hen verbose (format t "UMLS Import: Completed.~%"))
+ (
w
hen verbose (format t "UMLS Import: Completed.~%"))
t)
(defun translate-all-files (&key (extension "-trans") verbose force)
t)
(defun translate-all-files (&key (extension "-trans") verbose force)
@@
-300,6
+298,12
@@
This is much faster that using create-umls-db-insert."
(eof (cons nil nil)))
(catch 'done-counting
(with-open-file (ts output-path :direction :input
(eof (cons nil nil)))
(catch 'done-counting
(with-open-file (ts output-path :direction :input
+ #+(and sbcl sb-unicode) :external-format
+ #+(and sbcl sb-unicode) :UTF-8
+ #+(and allegro ics) :external-format
+ #+(and allegro ics) :UTF-8
+ #+lispworks :external-format
+ #+lispworks :UTF-8
#+(and clisp unicode) :external-format
#+(and clisp unicode) charset:utf-8)
(do ()
#+(and clisp unicode) :external-format
#+(and clisp unicode) charset:utf-8)
(do ()
@@
-335,6
+339,12
@@
This is much faster that using create-umls-db-insert."
(with-open-file (ostream output-path :direction :output
:if-exists :overwrite
:if-does-not-exist :create
(with-open-file (ostream output-path :direction :output
:if-exists :overwrite
:if-does-not-exist :create
+ #+(and sbcl sb-unicode) :external-format
+ #+(and sbcl sb-unicode) :UTF-8
+ #+(and allegro ics) :external-format
+ #+(and allegro ics) :UTF-8
+ #+lispworks :external-format
+ #+lispworks :UTF-8
#+(and clisp unicode) :external-format
#+(and clisp unicode) charset:utf-8)
(dolist (input-ufile input-ufiles)
#+(and clisp unicode) :external-format
#+(and clisp unicode) charset:utf-8)
(dolist (input-ufile input-ufiles)
@@
-366,7
+376,7
@@
This is much faster that using create-umls-db-insert."
"Return mysql copy statement for a file"
(format
nil
"Return mysql copy statement for a file"
(format
nil
- "LOAD DATA ~AINFILE
\"~a\" INTO TABLE ~a FIELDS TERMINATED BY \"|\"
"
+ "LOAD DATA ~AINFILE
'~a' INTO TABLE ~a FIELDS TERMINATED BY '|'
"
(if local-file "LOCAL " "")
(namestring (ufile-pathname file extension)) (table file)))
(if local-file "LOCAL " "")
(namestring (ufile-pathname file extension)) (table file)))