aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-19 07:15:04 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-06-19 07:16:30 +0300
commitb56552e3260023593a3bf80315edf0f069eebac1 (patch)
tree729ba1bd4eb4d80c69bfa4ea65a50a69daae1e4e
parent3b0729ca8599173a61b97d59513c32b8b8eb1ea4 (diff)
downloadellinika-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.xml27
-rw-r--r--src/ellinika/conjugator.scm32
-rw-r--r--src/ellinika/tests/conj/blepv.scm2
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
@@ -227,3 +227,2 @@
<c>A</c>
-<!-- <accmap>000000</accmap> -->
<act>
@@ -235,3 +234,11 @@
</t>
+ <t name="Μέλλοντας στιγμιαίος">
+ <p n="p" p="2" prop="true">δείτε</p>
+ </t>
</ind>
+ <sub>
+ <t name="Αόριστος">
+ <p n="p" p="2" prop="true">δείτε</p>
+ </t>
+ </sub>
<imp>
@@ -246,2 +253,7 @@
<root theme="sub">ιδωθ</root>
+ <ind>
+ <t name="Μέλλοντας στιγμιαίος">
+ <prop name="root">ιδωθ</prop>
+ </t>
+ </ind>
</pas>
@@ -254,3 +266,16 @@
<root theme="aor">βρήκ</root>
+ <ind>
+ <t name="Αόριστος">
+ <accmap>000000</accmap>
+ </t>
+ <t name="Μέλλοντας στιγμιαίος">
+ <p n="p" p="2" prop="true">βρείτε</p>
+ </t>
+ </ind>
<root theme="sub">βρ</root>
+ <sub>
+ <t name="Αόριστος">
+ <p n="p" p="2" prop="true">βρείτε</p>
+ </t>
+ </sub>
<imp>
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
@@ -543,18 +543,20 @@ AND i.tense=\"~A\" AND i.ident=f.ident"
(else
- (if (not (verb-get vinfo #:root))
- (let ((thema (string-split (conj-info #:thema conj) #\:)))
-; (format #t "THEMA ~A~%" thema)
- (complement-verb-info vinfo verb
- (if (null? (cdr thema))
- voice
- (car (cdr thema)))
- (car thema))))
+ (let ((vinfo (copy-tree vinfo)))
+ (if (verb-get vinfo #:root)
+ (verb-set! vinfo #:attested 'root)
+ (let ((thema (string-split (conj-info #:thema conj) #\:)))
+; (format #t "THEMA ~A~%" thema)
+ (complement-verb-info vinfo verb
+ (if (null? (cdr thema))
+ voice
+ (car (cdr thema)))
+ (car thema))))
; (format #t "VINFO ~A~%" vinfo)
- (cons
- (cons
- (append (apply-flect conj vinfo verb)
- (list (verb-get vinfo #:conj)
- (verb-get vinfo #:attested)))
- (conj-info #:fold conj))
- prev))))
+ (cons
+ (cons
+ (append (apply-flect conj vinfo verb)
+ (list (verb-get vinfo #:conj)
+ (verb-get vinfo #:attested)))
+ (conj-info #:fold conj))
+ prev)))))
'()
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
@@ -3,2 +3,2 @@
(test-conjugation:verb "βλέπω")
-;(test-conjugation:tense "βλέπω" "pas" "sub" "Αόριστος")
+;(test-conjugation:tense "βλέπω" "pas" "imp" "Αόριστος")

Return to:

Send suggestions and report system problems to the System administrator.