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 /src/ellinika | |
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.
Diffstat (limited to 'src/ellinika')
-rw-r--r-- | src/ellinika/conjugator.scm | 73 | ||||
-rw-r--r-- | src/ellinika/tests/conj/erxomai.scm | 1 |
2 files changed, 44 insertions, 30 deletions
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,37 +505,50 @@ AND i.tense=\"~A\" AND i.ident=f.ident" | |||
505 | (cond | 505 | (cond |
506 | ((and (string=? (conj-info #:thema conj) "synt") | 506 | ((and (string=? (conj-info #:thema conj) "synt") |
507 | (conj-info #:aux conj)) | 507 | (conj-info #:aux conj)) |
508 | (cons | 508 | (let ((aparemfato-list |
509 | (cons | ||
510 | (let* ((verb-conj | ||
511 | (car (conjugate verb voice "sub" "Αόριστος" | ||
512 | #:nopart))) | ||
513 | (form (list-ref verb-conj 2)) | ||
514 | (part (conj-info #:particle conj))) | ||
515 | (cond | ||
516 | (form | ||
517 | ; (format #t "FORM ~A FROM ~A~%" form verb-conj);;FIXME | ||
518 | (append | ||
519 | (map | 509 | (map |
520 | (lambda (aux flag) | 510 | (lambda (x) |
521 | (if (char=? flag #\-) | 511 | (let ((t (conjugation:table x))) |
522 | #f | 512 | (if t |
523 | (elstr->string | 513 | (cons |
524 | (if part | 514 | (list-ref t 2) |
525 | (elstr-append part " " aux " " form) | 515 | (conjugation:attested x)) |
526 | (elstr-append aux " " form))))) | 516 | #f))) |
527 | (conjugation:table | 517 | (conjugate verb voice "sub" "Αόριστος" |
528 | (car (conjugate (conj-info #:aux conj) "act" "ind" | 518 | #:nopart))) |
529 | (conj-info #:auxtense conj)))) | 519 | (part (conj-info #:particle conj)) |
530 | (string->list (or (verb-get vinfo #:accmap) | 520 | (fold-id (conj-info #:fold conj))) |
531 | (conj-info #:accmap conj) | 521 | (fold |
532 | "000000"))) | 522 | (lambda (param prev) |
533 | (list (verb-get vinfo #:conj) | 523 | (if (not param) |
534 | (conjugation:attested verb-conj)))) | 524 | prev |
535 | (else | 525 | (let ((aparemfato (car param)) |
536 | #f))) | 526 | (attested (cdr param))) |
537 | (conj-info #:fold conj)) | 527 | (cons |
538 | prev)) | 528 | (cons |
529 | (append | ||
530 | (map | ||
531 | (lambda (aux flag) | ||
532 | (if (char=? flag #\-) | ||
533 | #f | ||
534 | (elstr->string | ||
535 | (if part | ||
536 | (elstr-append part " " aux " " | ||
537 | aparemfato) | ||
538 | (elstr-append aux " " aparemfato))))) | ||
539 | (conjugation:table | ||
540 | (car (conjugate (conj-info #:aux conj) | ||
541 | "act" "ind" | ||
542 | (conj-info #:auxtense conj)))) | ||
543 | (string->list (or (verb-get vinfo #:accmap) | ||
544 | (conj-info #:accmap conj) | ||
545 | "000000"))) | ||
546 | (list (verb-get vinfo #:conj) | ||
547 | attested)) | ||
548 | fold-id) | ||
549 | prev)))) | ||
550 | prev | ||
551 | aparemfato-list))) | ||
539 | ((and (string=? (conj-info #:thema conj) "synt") | 552 | ((and (string=? (conj-info #:thema conj) "synt") |
540 | (conj-info #:auxtense conj)) | 553 | (conj-info #:auxtense conj)) |
541 | (let ((part (conj-info #:particle conj))) | 554 | (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 @@ | |||
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" "ind" "Παρακείμενος") | ||