projects
/
umlisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
11ee4ef
)
r11412: warn on empty files -- occurs when subsetting UMLS
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sat, 30 Dec 2006 06:09:34 +0000
(06:09 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sat, 30 Dec 2006 06:09:34 +0000
(06:09 +0000)
create-sql.lisp
patch
|
blob
|
history
diff --git
a/create-sql.lisp
b/create-sql.lisp
index ab7d64a553fbaa8077fef3442f258ad3679a4974..d145ad9255f8c08c8c60d593800cb6c2ec5cc1ab 100644
(file)
--- a/
create-sql.lisp
+++ b/
create-sql.lisp
@@
-295,13
+295,10
@@
This is much faster that using create-umls-db-insert."
(incf translated-lines)))
(dolist (input-ufile input-ufiles)
(with-umls-ufile (line input-ufile)
(incf translated-lines)))
(dolist (input-ufile input-ufiles)
(with-umls-ufile (line input-ufile)
- (incf input-lines)
- (when (> input-lines translated-lines)
- (throw 'done-counting 'incomplete)))))
+
(incf input-lines)
+
(when (> input-lines translated-lines)
+
(throw 'done-counting 'incomplete)))))
(cond
(cond
- ((eql input-lines 0)
- (error "Input lines is 0")
- nil)
((< input-lines translated-lines)
(format t "Translated file ~A incomplete, deleting...~%" output-path)
(delete-file output-path)
((< input-lines translated-lines)
(format t "Translated file ~A incomplete, deleting...~%" output-path)
(delete-file output-path)
@@
-309,6
+306,9
@@
This is much faster that using create-umls-db-insert."
((eql input-lines translated-lines)
(format t "Translated file ~A already exists: skipping...~%" output-path)
t)
((eql input-lines translated-lines)
(format t "Translated file ~A already exists: skipping...~%" output-path)
t)
+ ((eql input-lines 0)
+ (warn "The number of input lines is 0 for output file ~A." output-path)
+ nil)
((> translated-lines input-lines)
(error "Shouldn't happen. Translated lines of ~A is ~D, greater than input lines ~D"
output-path translated-lines input-lines)
((> translated-lines input-lines)
(error "Shouldn't happen. Translated lines of ~A is ~D, greater than input lines ~D"
output-path translated-lines input-lines)