diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-19 07:15:04 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-19 07:16:30 +0300 |
commit | b56552e3260023593a3bf80315edf0f069eebac1 (patch) | |
tree | 729ba1bd4eb4d80c69bfa4ea65a50a69daae1e4e | |
parent | 3b0729ca8599173a61b97d59513c32b8b8eb1ea4 (diff) | |
download | ellinika-b56552e3260023593a3bf80315edf0f069eebac1.tar.gz ellinika-b56552e3260023593a3bf80315edf0f069eebac1.tar.bz2 |
Conjugator: bugfix
* data/irregular-verbs.xml: Update.
* src/ellinika/conjugator.scm (conjugate): Create a copy of
vinfo prior to complementing it to avoid side effects on
subsequent iterations.
-rw-r--r-- | data/irregular-verbs.xml | 27 | ||||
-rw-r--r-- | src/ellinika/conjugator.scm | 32 | ||||
-rw-r--r-- | src/ellinika/tests/conj/blepv.scm | 2 |
3 files changed, 44 insertions, 17 deletions
diff --git a/data/irregular-verbs.xml b/data/irregular-verbs.xml index 5253187..2e604e3 100644 --- a/data/irregular-verbs.xml +++ b/data/irregular-verbs.xml | |||
@@ -225,7 +225,6 @@ | |||
225 | <v> | 225 | <v> |
226 | <a>βλέπω</a> | 226 | <a>βλέπω</a> |
227 | <c>A</c> | 227 | <c>A</c> |
228 | <!-- <accmap>000000</accmap> --> | ||
229 | <act> | 228 | <act> |
230 | <root theme="aor">είδ</root> | 229 | <root theme="aor">είδ</root> |
231 | <root theme="sub">δ</root> | 230 | <root theme="sub">δ</root> |
@@ -233,7 +232,15 @@ | |||
233 | <t name="Αόριστος"> | 232 | <t name="Αόριστος"> |
234 | <accmap>000000</accmap> | 233 | <accmap>000000</accmap> |
235 | </t> | 234 | </t> |
235 | <t name="Μέλλοντας στιγμιαίος"> | ||
236 | <p n="p" p="2" prop="true">δείτε</p> | ||
237 | </t> | ||
236 | </ind> | 238 | </ind> |
239 | <sub> | ||
240 | <t name="Αόριστος"> | ||
241 | <p n="p" p="2" prop="true">δείτε</p> | ||
242 | </t> | ||
243 | </sub> | ||
237 | <imp> | 244 | <imp> |
238 | <t name="Αόριστος"> | 245 | <t name="Αόριστος"> |
239 | <p n="s" p="2">δες</p> | 246 | <p n="s" p="2">δες</p> |
@@ -244,6 +251,11 @@ | |||
244 | <pas> | 251 | <pas> |
245 | <root theme="aor">ειδώθ</root> | 252 | <root theme="aor">ειδώθ</root> |
246 | <root theme="sub">ιδωθ</root> | 253 | <root theme="sub">ιδωθ</root> |
254 | <ind> | ||
255 | <t name="Μέλλοντας στιγμιαίος"> | ||
256 | <prop name="root">ιδωθ</prop> | ||
257 | </t> | ||
258 | </ind> | ||
247 | </pas> | 259 | </pas> |
248 | </v> | 260 | </v> |
249 | 261 | ||
@@ -252,7 +264,20 @@ | |||
252 | <c>A</c> | 264 | <c>A</c> |
253 | <act> | 265 | <act> |
254 | <root theme="aor">βρήκ</root> | 266 | <root theme="aor">βρήκ</root> |
267 | <ind> | ||
268 | <t name="Αόριστος"> | ||
269 | <accmap>000000</accmap> | ||
270 | </t> | ||
271 | <t name="Μέλλοντας στιγμιαίος"> | ||
272 | <p n="p" p="2" prop="true">βρείτε</p> | ||
273 | </t> | ||
274 | </ind> | ||
255 | <root theme="sub">βρ</root> | 275 | <root theme="sub">βρ</root> |
276 | <sub> | ||
277 | <t name="Αόριστος"> | ||
278 | <p n="p" p="2" prop="true">βρείτε</p> | ||
279 | </t> | ||
280 | </sub> | ||
256 | <imp> | 281 | <imp> |
257 | <t name="Αόριστος"> | 282 | <t name="Αόριστος"> |
258 | <p n="s" p="2">βρες</p> | 283 | <p n="s" p="2">βρες</p> |
diff --git a/src/ellinika/conjugator.scm b/src/ellinika/conjugator.scm index 2a6425c..0abec8d 100644 --- a/src/ellinika/conjugator.scm +++ b/src/ellinika/conjugator.scm | |||
@@ -541,22 +541,24 @@ AND i.tense=\"~A\" AND i.ident=f.ident" | |||
541 | (conjugate verb voice "ind" | 541 | (conjugate verb voice "ind" |
542 | (conj-info #:auxtense conj))))) | 542 | (conj-info #:auxtense conj))))) |
543 | (else | 543 | (else |
544 | (if (not (verb-get vinfo #:root)) | 544 | (let ((vinfo (copy-tree vinfo))) |
545 | (let ((thema (string-split (conj-info #:thema conj) #\:))) | 545 | (if (verb-get vinfo #:root) |
546 | ; (format #t "THEMA ~A~%" thema) | 546 | (verb-set! vinfo #:attested 'root) |
547 | (complement-verb-info vinfo verb | 547 | (let ((thema (string-split (conj-info #:thema conj) #\:))) |
548 | (if (null? (cdr thema)) | 548 | ; (format #t "THEMA ~A~%" thema) |
549 | voice | 549 | (complement-verb-info vinfo verb |
550 | (car (cdr thema))) | 550 | (if (null? (cdr thema)) |
551 | (car thema)))) | 551 | voice |
552 | (car (cdr thema))) | ||
553 | (car thema)))) | ||
552 | ; (format #t "VINFO ~A~%" vinfo) | 554 | ; (format #t "VINFO ~A~%" vinfo) |
553 | (cons | 555 | (cons |
554 | (cons | 556 | (cons |
555 | (append (apply-flect conj vinfo verb) | 557 | (append (apply-flect conj vinfo verb) |
556 | (list (verb-get vinfo #:conj) | 558 | (list (verb-get vinfo #:conj) |
557 | (verb-get vinfo #:attested))) | 559 | (verb-get vinfo #:attested))) |
558 | (conj-info #:fold conj)) | 560 | (conj-info #:fold conj)) |
559 | prev)))) | 561 | prev))))) |
560 | '() | 562 | '() |
561 | conj-list)))))))) | 563 | conj-list)))))))) |
562 | 564 | ||
diff --git a/src/ellinika/tests/conj/blepv.scm b/src/ellinika/tests/conj/blepv.scm index 7e54734..6c0ac99 100644 --- a/src/ellinika/tests/conj/blepv.scm +++ b/src/ellinika/tests/conj/blepv.scm | |||
@@ -1,4 +1,4 @@ | |||
1 | (use-modules ((ellinika test-conjugation))) | 1 | (use-modules ((ellinika test-conjugation))) |
2 | 2 | ||
3 | (test-conjugation:verb "βλέπω") | 3 | (test-conjugation:verb "βλέπω") |
4 | ;(test-conjugation:tense "βλέπω" "pas" "sub" "Αόριστος") | 4 | ;(test-conjugation:tense "βλέπω" "pas" "imp" "Αόριστος") |