diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 18:09:42 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 18:09:42 +0300 |
commit | cc53aa452ef0caca75931a126860500d3bd67f04 (patch) | |
tree | cc936bae115bd3d461c6b7ab0ed9c6dcd86fa0e3 | |
parent | 338097b8af7c7095db714782ac864ad9f0584b0f (diff) | |
download | ellinika-cc53aa452ef0caca75931a126860500d3bd67f04.tar.gz ellinika-cc53aa452ef0caca75931a126860500d3bd67f04.tar.bz2 |
Improvements in conjugator.
* src/ellinika/conjugator.scm: Correctly handle alternative stems
* data/irregular-verbs.xml: Add alternative stems for erxomai.
in perfective compound tenses.
-rw-r--r-- | data/irregular-verbs.xml | 3 | ||||
-rw-r--r-- | src/ellinika/conjugator.scm | 45 | ||||
-rw-r--r-- | src/ellinika/tests/conj/erxomai.scm | 1 |
3 files changed, 33 insertions, 16 deletions
diff --git a/data/irregular-verbs.xml b/data/irregular-verbs.xml index a350935..67d4126 100644 --- a/data/irregular-verbs.xml +++ b/data/irregular-verbs.xml @@ -351,10 +351,13 @@ <c>A-depon</c> <act> <stem theme="aor">έρθ</stem> + <stem theme="aor">έλθ</stem> </act> <pas> <stem theme="aor">ήρθ</stem> + <stem theme="aor">ήλθ</stem> <stem theme="sub">ερθ</stem> + <stem theme="sub">ελθ</stem> <imp> <t name="Ενεστώτας"> <p n="p" p="2">έρχεστε</p> diff --git a/src/ellinika/conjugator.scm b/src/ellinika/conjugator.scm index 001a882..536b48e 100644 --- a/src/ellinika/conjugator.scm +++ b/src/ellinika/conjugator.scm @@ -505,16 +505,27 @@ AND i.tense=\"~A\" AND i.ident=f.ident" (cond ((and (string=? (conj-info #:thema conj) "synt") (conj-info #:aux conj)) + (let ((aparemfato-list + (map + (lambda (x) + (let ((t (conjugation:table x))) + (if t (cons - (cons - (let* ((verb-conj - (car (conjugate verb voice "sub" "Αόριστος" + (list-ref t 2) + (conjugation:attested x)) + #f))) + (conjugate verb voice "sub" "Αόριστος" #:nopart))) - (form (list-ref verb-conj 2)) - (part (conj-info #:particle conj))) - (cond - (form -; (format #t "FORM ~A FROM ~A~%" form verb-conj);;FIXME + (part (conj-info #:particle conj)) + (fold-id (conj-info #:fold conj))) + (fold + (lambda (param prev) + (if (not param) + prev + (let ((aparemfato (car param)) + (attested (cdr param))) + (cons + (cons (append (map (lambda (aux flag) @@ -522,20 +533,22 @@ AND i.tense=\"~A\" AND i.ident=f.ident" #f (elstr->string (if part - (elstr-append part " " aux " " form) - (elstr-append aux " " form))))) + (elstr-append part " " aux " " + aparemfato) + (elstr-append aux " " aparemfato))))) (conjugation:table - (car (conjugate (conj-info #:aux conj) "act" "ind" + (car (conjugate (conj-info #:aux conj) + "act" "ind" (conj-info #:auxtense conj)))) (string->list (or (verb-get vinfo #:accmap) (conj-info #:accmap conj) "000000"))) (list (verb-get vinfo #:conj) - (conjugation:attested verb-conj)))) - (else - #f))) - (conj-info #:fold conj)) - prev)) + attested)) + fold-id) + prev)))) + prev + aparemfato-list))) ((and (string=? (conj-info #:thema conj) "synt") (conj-info #:auxtense conj)) (let ((part (conj-info #:particle conj))) diff --git a/src/ellinika/tests/conj/erxomai.scm b/src/ellinika/tests/conj/erxomai.scm index aaca526..ce6d5ba 100644 --- a/src/ellinika/tests/conj/erxomai.scm +++ b/src/ellinika/tests/conj/erxomai.scm @@ -1,3 +1,4 @@ (use-modules ((ellinika test-conjugation))) (test-conjugation:verb "έρχομαι") +;(test-conjugation:tense "έρχομαι" "pas" "ind" "Παρακείμενος") |