diff options
Diffstat (limited to 'scm/verbop.scm')
-rw-r--r-- | scm/verbop.scm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scm/verbop.scm b/scm/verbop.scm index 0fff38f..8308d70 100644 --- a/scm/verbop.scm +++ b/scm/verbop.scm | |||
@@ -130,10 +130,18 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@" | |||
130 | ret)) | 130 | ret)) |
131 | 131 | ||
132 | (define (conjugation-set key val) | 132 | (define (conjugation-set key val) |
133 | (let ((elt (cond | ||
134 | ((not (eq? key #:root)) | ||
135 | (cons key val)) | ||
136 | ((and conjugation (assoc (car val) conjugation)) => | ||
137 | (lambda (entry) | ||
138 | (set-cdr! entry (cons (cdr val) (cdr entry))))) | ||
139 | (else | ||
140 | (cons key (list val)))))) | ||
133 | (set! conjugation | 141 | (set! conjugation |
134 | (if conjugation | 142 | (if conjugation |
135 | (append conjugation (list (cons key val))) | 143 | (append conjugation (list elt)) |
136 | (list (cons key val))))) | 144 | (list elt))))) |
137 | 145 | ||
138 | 146 | ||
139 | ;;; Verb structure: | 147 | ;;; Verb structure: |
@@ -222,7 +230,8 @@ VALUES (~Q,~Q,~Q,~Q,~Q)" | |||
222 | 230 | ||
223 | (define (flush-mood mood vstr) | 231 | (define (flush-mood mood vstr) |
224 | (if (eq? (car mood) #:root) | 232 | (if (eq? (car mood) #:root) |
225 | (let ((val (cdr mood))) | 233 | (for-each |
234 | (lambda (val) | ||
226 | (ellinika:sql-query | 235 | (ellinika:sql-query |
227 | "INSERT INTO irregular_root (verb,voice,thema,root) \ | 236 | "INSERT INTO irregular_root (verb,voice,thema,root) \ |
228 | VALUES (~Q,~Q,~Q,~Q)" | 237 | VALUES (~Q,~Q,~Q,~Q)" |
@@ -230,6 +239,7 @@ VALUES (~Q,~Q,~Q,~Q)" | |||
230 | vstr | 239 | vstr |
231 | (car val) | 240 | (car val) |
232 | (cdr val))) | 241 | (cdr val))) |
242 | (cdr mood)) | ||
233 | (let ((mood-str (car mood))) | 243 | (let ((mood-str (car mood))) |
234 | (let ((lst (cdr mood))) | 244 | (let ((lst (cdr mood))) |
235 | (cond | 245 | (cond |