summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-20 15:09:42 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-06-20 15:09:42 (GMT)
commitcc53aa452ef0caca75931a126860500d3bd67f04 (patch) (unidiff)
treecc936bae115bd3d461c6b7ab0ed9c6dcd86fa0e3
parent338097b8af7c7095db714782ac864ad9f0584b0f (diff)
downloadellinika-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 (more/less context) (ignore whitespace changes)
-rw-r--r--data/irregular-verbs.xml3
-rw-r--r--src/ellinika/conjugator.scm73
-rw-r--r--src/ellinika/tests/conj/erxomai.scm1
3 files changed, 47 insertions, 30 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 @@
351 <c>A-depon</c> 351 <c>A-depon</c>
352 <act> 352 <act>
353 <stem theme="aor">έρθ</stem> 353 <stem theme="aor">έρθ</stem>
354 <stem theme="aor">έλθ</stem>
354 </act> 355 </act>
355 <pas> 356 <pas>
356 <stem theme="aor">ήρθ</stem> 357 <stem theme="aor">ήρθ</stem>
358 <stem theme="aor">ήλθ</stem>
357 <stem theme="sub">ερθ</stem> 359 <stem theme="sub">ερθ</stem>
360 <stem theme="sub">ελθ</stem>
358 <imp> 361 <imp>
359 <t name="Ενεστώτας"> 362 <t name="Ενεστώτας">
360 <p n="p" p="2">έρχεστε</p> 363 <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,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" "Παρακείμενος")

Return to:

Send suggestions and report system problems to the System administrator.