aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-20 17:20:55 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-06-20 17:21:58 +0300
commit338097b8af7c7095db714782ac864ad9f0584b0f (patch)
tree9d849e31b537a9808e0e6cfe793b1595f62bb5d0
parentb6bbb4f2cf0144aa58701cd2b46277838743a277 (diff)
downloadellinika-338097b8af7c7095db714782ac864ad9f0584b0f.tar.gz
ellinika-338097b8af7c7095db714782ac864ad9f0584b0f.tar.bz2
Minor stylistic change: use "stem" for \thema rhmatos.
-rw-r--r--data/dbverb.struct6
-rw-r--r--data/irregular-verbs.xml130
-rw-r--r--scm/verbop.scm18
-rw-r--r--src/cgi-bin/conj.scm41
-rw-r--r--src/ellinika/conjugator.scm138
-rw-r--r--src/ellinika/test-conjugation.scm2
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
@@ -280,14 +280,14 @@ CREATE TABLE individual_verb(
mood enum('ind','sub','imp'),
tense varchar(128),
ident int(32),
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
@@ -138,25 +138,25 @@
<v>
<a>άγω</a>
<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>
<v>
<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> <!-- ή "ανέβα"; -->
<p n="p" p="2">ανεβείτε</p>
</t>
</imp>
@@ -165,39 +165,39 @@
</v>
<v>
<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>
<v>
<a>αρέσω</a>
<c>A</c>
<act>
- <root theme="aor">αρεσ</root>
+ <stem theme="aor">αρεσ</stem>
</act>
</v>
<v>
<a>βάλλω</a>
<c>A</c>
<act>
- <root theme="aor">βαλ</root>
+ <stem theme="aor">βαλ</stem>
</act>
</v>
<v>
<a>βαραίνω</a>
<c>A</c>
<act>
- <root theme="aor">βαρυν</root>
+ <stem theme="aor">βαρυν</stem>
</act>
</v>
<v>
<a>βαστώ</a>
<c>B1</c>
@@ -205,32 +205,32 @@
</v>
<v>
<a>βγάζω</a>
<c>A</c>
<act>
- <root theme="aor">βγαλ</root>
+ <stem theme="aor">βγαλ</stem>
</act>
</v>
<v>
<a>βγαίνω</a>
<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>
<v>
<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>
</t>
<t name="Μέλλοντας στιγμιαίος">
<p n="p" p="2" prop="true">δείτε</p>
@@ -246,36 +246,36 @@
<p n="s" p="2">δες</p>
<p n="p" p="2">δείτε,δέστε</p>
</t>
</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>
</v>
<v>
<a>βρίσκω</a>
<c>A</c>
<act>
- <root theme="aor">βρήκ</root>
+ <stem theme="aor">βρήκ</stem>
<ind>
<t name="Αόριστος">
<accmap>000000</accmap>
</t>
<t name="Μέλλοντας στιγμιαίος">
<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>
</t>
</sub>
<imp>
@@ -297,29 +297,29 @@
</v>
<v>
<a>γέρνω</a>
<c>A</c>
<act>
- <root theme="aor">γειρ</root>
+ <stem theme="aor">γειρ</stem>
</act>
</v>
<v>
<a>γίνομαι</a> <!-- FIXME: deponentium -->
<c>A</c>
<act>
- <root theme="aor">γίν</root>
+ <stem theme="aor">γίν</stem>
</act>
</v>
<v>
<a>διαβαίνω</a>
<c>A</c>
<act>
- <root theme="aor">διάβηκ</root>
+ <stem theme="aor">διάβηκ</stem>
<sub>
<t name="Αόριστος">
<p n="s" p="1">διαβώ</p>
<p n="s" p="2">διαβείς</p>
<p n="s" p="3">διαβεί</p>
<p n="p" p="1">διαβούμε</p>
@@ -331,33 +331,33 @@
</v>
<v>
<a>διδάσκω</a>
<c>A</c>
<act>
- <root theme="aor">διδαξ</root>
+ <stem theme="aor">διδαξ</stem>
</act>
</v>
<v>
<a>δίνω</a>
<c>A</c>
<act>
- <root theme="aor">δωσ</root>
+ <stem theme="aor">δωσ</stem>
</act>
</v>
<v>
<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>
</t>
<t name="Αόριστος">
<p n="s" p="2">έλα</p>
@@ -368,16 +368,16 @@
</v>
<v>
<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>
<accmap>333333+</accmap>
</t>
</ind>
@@ -394,54 +394,54 @@
</v>
<v>
<a>καίω</a>
<c>A</c>
<act>
- <root theme="aor">καψ</root>
+ <stem theme="aor">καψ</stem>
</act>
</v>
<v>
<a>κάν</a>
<c>A</c>
</v>
<v>
<a>κλαίω</a>
<c>A</c>
<act>
- <root theme="aor">κλαψ</root>
+ <stem theme="aor">κλαψ</stem>
</act>
</v>
<v>
<a>λαβαίνω</a>
<c>A</c>
<act>
- <root theme="aor">λαβ</root>
+ <stem theme="aor">λαβ</stem>
</act>
</v>
<v>
<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>
<p n="s" p="2">λες</p>
<p n="s" p="3">λέει</p>
<p n="p" p="1">λέμε</p>
<p n="p" p="2">λέτε</p>
<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>
</t>
<t name="Μέλλοντας στιγμιαίος">
<p n="p" p="2" prop="true">πείτε</p>
@@ -451,34 +451,34 @@
<t name="Αόριστος">
<p n="p" p="2" prop="true">πείτε</p>
</t>
</sub>
<imp>
<t name="Ενεστώτας">
- <prop name="root">λέγ</prop>
+ <prop name="stem">λέγ</prop>
</t>
<t name="Αόριστος">
<p n="s" p="2">πες</p>
<p n="p" p="2">πείτε,πέστε</p>
</t>
</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>
</t>
</imp>
</pas>
@@ -487,23 +487,23 @@
<!-- FIXME: λέγω -> λέω -->
<v>
<a>μαθαίνω</a>
<c>A</c>
<act>
- <root theme="aor">μαθ</root>
+ <stem theme="aor">μαθ</stem>
</act>
</v>
<v>
<a>μπαίνω</a>
<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>
<p n="p" p="2">μπείτε</p>
</t>
</imp>
@@ -517,13 +517,13 @@
</v>
<v>
<a>παθαίνω</a>
<c>A</c>
<act>
- <root theme="aor">παθ</root>
+ <stem theme="aor">παθ</stem>
</act>
</v>
<v>
<a>περνώ</a>
<c>B1</c>
@@ -531,22 +531,22 @@
</v>
<v>
<a>πέφτω</a>
<c>A</c>
<act>
- <root theme="aor">πεσ</root>
+ <stem theme="aor">πεσ</stem>
</act>
</v>
<v>
<a>πηγαίνω</a>
<c>A</c>
<accmap>000000</accmap>
<act>
- <root theme="aor">πήγ</root>
+ <stem theme="aor">πήγ</stem>
<ind>
<t name="Μέλλοντας στιγμιαίος">
<p n="s" p="1">θα πάω</p>
<p n="s" p="2">θα πας</p>
<p n="s" p="3">θα πάει</p>
<p n="p" p="1">θα πάμε</p>
@@ -575,14 +575,14 @@
<v>
<a>πίνω</a>
<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>
<p n="p" p="2">πιείτε,πιέστε</p>
</t>
</imp>
@@ -590,59 +590,59 @@
</v>
<v>
<a>πλέω</a>
<c>A</c>
<act>
- <root theme="aor">πλευσ</root>
+ <stem theme="aor">πλευσ</stem>
</act>
</v>
<v>
<a>πονώ</a>
<c>A</c>
<act>
- <root theme="aor">πονεσ</root>
+ <stem theme="aor">πονεσ</stem>
</act>
</v>
<!-- FIXME σέβομαι -->
<v>
<a>σέρνω</a>
<c>A</c>
<act>
- <root theme="aor">συρ</root>
+ <stem theme="aor">συρ</stem>
</act>
</v>
<v>
<a>σπέρνω</a>
<c>A</c>
<act>
- <root theme="aor">σπειρ</root>
+ <stem theme="aor">σπειρ</stem>
</act>
</v>
<!-- FIXME: στέκομαι,στέκο -->
<v>
<a>στέλνω</a>
<c>A</c>
<act>
- <root theme="aor">στείλ</root>
+ <stem theme="aor">στείλ</stem>
</act>
</v>
<!-- FIXME: συμβαίνει -->
<v>
<a>τείνω</a>
<c>A</c>
<act>
- <root theme="aor">τειν</root>
+ <stem theme="aor">τειν</stem>
</act>
</v>
<v>
<a>τραβώ</a>
<c>B1</c>
@@ -650,50 +650,50 @@
</v>
<v>
<a>τρέφω</a>
<c>A</c>
<act>
- <root theme="aor">θρεψ</root>
+ <stem theme="aor">θρεψ</stem>
</act>
</v>
<v>
<a>τρώω</a>
<c>A</c>
<act>
- <root theme="aor">φαγ</root>
- <root theme="sub">φα</root>
+ <stem theme="aor">φαγ</stem>
+ <stem theme="sub">φα</stem>
</act>
</v>
<v>
<a>τυχαίνω</a>
<c>A</c>
<act>
- <root theme="aor">τυχ</root>
+ <stem theme="aor">τυχ</stem>
</act>
</v>
<v>
<a>υπάρχω</a>
<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>
<!-- FIXME: υπόσχομαι, φαίνομαι -->
<v>
<a>φέυγω</a>
<c>A</c>
<act>
- <root theme="aor">φυγ</root>
+ <stem theme="aor">φυγ</stem>
</act>
</v>
<v>
<a>φορώ</a>
<c>B1</c>
@@ -701,29 +701,29 @@
</v>
<v>
<a>φταίω</a>
<c>A</c>
<act>
- <root theme="aor">φταιξ</root>
+ <stem theme="aor">φταιξ</stem>
</act>
</v>
<!-- FIXME χαίρομαι -->
<v>
<a>χορταίνω</a>
<c>A</c>
<act>
- <root theme="aor">χορτασ</root>
+ <stem theme="aor">χορτασ</stem>
</act>
</v>
<v>
<a>ψέλνω</a>
<c>A</c>
<act>
- <root theme="aor">ψαλ</root>
+ <stem theme="aor">ψαλ</stem>
</act>
</v>
</i>
diff --git a/scm/verbop.scm b/scm/verbop.scm
index 8308d70..464c384 100644
--- a/scm/verbop.scm
+++ b/scm/verbop.scm
@@ -128,13 +128,13 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (command-line))" "$@"
(let ((ret conjugation))
(set! conjugation #f)
ret))
(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)
(set-cdr! entry (cons (cdr val) (cdr entry)))))
(else
(cons key (list val))))))
@@ -226,17 +226,17 @@ VALUES (~Q,~Q,~Q,~Q,~Q)"
voice
mood
tense
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
(car val)
(cdr val)))
(cdr mood))
@@ -606,34 +606,34 @@ VALUES (~Q,~Q,~Q,~Q)"
"imp"
(tag attr text)
(check-parent tag "act" "pas")
(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")))
(cond
((not theme)
(xmltrans:parse-error #f "Required attribute `theme' not specified")
(mark-invalid))
((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))))
#f)
@@ -832,13 +832,13 @@ Informational options:
(cond
(cleanup-option
(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
(cons "I"
(if ellinika:sql-dry-run
(list "A" "B1" "B2")
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
@@ -406,13 +406,12 @@ ifelse(IFACE,[CGI],(cgi:init))
(display name)
(display "=")
(display v)))))))
(cgi:names))))
(cons "@@conj@@"
(lambda ()
- (format #t "<!-- ~A -->" (environ))
(dict-connect)
(main-form)
(do-conj)
(if (not (null? unattested))
(footnotes)))))))
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
@@ -45,13 +45,13 @@
((#:verb)
(list-set! verb 1 value))
((#:attested)
(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
(set-cdr! container value)
(list-set! verb 2 (append (list-ref verb 2)
(list
@@ -116,80 +116,80 @@ verb=\"~A\" AND voice=\"~A\" AND mood=\"~A\" AND tense=\"~A\""
(cons #:override
(string-split value #\,))
(cons (symbol->keyword
(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))
((elstr-suffix? verb "ομαι")
(elstr-trim verb -4))
(else
@@ -200,63 +200,63 @@ WHERE verb=\"~A\" AND voice=\"~A\" AND thema=\"~A\""
; (format #t "COMPLEMENT ~A~%" vinfo)
(let ((elverb (string->elstr verb))
(result (let ((tmpres (lookup-verb-info verb voice thema)))
(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
#f)))))
(define-syntax conj-info
@@ -369,18 +369,18 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold"
(or (verb-get vinfo #:accmap)
t)))
(or (verb-get vinfo #:accmap)
(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))
(set! augment (or (verb-get vinfo #:augment) "ε"))))
; (format #t "AUGMENT ~A ~A~%" vinfo (verb-get vinfo #:augment))
(let ((forms
@@ -390,13 +390,13 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold"
((verb-get vinfo (symbol->keyword
(string->symbol (number->string person)))) =>
(lambda (personal-form)
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))
(acc-syl (+ (- nsyl
(let ((n (accented-syllable-0 rs)))
(if (= 0 n)
@@ -408,27 +408,27 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold"
((> acc-syl 3)
(elstr-set-accent result 3)) ; FIXME
(else
(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))))
((char=? acc #\-)
#f)
((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)))
(let ((nsyl (elstr-number-of-syllables obj)))
(elstr-set-accent! obj (cond
((< num nsyl) num)
@@ -458,13 +458,13 @@ FROM individual_verb i,verbflect f \
WHERE i.verb=\"~A\" AND i.voice=\"~A\" AND i.mood=\"~A\"\
AND i.tense=\"~A\" AND i.ident=f.ident"
verb voice mood tense)))
(if (not (null? res))
(append (car res)
(list "I"
- '(class root)))
+ '(class stem)))
#f)))
(define (merge-conjugated-forms lista listb)
(map
(lambda (a b)
(or a b))
@@ -553,14 +553,14 @@ AND i.tense=\"~A\" AND i.ident=f.ident"
prev))
prev
(conjugate verb voice "ind"
(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
(if (null? (cdr thema))
voice
(car (cdr thema)))
@@ -574,13 +574,13 @@ AND i.tense=\"~A\" AND i.ident=f.ident"
(append (apply-flect conj vinfo verb stem)
(list (verb-get vinfo #:conj)