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