48ecd83421
- Fix wrong ELP import paths in soul.el, elp-input.el, studio.el (../foundation/elp/src → ../foundation/el/elp/src) - Add missing import "morphology.el" to all 29 language morphology modules - Recompile all affected dist/*.c with correct cross-module declarations - Add dist/elp-c-decls.h: C-level master forward declarations for ELP package (enables elb --force-include to resolve undeclared cross-module calls)
1094 lines
34 KiB
C
Generated
1094 lines
34 KiB
C
Generated
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include "el_runtime.h"
|
|
|
|
el_val_t str_ends(el_val_t s, el_val_t suf);
|
|
el_val_t str_last_char(el_val_t s);
|
|
el_val_t str_last2(el_val_t s);
|
|
el_val_t str_last3(el_val_t s);
|
|
el_val_t str_drop_last(el_val_t s, el_val_t n);
|
|
el_val_t is_vowel(el_val_t c);
|
|
el_val_t morph_apply_suffix(el_val_t base, el_val_t suffix);
|
|
el_val_t en_irregular_plural(el_val_t word);
|
|
el_val_t en_irregular_singular(el_val_t word);
|
|
el_val_t en_irregular_verb(el_val_t base);
|
|
el_val_t en_verb_3sg(el_val_t base);
|
|
el_val_t en_should_double_final(el_val_t base);
|
|
el_val_t en_verb_past(el_val_t base);
|
|
el_val_t en_verb_gerund(el_val_t base);
|
|
el_val_t en_pluralize_regular(el_val_t singular);
|
|
el_val_t en_verb_form(el_val_t base, el_val_t tense, el_val_t person, el_val_t number);
|
|
el_val_t agree_determiner(el_val_t det, el_val_t noun);
|
|
el_val_t morph_pluralize(el_val_t noun, el_val_t profile);
|
|
el_val_t morph_map_canonical(el_val_t verb, el_val_t code);
|
|
el_val_t morph_conjugate(el_val_t verb, el_val_t tense, el_val_t person, el_val_t number, el_val_t profile);
|
|
el_val_t morph_inflect(el_val_t word, el_val_t features, el_val_t profile);
|
|
el_val_t pluralize(el_val_t singular);
|
|
el_val_t singularize(el_val_t plural);
|
|
el_val_t verb_form(el_val_t base, el_val_t tense, el_val_t person, el_val_t number);
|
|
el_val_t irregular_plural(el_val_t word);
|
|
el_val_t irregular_singular(el_val_t word);
|
|
el_val_t grc_str_ends(el_val_t s, el_val_t suf);
|
|
el_val_t grc_str_drop_last(el_val_t s, el_val_t n);
|
|
el_val_t grc_str_last_char(el_val_t s);
|
|
el_val_t grc_str_last2(el_val_t s);
|
|
el_val_t grc_str_last3(el_val_t s);
|
|
el_val_t grc_slot(el_val_t person, el_val_t number);
|
|
el_val_t grc_map_canonical(el_val_t verb);
|
|
el_val_t grc_einai_present(el_val_t slot);
|
|
el_val_t grc_einai_imperfect(el_val_t slot);
|
|
el_val_t grc_einai_future(el_val_t slot);
|
|
el_val_t grc_echein_present(el_val_t slot);
|
|
el_val_t grc_echein_imperfect(el_val_t slot);
|
|
el_val_t grc_echein_aorist(el_val_t slot);
|
|
el_val_t grc_echein_future(el_val_t slot);
|
|
el_val_t grc_legein_present(el_val_t slot);
|
|
el_val_t grc_legein_imperfect(el_val_t slot);
|
|
el_val_t grc_legein_aorist(el_val_t slot);
|
|
el_val_t grc_legein_future(el_val_t slot);
|
|
el_val_t grc_horao_present(el_val_t slot);
|
|
el_val_t grc_horao_imperfect(el_val_t slot);
|
|
el_val_t grc_horao_aorist(el_val_t slot);
|
|
el_val_t grc_horao_future(el_val_t slot);
|
|
el_val_t grc_erchesthai_present(el_val_t slot);
|
|
el_val_t grc_erchesthai_imperfect(el_val_t slot);
|
|
el_val_t grc_erchesthai_aorist(el_val_t slot);
|
|
el_val_t grc_erchesthai_future(el_val_t slot);
|
|
el_val_t grc_thematic_present_ending(el_val_t slot);
|
|
el_val_t grc_thematic_imperfect_ending(el_val_t slot);
|
|
el_val_t grc_thematic_future_ending(el_val_t slot);
|
|
el_val_t grc_weak_aorist_ending(el_val_t slot);
|
|
el_val_t grc_present_stem(el_val_t verb);
|
|
el_val_t grc_conjugate(el_val_t verb, el_val_t tense, el_val_t person, el_val_t number);
|
|
el_val_t grc_declension(el_val_t noun);
|
|
el_val_t grc_decline_2m(el_val_t stem, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_decline_2n(el_val_t stem, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_decline_1a(el_val_t stem, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_decline_1e(el_val_t stem, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_decline(el_val_t noun, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_article_masculine(el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_article_feminine(el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_article_neuter(el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_article(el_val_t gender, el_val_t gram_case, el_val_t number);
|
|
el_val_t grc_infer_gender(el_val_t noun);
|
|
el_val_t grc_noun_phrase(el_val_t noun, el_val_t gram_case, el_val_t number, el_val_t definite);
|
|
|
|
el_val_t grc_str_ends(el_val_t s, el_val_t suf) {
|
|
return str_ends_with(s, suf);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_str_drop_last(el_val_t s, el_val_t n) {
|
|
el_val_t len = str_len(s);
|
|
if (n >= len) {
|
|
return EL_STR("");
|
|
}
|
|
return str_slice(s, 0, (len - n));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_str_last_char(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n == 0) {
|
|
return EL_STR("");
|
|
}
|
|
return str_slice(s, (n - 1), n);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_str_last2(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n < 2) {
|
|
return s;
|
|
}
|
|
return str_slice(s, (n - 2), n);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_str_last3(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n < 3) {
|
|
return s;
|
|
}
|
|
return str_slice(s, (n - 3), n);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_slot(el_val_t person, el_val_t number) {
|
|
if (str_eq(person, EL_STR("first"))) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
return 0;
|
|
}
|
|
return 3;
|
|
}
|
|
if (str_eq(person, EL_STR("second"))) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
return 1;
|
|
}
|
|
return 4;
|
|
}
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
return 2;
|
|
}
|
|
return 5;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_map_canonical(el_val_t verb) {
|
|
if (str_eq(verb, EL_STR("be"))) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb0\xce\xbd\xce\xb1\xce\xb9");
|
|
}
|
|
if (str_eq(verb, EL_STR("have"))) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xb5\xce\xb9\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("say"))) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xb5\xce\xb9\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("see"))) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xce\xac\xcf\x89");
|
|
}
|
|
if (str_eq(verb, EL_STR("come"))) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xb5\xcf\x83\xce\xb8\xce\xb1\xce\xb9");
|
|
}
|
|
if (str_eq(verb, EL_STR("go"))) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xb5\xcf\x83\xce\xb8\xce\xb1\xce\xb9");
|
|
}
|
|
if (str_eq(verb, EL_STR("know"))) {
|
|
return EL_STR("\xce\xb3\xce\xb9\xce\xb3\xce\xbd\xcf\x8e\xcf\x83\xce\xba\xce\xb5\xce\xb9\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("write"))) {
|
|
return EL_STR("\xce\xb3\xcf\x81\xce\xac\xcf\x86\xce\xb5\xce\xb9\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("hear"))) {
|
|
return EL_STR("\xe1\xbc\x80\xce\xba\xce\xbf\xcf\x8d\xce\xb5\xce\xb9\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("want"))) {
|
|
return EL_STR("\xce\xb2\xce\xbf\xcf\x8d\xce\xbb\xce\xb5\xcf\x83\xce\xb8\xce\xb1\xce\xb9");
|
|
}
|
|
if (str_eq(verb, EL_STR("do"))) {
|
|
return EL_STR("\xcf\x80\xce\xbf\xce\xb9\xce\xb5\xe1\xbf\x96\xce\xbd");
|
|
}
|
|
if (str_eq(verb, EL_STR("make"))) {
|
|
return EL_STR("\xcf\x80\xce\xbf\xce\xb9\xce\xb5\xe1\xbf\x96\xce\xbd");
|
|
}
|
|
return verb;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_einai_present(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb0\xce\xbc\xce\xaf");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x90\xcf\x83\xcf\x84\xce\xaf");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x90\xcf\x83\xce\xbc\xce\xad\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x90\xcf\x83\xcf\x84\xce\xad");
|
|
}
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb0\xcf\x83\xce\xaf");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_einai_imperfect(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\xa6\xcf\x83\xce\xb8\xce\xb1");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbd");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\xa6\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\xa6\xcf\x83\xce\xb1\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_einai_future(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xce\xbf\xce\xbc\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xe1\xbf\x83");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x84\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x90\xcf\x83\xcf\x8c\xce\xbc\xce\xb5\xce\xb8\xce\xb1");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xce\xb5\xcf\x83\xce\xb8\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xce\xbf\xce\xbd\xcf\x84\xce\xb1\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_echein_present(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x94\xcf\x87\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_echein_imperfect(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x87\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x87\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x87\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xcf\x87\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xcf\x87\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x87\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_echein_aorist(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x94\xcf\x83\xcf\x87\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_echein_future(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x95\xce\xbe\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_legein_present(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_legein_imperfect(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x94\xce\xbb\xce\xb5\xce\xb3\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x94\xce\xbb\xce\xb5\xce\xb3\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x94\xce\xbb\xce\xb5\xce\xb3\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x90\xce\xbb\xce\xad\xce\xb3\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x90\xce\xbb\xce\xad\xce\xb3\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x94\xce\xbb\xce\xb5\xce\xb3\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_legein_aorist(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x80\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x80\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x80\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xcf\x80\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xcf\x80\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x80\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_legein_future(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xbb\xce\xad\xce\xbe\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_horao_present(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xce\xac\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xce\xac\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xe1\xbe\xb7");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xe1\xbf\xb6\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xe1\xbe\xb6\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbd\x81\xcf\x81\xe1\xbf\xb6\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_horao_imperfect(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x91\xcf\x8e\xcf\x81\xcf\x89\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x91\xcf\x8e\xcf\x81\xce\xb1\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x91\xcf\x8e\xcf\x81\xce\xb1");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x91\xcf\x89\xcf\x81\xe1\xbf\xb6\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x91\xcf\x89\xcf\x81\xe1\xbe\xb6\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x91\xcf\x8e\xcf\x81\xcf\x89\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_horao_aorist(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xce\xb4\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xce\xb4\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xce\xb4\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xce\xb4\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb4\xce\xb4\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xce\xb4\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_horao_future(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbd\x84\xcf\x88\xce\xbf\xce\xbc\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbd\x84\xcf\x88\xe1\xbf\x83");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbd\x84\xcf\x88\xce\xb5\xcf\x84\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbd\x80\xcf\x88\xcf\x8c\xce\xbc\xce\xb5\xce\xb8\xce\xb1");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbd\x84\xcf\x88\xce\xb5\xcf\x83\xce\xb8\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbd\x84\xcf\x88\xce\xbf\xce\xbd\xcf\x84\xce\xb1\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_erchesthai_present(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xbf\xce\xbc\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xe1\xbf\x83");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xb5\xcf\x84\xce\xb1\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\x90\xcf\x81\xcf\x87\xcf\x8c\xce\xbc\xce\xb5\xce\xb8\xce\xb1");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xb5\xcf\x83\xce\xb8\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xbf\xce\xbd\xcf\x84\xce\xb1\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_erchesthai_imperfect(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\xa0\xcf\x81\xcf\x87\xcf\x8c\xce\xbc\xce\xb7\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\xa4\xcf\x81\xcf\x87\xce\xbf\xcf\x85");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\xa4\xcf\x81\xcf\x87\xce\xb5\xcf\x84\xce\xbf");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\xa0\xcf\x81\xcf\x87\xcf\x8c\xce\xbc\xce\xb5\xce\xb8\xce\xb1");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\xa4\xcf\x81\xcf\x87\xce\xb5\xcf\x83\xce\xb8\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\xa4\xcf\x81\xcf\x87\xce\xbf\xce\xbd\xcf\x84\xce\xbf");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_erchesthai_aorist(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbb\xce\xb8\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbb\xce\xb8\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbb\xce\xb8\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\xa4\xce\xbb\xce\xb8\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\xa4\xce\xbb\xce\xb8\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\xa6\xce\xbb\xce\xb8\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_erchesthai_future(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xce\xbc\xce\xb9");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5\xe1\xbc\xb6\xcf\x83\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xe1\xbc\xb4\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xe1\xbc\xb4\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xe1\xbc\xb4\xce\xb1\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_thematic_present_ending(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_thematic_imperfect_ending(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xce\xbf\xce\xbd");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xce\xb5\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xce\xbf\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_thematic_future_ending(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xcf\x83\xcf\x89");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xcf\x83\xce\xb5\xce\xb9\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xcf\x83\xce\xb5\xce\xb9");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xcf\x83\xce\xbf\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xcf\x83\xce\xb5\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xcf\x83\xce\xbf\xcf\x85\xcf\x83\xce\xb9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_weak_aorist_ending(el_val_t slot) {
|
|
if (slot == 0) {
|
|
return EL_STR("\xcf\x83\xce\xb1");
|
|
}
|
|
if (slot == 1) {
|
|
return EL_STR("\xcf\x83\xce\xb1\xcf\x82");
|
|
}
|
|
if (slot == 2) {
|
|
return EL_STR("\xcf\x83\xce\xb5");
|
|
}
|
|
if (slot == 3) {
|
|
return EL_STR("\xcf\x83\xce\xb1\xce\xbc\xce\xb5\xce\xbd");
|
|
}
|
|
if (slot == 4) {
|
|
return EL_STR("\xcf\x83\xce\xb1\xcf\x84\xce\xb5");
|
|
}
|
|
return EL_STR("\xcf\x83\xce\xb1\xce\xbd");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_present_stem(el_val_t verb) {
|
|
if (grc_str_ends(verb, EL_STR("\xce\xb5\xce\xb9\xce\xbd"))) {
|
|
return grc_str_drop_last(verb, 3);
|
|
}
|
|
if (grc_str_ends(verb, EL_STR("\xce\xb1\xcf\x89"))) {
|
|
return grc_str_drop_last(verb, 2);
|
|
}
|
|
if (grc_str_ends(verb, EL_STR("\xce\xb5\xcf\x89"))) {
|
|
return grc_str_drop_last(verb, 2);
|
|
}
|
|
if (grc_str_ends(verb, EL_STR("\xcf\x89"))) {
|
|
return grc_str_drop_last(verb, 1);
|
|
}
|
|
return verb;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_conjugate(el_val_t verb, el_val_t tense, el_val_t person, el_val_t number) {
|
|
el_val_t v = grc_map_canonical(verb);
|
|
el_val_t slot = grc_slot(person, number);
|
|
if (str_eq(v, EL_STR("\xce\xb5\xe1\xbc\xb0\xce\xbd\xce\xb1\xce\xb9"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return grc_einai_present(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return grc_einai_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return grc_einai_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return grc_einai_future(slot);
|
|
}
|
|
return v;
|
|
}
|
|
if (str_eq(v, EL_STR("\xe1\xbc\x94\xcf\x87\xce\xb5\xce\xb9\xce\xbd"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return grc_echein_present(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return grc_echein_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return grc_echein_aorist(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return grc_echein_future(slot);
|
|
}
|
|
return v;
|
|
}
|
|
if (str_eq(v, EL_STR("\xce\xbb\xce\xad\xce\xb3\xce\xb5\xce\xb9\xce\xbd"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return grc_legein_present(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return grc_legein_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return grc_legein_aorist(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return grc_legein_future(slot);
|
|
}
|
|
return v;
|
|
}
|
|
if (str_eq(v, EL_STR("\xe1\xbd\x81\xcf\x81\xce\xac\xcf\x89"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return grc_horao_present(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return grc_horao_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return grc_horao_aorist(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return grc_horao_future(slot);
|
|
}
|
|
return v;
|
|
}
|
|
if (str_eq(v, EL_STR("\xe1\xbc\x94\xcf\x81\xcf\x87\xce\xb5\xcf\x83\xce\xb8\xce\xb1\xce\xb9"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return grc_erchesthai_present(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return grc_erchesthai_imperfect(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return grc_erchesthai_aorist(slot);
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return grc_erchesthai_future(slot);
|
|
}
|
|
return v;
|
|
}
|
|
el_val_t stem = grc_present_stem(v);
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return el_str_concat(stem, grc_thematic_present_ending(slot));
|
|
}
|
|
if (str_eq(tense, EL_STR("imperfect"))) {
|
|
return el_str_concat(el_str_concat(EL_STR("\xe1\xbc\x90"), stem), grc_thematic_imperfect_ending(slot));
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return el_str_concat(stem, grc_thematic_future_ending(slot));
|
|
}
|
|
if (str_eq(tense, EL_STR("aorist"))) {
|
|
return el_str_concat(el_str_concat(EL_STR("\xe1\xbc\x90"), stem), grc_weak_aorist_ending(slot));
|
|
}
|
|
return v;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_declension(el_val_t noun) {
|
|
if (grc_str_ends(noun, EL_STR("\xce\xbf\xcf\x82"))) {
|
|
return EL_STR("2m");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xbf\xce\xbd"))) {
|
|
return EL_STR("2n");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xb1"))) {
|
|
return EL_STR("1a");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xb7"))) {
|
|
return EL_STR("1e");
|
|
}
|
|
return EL_STR("3");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_decline_2m(el_val_t stem, el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xcf\x85"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xe1\xbf\xb3"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb5"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xb9"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xcf\x89\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xb9\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xcf\x85\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xb9"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xb9"));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_decline_2n(el_val_t stem, el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xcf\x85"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xe1\xbf\xb3"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xbd"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xcf\x89\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xbf\xce\xb9\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_decline_1a(el_val_t stem, el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xe1\xbe\xb3"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xb1"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xcf\x89\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_decline_1e(el_val_t stem, el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb7"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb7\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xe1\xbf\x83"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb7\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb7"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xb7"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return el_str_concat(stem, EL_STR("\xcf\x89\xce\xbd"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xcf\x82"));
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
}
|
|
return el_str_concat(stem, EL_STR("\xce\xb1\xce\xb9"));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_decline(el_val_t noun, el_val_t gram_case, el_val_t number) {
|
|
el_val_t decl = grc_declension(noun);
|
|
if (str_eq(decl, EL_STR("2m"))) {
|
|
el_val_t stem = grc_str_drop_last(noun, 2);
|
|
return grc_decline_2m(stem, gram_case, number);
|
|
}
|
|
if (str_eq(decl, EL_STR("2n"))) {
|
|
el_val_t stem = grc_str_drop_last(noun, 2);
|
|
return grc_decline_2n(stem, gram_case, number);
|
|
}
|
|
if (str_eq(decl, EL_STR("1a"))) {
|
|
el_val_t stem = grc_str_drop_last(noun, 1);
|
|
return grc_decline_1a(stem, gram_case, number);
|
|
}
|
|
if (str_eq(decl, EL_STR("1e"))) {
|
|
el_val_t stem = grc_str_drop_last(noun, 1);
|
|
return grc_decline_1e(stem, gram_case, number);
|
|
}
|
|
return noun;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_article_masculine(el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xe1\xbd\x81");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xce\xbf\xe1\xbf\xa6");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\xb7");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xcf\x8c\xce\xbd");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xe1\xbd\x81");
|
|
}
|
|
return EL_STR("\xe1\xbd\x81");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xce\xbf\xe1\xbc\xb1");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\xb6\xce\xbd");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xce\xbf\xcf\x8d\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xce\xbf\xe1\xbc\xb1");
|
|
}
|
|
return EL_STR("\xce\xbf\xe1\xbc\xb1");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_article_feminine(el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xe1\xbc\xa1");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\x86\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\x87");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xce\xae\xce\xbd");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xe1\xbc\xa1");
|
|
}
|
|
return EL_STR("\xe1\xbc\xa1");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xce\xb1\xe1\xbc\xb1");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\xb6\xce\xbd");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xce\xb1\xe1\xbf\x96\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xce\xac\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xce\xb1\xe1\xbc\xb1");
|
|
}
|
|
return EL_STR("\xce\xb1\xe1\xbc\xb1");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_article_neuter(el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(number, EL_STR("singular"))) {
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xcf\x84\xcf\x8c");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xce\xbf\xe1\xbf\xa6");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\xb7");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xcf\x8c");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xcf\x84\xcf\x8c");
|
|
}
|
|
return EL_STR("\xcf\x84\xcf\x8c");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("nominative"))) {
|
|
return EL_STR("\xcf\x84\xce\xac");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("genitive"))) {
|
|
return EL_STR("\xcf\x84\xe1\xbf\xb6\xce\xbd");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("dative"))) {
|
|
return EL_STR("\xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("accusative"))) {
|
|
return EL_STR("\xcf\x84\xce\xac");
|
|
}
|
|
if (str_eq(gram_case, EL_STR("vocative"))) {
|
|
return EL_STR("\xcf\x84\xce\xac");
|
|
}
|
|
return EL_STR("\xcf\x84\xce\xac");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_article(el_val_t gender, el_val_t gram_case, el_val_t number) {
|
|
if (str_eq(gender, EL_STR("masculine"))) {
|
|
return grc_article_masculine(gram_case, number);
|
|
}
|
|
if (str_eq(gender, EL_STR("feminine"))) {
|
|
return grc_article_feminine(gram_case, number);
|
|
}
|
|
return grc_article_neuter(gram_case, number);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_infer_gender(el_val_t noun) {
|
|
if (grc_str_ends(noun, EL_STR("\xce\xbf\xcf\x82"))) {
|
|
return EL_STR("masculine");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xbf\xce\xbd"))) {
|
|
return EL_STR("neuter");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xb1"))) {
|
|
return EL_STR("feminine");
|
|
}
|
|
if (grc_str_ends(noun, EL_STR("\xce\xb7"))) {
|
|
return EL_STR("feminine");
|
|
}
|
|
return EL_STR("masculine");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t grc_noun_phrase(el_val_t noun, el_val_t gram_case, el_val_t number, el_val_t definite) {
|
|
el_val_t declined = grc_decline(noun, gram_case, number);
|
|
if (str_eq(definite, EL_STR("true"))) {
|
|
el_val_t gender = grc_infer_gender(noun);
|
|
el_val_t art = grc_article(gender, gram_case, number);
|
|
return el_str_concat(el_str_concat(art, EL_STR(" ")), declined);
|
|
}
|
|
return declined;
|
|
return 0;
|
|
}
|
|
|