diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 17:20:55 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-20 17:21:58 +0300 |
commit | 338097b8af7c7095db714782ac864ad9f0584b0f (patch) | |
tree | 9d849e31b537a9808e0e6cfe793b1595f62bb5d0 | |
parent | b6bbb4f2cf0144aa58701cd2b46277838743a277 (diff) | |
download | ellinika-338097b8af7c7095db714782ac864ad9f0584b0f.tar.gz ellinika-338097b8af7c7095db714782ac864ad9f0584b0f.tar.bz2 |
Minor stylistic change: use "stem" for \thema rhmatos.
-rw-r--r-- | data/dbverb.struct | 6 | ||||
-rw-r--r-- | data/irregular-verbs.xml | 130 | ||||
-rw-r--r-- | scm/verbop.scm | 18 | ||||
-rw-r--r-- | src/cgi-bin/conj.scm4 | 1 | ||||
-rw-r--r-- | src/ellinika/conjugator.scm | 138 | ||||
-rw-r--r-- | src/ellinika/test-conjugation.scm | 2 |
6 files changed, 147 insertions, 148 deletions
diff --git a/data/dbverb.struct b/data/dbverb.struct index d4bdfea..ce19fd3 100644 --- a/data/dbverb.struct +++ b/data/dbverb.struct @@ -283,11 +283,11 @@ CREATE TABLE individual_verb( INDEX(verb,voice,mood,tense) ); -DROP TABLE IF EXISTS irregular_root; -CREATE TABLE irregular_root( +DROP TABLE IF EXISTS irregular_stem; +CREATE TABLE irregular_stem( verb varchar(128) collate 'utf8_bin', voice enum('act','pas'), -- Ενεργητηκή/Μεσοπαθητική thema char(32), -- enum('pres','aor','sub'), -- Αόριστος/Υποτακτική - root varchar(128) + stem varchar(128) ); diff --git a/data/irregular-verbs.xml b/data/irregular-verbs.xml index 1923d88..a350935 100644 --- a/data/irregular-verbs.xml +++ b/data/irregular-verbs.xml @@ -141,10 +141,10 @@ <c>A</c> <act> <aor>ήγαγ</aor> - <root theme="sub">αγάγ</root> + <stem theme="sub">αγάγ</stem> </act> <pas> - <root theme="aor">αχθ</root> + <stem theme="aor">αχθ</stem> </pas> </v> @@ -152,8 +152,8 @@ <a>ανεβαίνω</a> <c>A</c> <act> - <root theme="aor">ανέβηκ</root> - <root theme="sub">ανέβ</root> + <stem theme="aor">ανέβηκ</stem> + <stem theme="sub">ανέβ</stem> <imp> <t name="Αόριστος"> <p n="s" p="2">ανέβε</p> <!-- ή "ανέβα"; --> @@ -168,8 +168,8 @@ <a>απονέμω</a> <c>A</c> <act> - <root theme="aor">απένειμ</root> - <root theme="sub">απονείμ</root> + <stem theme="aor">απένειμ</stem> + <stem theme="sub">απονείμ</stem> </act> <pas/> </v> @@ -178,7 +178,7 @@ <a>αρέσω</a> <c>A</c> <act> - <root theme="aor">αρεσ</root> + <stem theme="aor">αρεσ</stem> </act> </v> @@ -186,7 +186,7 @@ <a>βάλλω</a> <c>A</c> <act> - <root theme="aor">βαλ</root> + <stem theme="aor">βαλ</stem> </act> </v> @@ -194,7 +194,7 @@ <a>βαραίνω</a> <c>A</c> <act> - <root theme="aor">βαρυν</root> + <stem theme="aor">βαρυν</stem> </act> </v> @@ -208,7 +208,7 @@ <a>βγάζω</a> <c>A</c> <act> - <root theme="aor">βγαλ</root> + <stem theme="aor">βγαλ</stem> </act> </v> @@ -217,8 +217,8 @@ <c>A</c> <accmap>000000</accmap> <act> - <root theme="aor">βγήκ</root> - <root theme="sub">βγ</root> + <stem theme="aor">βγήκ</stem> + <stem theme="sub">βγ</stem> </act> </v> @@ -226,8 +226,8 @@ <a>βλέπω</a> <c>A</c> <act> - <root theme="aor">είδ</root> - <root theme="sub">δ</root> + <stem theme="aor">είδ</stem> + <stem theme="sub">δ</stem> <ind> <t name="Αόριστος"> <accmap>000000</accmap> @@ -249,11 +249,11 @@ </imp> </act> <pas> - <root theme="aor">ειδώθ</root> - <root theme="sub">ιδωθ</root> + <stem theme="aor">ειδώθ</stem> + <stem theme="sub">ιδωθ</stem> <ind> <t name="Μέλλοντας στιγμιαίος"> - <prop name="root">ιδωθ</prop> + <prop name="stem">ιδωθ</prop> </t> </ind> </pas> @@ -263,7 +263,7 @@ <a>βρίσκω</a> <c>A</c> <act> - <root theme="aor">βρήκ</root> + <stem theme="aor">βρήκ</stem> <ind> <t name="Αόριστος"> <accmap>000000</accmap> @@ -272,7 +272,7 @@ <p n="p" p="2" prop="true">βρείτε</p> </t> </ind> - <root theme="sub">βρ</root> + <stem theme="sub">βρ</stem> <sub> <t name="Αόριστος"> <p n="p" p="2" prop="true">βρείτε</p> @@ -300,7 +300,7 @@ <a>γέρνω</a> <c>A</c> <act> - <root theme="aor">γειρ</root> + <stem theme="aor">γειρ</stem> </act> </v> @@ -308,7 +308,7 @@ <a>γίνομαι</a> <!-- FIXME: deponentium --> <c>A</c> <act> - <root theme="aor">γίν</root> + <stem theme="aor">γίν</stem> </act> </v> @@ -316,7 +316,7 @@ <a>διαβαίνω</a> <c>A</c> <act> - <root theme="aor">διάβηκ</root> + <stem theme="aor">διάβηκ</stem> <sub> <t name="Αόριστος"> <p n="s" p="1">διαβώ</p> @@ -334,7 +334,7 @@ <a>διδάσκω</a> <c>A</c> <act> - <root theme="aor">διδαξ</root> + <stem theme="aor">διδαξ</stem> </act> </v> @@ -342,7 +342,7 @@ <a>δίνω</a> <c>A</c> <act> - <root theme="aor">δωσ</root> + <stem theme="aor">δωσ</stem> </act> </v> @@ -350,11 +350,11 @@ <a>έρχομαι</a> <c>A-depon</c> <act> - <root theme="aor">έρθ</root> + <stem theme="aor">έρθ</stem> </act> <pas> - <root theme="aor">ήρθ</root> - <root theme="sub">ερθ</root> + <stem theme="aor">ήρθ</stem> + <stem theme="sub">ερθ</stem> <imp> <t name="Ενεστώτας"> <p n="p" p="2">έρχεστε</p> @@ -371,10 +371,10 @@ <a>κάθομαι</a> <c>A-depon</c> <act> - <root theme="aor">κάτσ</root> + <stem theme="aor">κάτσ</stem> </act> <pas> - <root theme="aor">κάτσ</root> + <stem theme="aor">κάτσ</stem> <ind> <t name="Αόριστος"> <augment>ε</augment> @@ -397,7 +397,7 @@ <a>καίω</a> <c>A</c> <act> - <root theme="aor">καψ</root> + <stem theme="aor">καψ</stem> </act> </v> @@ -410,7 +410,7 @@ <a>κλαίω</a> <c>A</c> <act> - <root theme="aor">κλαψ</root> + <stem theme="aor">κλαψ</stem> </act> </v> @@ -418,7 +418,7 @@ <a>λαβαίνω</a> <c>A</c> <act> - <root theme="aor">λαβ</root> + <stem theme="aor">λαβ</stem> </act> </v> @@ -426,8 +426,8 @@ <a>λέω</a> <c>A</c> <act> - <root theme="aor">είπ</root> - <root theme="sub">π</root> + <stem theme="aor">είπ</stem> + <stem theme="sub">π</stem> <ind> <t name="Ενεστώτας"> <p n="s" p="1">λέω</p> @@ -438,7 +438,7 @@ <p n="p" p="3">λέν(ε)</p> </t> <t name="Παρατατικός"> - <prop name="root">λέγ</prop> + <prop name="stem">λέγ</prop> </t> <t name="Αόριστος"> <prop name="accmap">000000</prop> @@ -454,7 +454,7 @@ </sub> <imp> <t name="Ενεστώτας"> - <prop name="root">λέγ</prop> + <prop name="stem">λέγ</prop> </t> <t name="Αόριστος"> <p n="s" p="2">πες</p> @@ -463,19 +463,19 @@ </imp> </act> <pas> - <root theme="aor">ειπώθ</root> - <root theme="aor">λεχθ</root> + <stem theme="aor">ειπώθ</stem> + <stem theme="aor">λεχθ</stem> <ind> <t name="Ενεστώτας"> - <prop name="root">λέγ</prop> + <prop name="stem">λέγ</prop> </t> <t name="Παρατατικός"> - <prop name="root">λέγ</prop> + <prop name="stem">λέγ</prop> </t> </ind> <imp> <t name="Ενεστώτας"> - <prop name="root">λέγ</prop> + <prop name="stem">λέγ</prop> </t> <t name="Αόριστος"> <p n="p" p="2">ειπωθείτε,λεχθείτε</p> @@ -490,7 +490,7 @@ <a>μαθαίνω</a> <c>A</c> <act> - <root theme="aor">μαθ</root> + <stem theme="aor">μαθ</stem> </act> </v> @@ -499,8 +499,8 @@ <c>A</c> <accmap>000000</accmap> <act> - <root theme="aor">μπηκ</root> - <root theme="sub">μπ</root> + <stem theme="aor">μπηκ</stem> + <stem theme="sub">μπ</stem> <imp> <t name="Αόριστος"> <p n="s" p="2">μπες</p> @@ -520,7 +520,7 @@ <a>παθαίνω</a> <c>A</c> <act> - <root theme="aor">παθ</root> + <stem theme="aor">παθ</stem> </act> </v> @@ -534,7 +534,7 @@ <a>πέφτω</a> <c>A</c> <act> - <root theme="aor">πεσ</root> + <stem theme="aor">πεσ</stem> </act> </v> @@ -543,7 +543,7 @@ <c>A</c> <accmap>000000</accmap> <act> - <root theme="aor">πήγ</root> + <stem theme="aor">πήγ</stem> <ind> <t name="Μέλλοντας στιγμιαίος"> <p n="s" p="1">θα πάω</p> @@ -578,8 +578,8 @@ <c>A</c> <accmap>000000</accmap> <act> - <root theme="aor">ήπι</root> <!-- FIXME:Syllabizer --> - <root theme="sub">πι</root> + <stem theme="aor">ήπι</stem> <!-- FIXME:Syllabizer --> + <stem theme="sub">πι</stem> <imp> <t name="Αόριστος"> <p n="s" p="2">πιες</p> @@ -593,7 +593,7 @@ <a>πλέω</a> <c>A</c> <act> - <root theme="aor">πλευσ</root> + <stem theme="aor">πλευσ</stem> </act> </v> @@ -601,7 +601,7 @@ <a>πονώ</a> <c>A</c> <act> - <root theme="aor">πονεσ</root> + <stem theme="aor">πονεσ</stem> </act> </v> @@ -611,7 +611,7 @@ <a>σέρνω</a> <c>A</c> <act> - <root theme="aor">συρ</root> + <stem theme="aor">συρ</stem> </act> </v> @@ -619,7 +619,7 @@ <a>σπέρνω</a> <c>A</c> <act> - <root theme="aor">σπειρ</root> + <stem theme="aor">σπειρ</stem> </act> </v> @@ -629,7 +629,7 @@ <a>στέλνω</a> <c>A</c> <act> - <root theme="aor">στείλ</root> + <stem theme="aor">στείλ</stem> </act> </v> @@ -639,7 +639,7 @@ <a>τείνω</a> <c>A</c> <act> - <root theme="aor">τειν</root> + <stem theme="aor">τειν</stem> </act> </v> @@ -653,7 +653,7 @@ <a>τρέφω</a> <c>A</c> <act> - <root theme="aor">θρεψ</root> + <stem theme="aor">θρεψ</stem> </act> </v> @@ -661,8 +661,8 @@ <a>τρώω</a> <c>A</c> <act> - <root theme="aor">φαγ</root> - <root theme="sub">φα</root> + <stem theme="aor">φαγ</stem> + <stem theme="sub">φα</stem> </act> </v> @@ -670,7 +670,7 @@ <a>τυχαίνω</a> <c>A</c> <act> - <root theme="aor">τυχ</root> + <stem theme="aor">τυχ</stem> </act> </v> @@ -679,8 +679,8 @@ <c>A</c> <accmap>000000</accmap> <act> - <root theme="aor">υπήρξ</root> - <root theme="sub">υπάρξ</root> + <stem theme="aor">υπήρξ</stem> + <stem theme="sub">υπάρξ</stem> </act> </v> @@ -690,7 +690,7 @@ <a>φέυγω</a> <c>A</c> <act> - <root theme="aor">φυγ</root> + <stem theme="aor">φυγ</stem> </act> </v> @@ -704,7 +704,7 @@ <a>φταίω</a> <c>A</c> <act> - <root theme="aor">φταιξ</root> + <stem theme="aor">φταιξ</stem> </act> </v> @@ -714,7 +714,7 @@ <a>χορταίνω</a> <c>A</c> <act> - <root theme="aor">χορτασ</root> + <stem theme="aor">χορτασ</stem> </act> </v> @@ -722,7 +722,7 @@ <a>ψέλνω</a> <c>A</c> <act> - <root theme="aor">ψαλ</root> + <stem theme="aor">ψαλ</stem> </act> </v> diff --git a/scm/verbop.scm b/scm/verbop.scm index 8308d70..464c384 100644 --- a/scm/verbop.scm +++ b/scm/verbop.scm @@ -131,7 +131,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@" (define (conjugation-set key val) (let ((elt (cond - ((not (eq? key #:root)) + ((not (eq? key #:stem)) (cons key val)) ((and conjugation (assoc (car val) conjugation)) => (lambda (entry) @@ -229,11 +229,11 @@ VALUES (~Q,~Q,~Q,~Q,~Q)" ident)) (define (flush-mood mood vstr) - (if (eq? (car mood) #:root) + (if (eq? (car mood) #:stem) (for-each (lambda (val) (ellinika:sql-query - "INSERT INTO irregular_root (verb,voice,thema,root) \ + "INSERT INTO irregular_stem (verb,voice,thema,stem) \ VALUES (~Q,~Q,~Q,~Q)" (verb-get #:verb) vstr @@ -609,17 +609,17 @@ VALUES (~Q,~Q,~Q,~Q)" (conjugation-set "imp" (get-mood)) #f) -;;; <aor>root</aor> - Define aorist root +;;; <aor>stem</aor> - Define aorist stem (xmltrans:end-tag "aor" (tag attr text) (check-parent tag "act" "pas") - (conjugation-set #:root (cons "aor" text)) + (conjugation-set #:stem (cons "aor" text)) #f) -;;; <root theme="aor|sub|pres">root</root> - Define aorist root +;;; <stem theme="aor|sub|pres">stem</stem> - Define aorist stem (xmltrans:end-tag - "root" + "stem" (tag attr text) (check-parent tag "act" "pas") (let ((theme (xmltrans:attr attr "theme"))) @@ -630,7 +630,7 @@ VALUES (~Q,~Q,~Q,~Q)" ((or (string=? theme "aor") (string=? theme "sub") (string=? theme "pres")) - (conjugation-set #:root (cons theme text))) + (conjugation-set #:stem (cons theme text))) (else (xmltrans:parse-error #f "Unknown verb theme") (mark-invalid)))) @@ -835,7 +835,7 @@ Informational options: (ellinika:sql-query "DELETE FROM verbflect where ident > 99") (ellinika:sql-query "DELETE FROM verbclass") (ellinika:sql-query "DELETE FROM verbtense") - (ellinika:sql-query "DELETE FROM irregular_root") + (ellinika:sql-query "DELETE FROM irregular_stem") (ellinika:sql-query "DELETE FROM individual_verb"))) (set! class-list diff --git a/src/cgi-bin/conj.scm4 b/src/cgi-bin/conj.scm4 index 8c5e317..1894485 100644 --- a/src/cgi-bin/conj.scm4 +++ b/src/cgi-bin/conj.scm4 @@ -409,7 +409,6 @@ ifelse(IFACE,[CGI],(cgi:init)) (cgi:names)))) (cons "@@conj@@" (lambda () - (format #t "<!-- ~A -->" (environ)) (dict-connect) (main-form) (do-conj) diff --git a/src/ellinika/conjugator.scm b/src/ellinika/conjugator.scm index f70e20c..001a882 100644 --- a/src/ellinika/conjugator.scm +++ b/src/ellinika/conjugator.scm @@ -48,7 +48,7 @@ (list-set! verb 3 (append (list-ref verb 3) (list value)))) (else (let ((container (assoc key (list-ref verb 2))) - (value (if (and (eq? key #:root) (not (list? value))) + (value (if (and (eq? key #:stem) (not (list? value))) (list value) value))) (if container @@ -119,74 +119,74 @@ verb=\"~A\" AND voice=\"~A\" AND mood=\"~A\" AND tense=\"~A\"" (string->symbol name)) value)))) verbprop))) - (rootlist '()) + (stemlist '()) (outlist '())) -; (format #t "ARGS: ~A/~A/~A~%" inlist rootlist outlist) +; (format #t "ARGS: ~A/~A/~A~%" inlist stemlist outlist) (cond ((null? inlist) - (if (null? rootlist) + (if (null? stemlist) outlist - (cons (cons #:root rootlist) outlist))) - ((eq? (caar inlist) #:root) - (loop (cdr inlist) (cons (cdar inlist) rootlist) outlist)) + (cons (cons #:stem stemlist) outlist))) + ((eq? (caar inlist) #:stem) + (loop (cdr inlist) (cons (cdar inlist) stemlist) outlist)) (else - (loop (cdr inlist) rootlist (cons (car inlist) outlist)))))))) + (loop (cdr inlist) stemlist (cons (car inlist) outlist)))))))) -(define (thema-aoristoy-mesapathitikis-A root) +(define (thema-aoristoy-mesapathitikis-A stem) (cond - ((elstr-suffix? root "αίν") - (elstr-append (elstr-trim root -3) "ανθ")) ;; FIXME: Also αθ, ηθ + ((elstr-suffix? stem "αίν") + (elstr-append (elstr-trim stem -3) "ανθ")) ;; FIXME: Also αθ, ηθ ((and - (elstr-suffix? root "ν") - (logand (elstr-char-prop-bitmask root -2) elmorph:vowel)) - (elstr-append (elstr-trim root -1) "θ")) ;; FIXME: also στ, νθ, θ + (elstr-suffix? stem "ν") + (logand (elstr-char-prop-bitmask stem -2) elmorph:vowel)) + (elstr-append (elstr-trim stem -1) "θ")) ;; FIXME: also στ, νθ, θ ((and - (elstr-suffix? root "δ" "θ" "ζ" "ν") ;; FIXME: see above - (logand (elstr-char-prop-bitmask root -2) elmorph:vowel)) - (elstr-append (elstr-trim root -1) "στ")) - ((elstr-suffix? root "γγ" "σσ" "ττ" "χν" "γ" "ζ" "κ" "χ") => + (elstr-suffix? stem "δ" "θ" "ζ" "ν") ;; FIXME: see above + (logand (elstr-char-prop-bitmask stem -2) elmorph:vowel)) + (elstr-append (elstr-trim stem -1) "στ")) + ((elstr-suffix? stem "γγ" "σσ" "ττ" "χν" "γ" "ζ" "κ" "χ") => (lambda (suf) - (elstr-append (elstr-trim root (- 0 (elstr-length (string->elstr suf)))) + (elstr-append (elstr-trim stem (- 0 (elstr-length (string->elstr suf)))) "χτ"))) ;; also χθ - ((elstr-suffix? root "π" "β" "φ" "πτ" "φτ") => + ((elstr-suffix? stem "π" "β" "φ" "πτ" "φτ") => (lambda (suf) - (elstr-append (elstr-trim root (- 0 (elstr-length (string->elstr suf)))) + (elstr-append (elstr-trim stem (- 0 (elstr-length (string->elstr suf)))) "φτ"))) ;; also φθ - ((elstr-suffix? root "αύ" "εύ") => + ((elstr-suffix? stem "αύ" "εύ") => (lambda (suf) - (elstr-append root "τ"))) - ((elstr-suffix? root "άρ" "ίρ") - ((elstr-append root "ιστ"))) - ((logand (elstr-char-prop-bitmask root -1) elmorph:vowel) - (elstr-append root "θ")) + (elstr-append stem "τ"))) + ((elstr-suffix? stem "άρ" "ίρ") + ((elstr-append stem "ιστ"))) + ((logand (elstr-char-prop-bitmask stem -1) elmorph:vowel) + (elstr-append stem "θ")) (else #f))) -(define (thema-aoristoy-mesapathitikis-B root conj-aor) - (let ((root-aor (elstr-trim (list-ref conj-aor 0) -1))) +(define (thema-aoristoy-mesapathitikis-B stem conj-aor) + (let ((stem-aor (elstr-trim (list-ref conj-aor 0) -1))) (cond - ((elstr-suffix? root-aor "σ") - (elstr-append root - (elstr-slice root-aor -2 1) + ((elstr-suffix? stem-aor "σ") + (elstr-append stem + (elstr-slice stem-aor -2 1) "θ")) - ((elstr-suffix? root-aor "ξ") - (elstr-append root - (elstr-slice root-aor -2 1) + ((elstr-suffix? stem-aor "ξ") + (elstr-append stem + (elstr-slice stem-aor -2 1) "χτ")) - ((elstr-suffix? root-aor "ψ") - (elstr-append root - (elstr-slice root-aor -2 1) + ((elstr-suffix? stem-aor "ψ") + (elstr-append stem + (elstr-slice stem-aor -2 1) "φτ")) (else - (elstr-append root "ηθ"))))) + (elstr-append stem "ηθ"))))) (define (lookup-verb-info verb voice thema) (ellinika:sql-query - "SELECT root FROM irregular_root \ + "SELECT stem FROM irregular_stem \ WHERE verb=\"~A\" AND voice=\"~A\" AND thema=\"~A\"" verb voice thema)) -(define (verb-A-root verb) +(define (verb-A-stem verb) (cond ((elstr-suffix? verb "ω") (elstr-trim verb -1)) @@ -203,57 +203,57 @@ WHERE verb=\"~A\" AND voice=\"~A\" AND thema=\"~A\"" (if (and (null? tmpres) (string=? thema "sub")) (lookup-verb-info verb voice "aor") tmpres)))) - (verb-set! vinfo #:root + (verb-set! vinfo #:stem (cond ((not (null? result)) - (verb-set! vinfo #:attested 'root) + (verb-set! vinfo #:attested 'stem) (map car result)) ((string=? (verb-get vinfo #:conj) "A") - (let ((root (verb-A-root elverb))) + (let ((stem (verb-A-stem elverb))) (cond ((string=? thema "pres") - (verb-set! vinfo #:attested 'root) - root) + (verb-set! vinfo #:attested 'stem) + stem) ((or (string=? thema "aor") (string=? thema "sub")) (if (string=? voice "act") - (elstr-thema-aoristoy root) - (thema-aoristoy-mesapathitikis-A root))) + (elstr-thema-aoristoy stem) + (thema-aoristoy-mesapathitikis-A stem))) (else #f)))) ((string=? (verb-get vinfo #:conj) "A-depon") - (let ((root (verb-A-root elverb))) + (let ((stem (verb-A-stem elverb))) (cond ((string=? thema "pres") - (verb-set! vinfo #:attested 'root) - root) + (verb-set! vinfo #:attested 'stem) + stem) ((or (string=? thema "aor") (string=? thema "sub")) #f) ; FIXME (else #f)))) ((string=? (verb-get vinfo #:conj) "B1") - (let ((root (if (elstr-suffix? elverb "άω") + (let ((stem (if (elstr-suffix? elverb "άω") (elstr-trim elverb -2) (elstr-trim elverb -1)))) (cond ((or (string=? voice "act") (string=? thema "pres")) - (verb-set! vinfo #:attested 'root) - root) + (verb-set! vinfo #:attested 'stem) + stem) ((or (string=? thema "aor") (string=? thema "sub")) (thema-aoristoy-mesapathitikis-B - root + stem (list-ref (conjugate verb "act" "ind" "Αόριστος") 0))) (else #f)))) ((string=? (verb-get vinfo #:conj) "B2") - (let ((root (elstr-trim elverb -1))) + (let ((stem (elstr-trim elverb -1))) (cond ((or (string=? voice "act") (string=? thema "pres")) - (verb-set! vinfo #:attested 'root) - root) + (verb-set! vinfo #:attested 'stem) + stem) ((or (string=? thema "aor") (string=? thema "sub")) - (elstr-append root "ηθ")) ;; FIXME: guesswork + (elstr-append stem "ηθ")) ;; FIXME: guesswork (else #f)))) (else @@ -372,12 +372,12 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold" (conj-info #:accmap conj) "000000")))) -(define (apply-flect conj vinfo verb root) +(define (apply-flect conj vinfo verb stem) ; (format #t "VINFO ~A~%" vinfo) (let ((suffix (get-suffix conj vinfo)) (accmap (string->list (get-accmap conj vinfo))) (augment "")) -; (format #t "ROOT ~A, ACCMAP ~S, SUFFIX: ~A~%" root accmap suffix) +; (format #t "STEM ~A, ACCMAP ~S, SUFFIX: ~A~%" stem accmap suffix) (cond ((> (length accmap) 6) (set! accmap (list-head accmap 6)) @@ -393,7 +393,7 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold" personal-form)) ((not flect) #f) ((char=? acc #\0) - (let* ((rs (force-elstr root)) + (let* ((rs (force-elstr stem)) (suf (elstr-deaccent (elstr-append suffix flect))) (result (elstr-append rs suf)) (nsyl (elstr-number-of-syllables result)) @@ -411,12 +411,12 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold" (elstr-set-accent result acc-syl))))) ((char=? acc #\f) (elstr-append - (elstr-deaccent (elstr-append root suffix)) + (elstr-deaccent (elstr-append stem suffix)) flect)) ((char=? acc #\s) (let ((nsyl (elstr-number-of-syllables flect))) (elstr-set-accent - (elstr-append root suffix flect) + (elstr-append stem suffix flect) (if (< nsyl 2) (+ nsyl 1) 3)))) @@ -425,7 +425,7 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold" ((char-numeric? acc) (let ((num (- (char->integer acc) (char->integer #\0)))) (let ((obj (elstr-append - root suffix flect))) + stem suffix flect))) (if (and augment (= (+ (elstr-number-of-syllables obj) 1) num)) (set! obj (elstr-append augment obj))) @@ -461,7 +461,7 @@ AND i.tense=\"~A\" AND i.ident=f.ident" (if (not (null? res)) (append (car res) (list "I" - '(class root))) + '(class stem))) #f))) (define (merge-conjugated-forms lista listb) @@ -556,8 +556,8 @@ AND i.tense=\"~A\" AND i.ident=f.ident" (conj-info #:auxtense conj))))) (else (let ((vinfo (copy-tree vinfo))) - (if (verb-get vinfo #:root) - (verb-set! vinfo #:attested 'root) + (if (verb-get vinfo #:stem) + (verb-set! vinfo #:attested 'stem) (let ((thema (string-split (conj-info #:thema conj) #\:))) ; (format #t "THEMA ~A~%" thema) (complement-verb-info vinfo verb @@ -577,7 +577,7 @@ AND i.tense=\"~A\" AND i.ident=f.ident" (conj-info #:fold conj)) prev)) prev - (verb-get vinfo #:root)))))) + (verb-get vinfo #:stem)))))) '() conj-list)))))))) diff --git a/src/ellinika/test-conjugation.scm b/src/ellinika/test-conjugation.scm index 1504553..64be1fd 100644 --- a/src/ellinika/test-conjugation.scm +++ b/src/ellinika/test-conjugation.scm @@ -45,7 +45,7 @@ (else (if (not (member 'class att)) (display "*")) - (if (not (member 'root att)) + (if (not (member 'stem att)) (display "!")))) (display conj))))) (newline)) |