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)
1244 lines
32 KiB
C
Generated
1244 lines
32 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 sw_str_ends(el_val_t s, el_val_t suf);
|
|
el_val_t sw_str_drop_last(el_val_t s, el_val_t n);
|
|
el_val_t sw_str_first_char(el_val_t s);
|
|
el_val_t sw_str_first2(el_val_t s);
|
|
el_val_t sw_str_first3(el_val_t s);
|
|
el_val_t sw_str_last_char(el_val_t s);
|
|
el_val_t sw_is_class1_noun(el_val_t noun);
|
|
el_val_t sw_noun_class(el_val_t noun);
|
|
el_val_t sw_subj_prefix(el_val_t person, el_val_t number, el_val_t noun_class);
|
|
el_val_t sw_obj_prefix(el_val_t person, el_val_t number, el_val_t noun_class);
|
|
el_val_t sw_tense_marker(el_val_t tense);
|
|
el_val_t sw_verb_final(el_val_t tense, el_val_t negative);
|
|
el_val_t sw_neg_subj_prefix(el_val_t person, el_val_t number, el_val_t noun_class);
|
|
el_val_t sw_verb_stem(el_val_t infinitive);
|
|
el_val_t sw_conjugate(el_val_t verb_stem, el_val_t person, el_val_t number, el_val_t noun_class, el_val_t tense);
|
|
el_val_t sw_negative(el_val_t verb_stem, el_val_t person, el_val_t number, el_val_t noun_class, el_val_t tense);
|
|
el_val_t sw_noun_plural(el_val_t noun);
|
|
el_val_t sw_adj_prefix(el_val_t noun_class, el_val_t number);
|
|
el_val_t sw_agree_adj(el_val_t adj_stem, el_val_t noun_class, el_val_t number);
|
|
el_val_t sw_demonstrative(el_val_t noun_class, el_val_t number, el_val_t proximity);
|
|
el_val_t sw_copula_present(el_val_t person, el_val_t number, el_val_t use_case);
|
|
el_val_t sw_copula_neg_present(el_val_t person, el_val_t number);
|
|
|
|
el_val_t sw_str_ends(el_val_t s, el_val_t suf) {
|
|
return str_ends_with(s, suf);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_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 sw_str_first_char(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n == 0) {
|
|
return EL_STR("");
|
|
}
|
|
return str_slice(s, 0, 1);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_str_first2(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n < 2) {
|
|
return s;
|
|
}
|
|
return str_slice(s, 0, 2);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_str_first3(el_val_t s) {
|
|
el_val_t n = str_len(s);
|
|
if (n < 3) {
|
|
return s;
|
|
}
|
|
return str_slice(s, 0, 3);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_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 sw_is_class1_noun(el_val_t noun) {
|
|
if (str_eq(noun, EL_STR("mtu"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwanafunzi"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwalimu"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mke"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mume"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mtoto"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mgeni"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwana"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mkubwa"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mdogo"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mgonjwa"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mfanyakazi"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mkulima"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwimbaji"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("msomaji"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwandishi"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mpiganaji"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("msaidizi"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mpishi"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("mwanasheria"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("daktari"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("rafiki"))) {
|
|
return 1;
|
|
}
|
|
if (str_eq(noun, EL_STR("ndugu"))) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_noun_class(el_val_t noun) {
|
|
if (sw_str_ends(noun, EL_STR("ku"))) {
|
|
if (str_eq(sw_str_first2(noun), EL_STR("ku"))) {
|
|
return EL_STR("15");
|
|
}
|
|
}
|
|
if (str_eq(sw_str_first2(noun), EL_STR("ku"))) {
|
|
return EL_STR("15");
|
|
}
|
|
el_val_t p2 = sw_str_first2(noun);
|
|
if (str_eq(p2, EL_STR("ku"))) {
|
|
return EL_STR("15");
|
|
}
|
|
el_val_t p3 = sw_str_first3(noun);
|
|
if (str_eq(p3, EL_STR("ki-"))) {
|
|
return EL_STR("7");
|
|
}
|
|
if (str_eq(p2, EL_STR("ki"))) {
|
|
return EL_STR("7");
|
|
}
|
|
if (str_eq(p2, EL_STR("ch"))) {
|
|
return EL_STR("7");
|
|
}
|
|
el_val_t p1 = sw_str_first_char(noun);
|
|
if (str_eq(p1, EL_STR("u"))) {
|
|
return EL_STR("11");
|
|
}
|
|
if (str_eq(p1, EL_STR("w"))) {
|
|
return EL_STR("11");
|
|
}
|
|
if (str_eq(p2, EL_STR("ji"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("jicho"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("jino"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("bega"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("tunda"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("embe"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("gari"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("bei"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("sauti"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(noun, EL_STR("thamani"))) {
|
|
return EL_STR("5");
|
|
}
|
|
if (str_eq(p1, EL_STR("m"))) {
|
|
if (sw_is_class1_noun(noun)) {
|
|
return EL_STR("1");
|
|
}
|
|
return EL_STR("3");
|
|
}
|
|
if (str_eq(p2, EL_STR("mw"))) {
|
|
if (sw_is_class1_noun(noun)) {
|
|
return EL_STR("1");
|
|
}
|
|
return EL_STR("3");
|
|
}
|
|
if (str_eq(p2, EL_STR("ny"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p2, EL_STR("ng"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p2, EL_STR("mb"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p2, EL_STR("nd"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p2, EL_STR("nj"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p2, EL_STR("nz"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(p1, EL_STR("n"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("paka"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("mbwa"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("simba"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("tembo"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("nyoka"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("samaki"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("rafiki"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("daktari"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("serikali"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("hospitali"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("shule"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("kanisa"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("ofisi"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("picha"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("sehemu"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("habari"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("nchi"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("bahari"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("dunia"))) {
|
|
return EL_STR("9");
|
|
}
|
|
if (str_eq(noun, EL_STR("ardhi"))) {
|
|
return EL_STR("9");
|
|
}
|
|
return EL_STR("9");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_subj_prefix(el_val_t person, el_val_t number, el_val_t noun_class) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("ni");
|
|
}
|
|
return EL_STR("tu");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("u");
|
|
}
|
|
return EL_STR("m");
|
|
}
|
|
if (str_eq(number, EL_STR("pl"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("2"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("4"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("ya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("6"))) {
|
|
return EL_STR("ya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("8"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("10"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
return EL_STR("zi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("a");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("u");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("4"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("li");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("6"))) {
|
|
return EL_STR("ya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("ki");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("8"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("10"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("u");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("15"))) {
|
|
return EL_STR("ku");
|
|
}
|
|
return EL_STR("a");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_obj_prefix(el_val_t person, el_val_t number, el_val_t noun_class) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("ni");
|
|
}
|
|
return EL_STR("tu");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("ku");
|
|
}
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(number, EL_STR("pl"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("2"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("4"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("ya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("6"))) {
|
|
return EL_STR("ya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("8"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("10"))) {
|
|
return EL_STR("zi");
|
|
}
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("m");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("u");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("li");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("ki");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("u");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("15"))) {
|
|
return EL_STR("ku");
|
|
}
|
|
return EL_STR("m");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_tense_marker(el_val_t tense) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return EL_STR("a");
|
|
}
|
|
if (str_eq(tense, EL_STR("progressive"))) {
|
|
return EL_STR("na");
|
|
}
|
|
if (str_eq(tense, EL_STR("past"))) {
|
|
return EL_STR("li");
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
return EL_STR("ta");
|
|
}
|
|
if (str_eq(tense, EL_STR("perfect"))) {
|
|
return EL_STR("me");
|
|
}
|
|
if (str_eq(tense, EL_STR("subjunctive"))) {
|
|
return EL_STR("");
|
|
}
|
|
if (str_eq(tense, EL_STR("remote_past"))) {
|
|
return EL_STR("li");
|
|
}
|
|
return EL_STR("na");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_verb_final(el_val_t tense, el_val_t negative) {
|
|
if (negative) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(tense, EL_STR("progressive"))) {
|
|
return EL_STR("i");
|
|
}
|
|
if (str_eq(tense, EL_STR("subjunctive"))) {
|
|
return EL_STR("e");
|
|
}
|
|
return EL_STR("a");
|
|
}
|
|
if (str_eq(tense, EL_STR("subjunctive"))) {
|
|
return EL_STR("e");
|
|
}
|
|
return EL_STR("a");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_neg_subj_prefix(el_val_t person, el_val_t number, el_val_t noun_class) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("si");
|
|
}
|
|
return EL_STR("hatu");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("hu");
|
|
}
|
|
return EL_STR("ham");
|
|
}
|
|
el_val_t pos = sw_subj_prefix(person, number, noun_class);
|
|
return el_str_concat(EL_STR("ha"), pos);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_verb_stem(el_val_t infinitive) {
|
|
if (str_eq(infinitive, EL_STR("kula"))) {
|
|
return EL_STR("l");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuwa"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kwenda"))) {
|
|
return EL_STR("enda");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuja"))) {
|
|
return EL_STR("ja");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kusoma"))) {
|
|
return EL_STR("soma");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kusema"))) {
|
|
return EL_STR("sema");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuona"))) {
|
|
return EL_STR("ona");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kufanya"))) {
|
|
return EL_STR("fanya");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kutaka"))) {
|
|
return EL_STR("taka");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kujua"))) {
|
|
return EL_STR("jua");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kupata"))) {
|
|
return EL_STR("pata");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuambia"))) {
|
|
return EL_STR("ambia");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuleta"))) {
|
|
return EL_STR("leta");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuweka"))) {
|
|
return EL_STR("weka");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuingia"))) {
|
|
return EL_STR("ingia");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kutoka"))) {
|
|
return EL_STR("toka");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kupiga"))) {
|
|
return EL_STR("piga");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuimba"))) {
|
|
return EL_STR("imba");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kucheza"))) {
|
|
return EL_STR("cheza");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kulala"))) {
|
|
return EL_STR("lala");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuandika"))) {
|
|
return EL_STR("andika");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kununua"))) {
|
|
return EL_STR("nunua");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuuza"))) {
|
|
return EL_STR("uza");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kupenda"))) {
|
|
return EL_STR("penda");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuchukua"))) {
|
|
return EL_STR("chukua");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kulipa"))) {
|
|
return EL_STR("lipa");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kusikia"))) {
|
|
return EL_STR("sikia");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuamka"))) {
|
|
return EL_STR("amka");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kukaa"))) {
|
|
return EL_STR("kaa");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kurudi"))) {
|
|
return EL_STR("rudi");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kushinda"))) {
|
|
return EL_STR("shinda");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kusaidia"))) {
|
|
return EL_STR("saidia");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuzungumza"))) {
|
|
return EL_STR("zungumza");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kupumzika"))) {
|
|
return EL_STR("pumzika");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kufika"))) {
|
|
return EL_STR("fika");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kuomba"))) {
|
|
return EL_STR("omba");
|
|
}
|
|
if (str_eq(infinitive, EL_STR("kushukuru"))) {
|
|
return EL_STR("shukuru");
|
|
}
|
|
if (str_eq(sw_str_first2(infinitive), EL_STR("ku"))) {
|
|
return str_slice(infinitive, 2, str_len(infinitive));
|
|
}
|
|
if (str_eq(sw_str_first2(infinitive), EL_STR("kw"))) {
|
|
return str_slice(infinitive, 2, str_len(infinitive));
|
|
}
|
|
return infinitive;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_conjugate(el_val_t verb_stem, el_val_t person, el_val_t number, el_val_t noun_class, el_val_t tense) {
|
|
el_val_t subj = sw_subj_prefix(person, number, noun_class);
|
|
el_val_t tm = sw_tense_marker(tense);
|
|
el_val_t fv = sw_verb_final(tense, 0);
|
|
if (str_eq(verb_stem, EL_STR("l"))) {
|
|
if (str_eq(tm, EL_STR(""))) {
|
|
return el_str_concat(subj, EL_STR("kula"));
|
|
}
|
|
return el_str_concat(el_str_concat(subj, tm), EL_STR("kula"));
|
|
}
|
|
if (str_eq(verb_stem, EL_STR("wa"))) {
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("ni");
|
|
}
|
|
return EL_STR("tu ni");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("u");
|
|
}
|
|
return EL_STR("m ni");
|
|
}
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("yuko");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("upo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("lipo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("kipo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("ipo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("upo");
|
|
}
|
|
return EL_STR("yuko");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wako");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("ipo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("yapo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("vipo");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("zipo");
|
|
}
|
|
return EL_STR("wako");
|
|
}
|
|
if (str_eq(tense, EL_STR("progressive"))) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("niko");
|
|
}
|
|
return EL_STR("tuko");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("uko");
|
|
}
|
|
return EL_STR("mko");
|
|
}
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("yuko");
|
|
}
|
|
return el_str_concat(subj, EL_STR("ko"));
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wako");
|
|
}
|
|
return el_str_concat(subj, EL_STR("ko"));
|
|
}
|
|
}
|
|
el_val_t stem_final = sw_str_last_char(verb_stem);
|
|
if (str_eq(fv, EL_STR("a"))) {
|
|
if (str_eq(stem_final, EL_STR("a"))) {
|
|
if (str_eq(tm, EL_STR(""))) {
|
|
return el_str_concat(subj, verb_stem);
|
|
}
|
|
return el_str_concat(el_str_concat(subj, tm), verb_stem);
|
|
}
|
|
}
|
|
if (str_eq(tm, EL_STR(""))) {
|
|
return el_str_concat(el_str_concat(subj, verb_stem), fv);
|
|
}
|
|
return el_str_concat(el_str_concat(el_str_concat(subj, tm), verb_stem), fv);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_negative(el_val_t verb_stem, el_val_t person, el_val_t number, el_val_t noun_class, el_val_t tense) {
|
|
el_val_t neg_subj = sw_neg_subj_prefix(person, number, noun_class);
|
|
if (str_eq(verb_stem, EL_STR("l"))) {
|
|
if (str_eq(tense, EL_STR("past"))) {
|
|
return el_str_concat(neg_subj, EL_STR("kukula"));
|
|
}
|
|
if (str_eq(tense, EL_STR("perfect"))) {
|
|
return el_str_concat(neg_subj, EL_STR("jakula"));
|
|
}
|
|
return el_str_concat(neg_subj, EL_STR("kuli"));
|
|
}
|
|
if (str_eq(tense, EL_STR("present"))) {
|
|
el_val_t fv = sw_verb_final(EL_STR("present"), 1);
|
|
el_val_t stem_no_a = verb_stem;
|
|
el_val_t slen = str_len(verb_stem);
|
|
if (slen > 0) {
|
|
el_val_t last = sw_str_last_char(verb_stem);
|
|
if (str_eq(last, EL_STR("a"))) {
|
|
return el_str_concat(el_str_concat(neg_subj, sw_str_drop_last(verb_stem, 1)), fv);
|
|
}
|
|
}
|
|
return el_str_concat(el_str_concat(neg_subj, verb_stem), fv);
|
|
}
|
|
if (str_eq(tense, EL_STR("past"))) {
|
|
return el_str_concat(el_str_concat(el_str_concat(neg_subj, EL_STR("ku")), verb_stem), EL_STR("a"));
|
|
}
|
|
if (str_eq(tense, EL_STR("future"))) {
|
|
el_val_t fv = sw_verb_final(EL_STR("present"), 1);
|
|
return el_str_concat(el_str_concat(el_str_concat(neg_subj, EL_STR("ta")), verb_stem), fv);
|
|
}
|
|
if (str_eq(tense, EL_STR("perfect"))) {
|
|
return el_str_concat(el_str_concat(el_str_concat(neg_subj, EL_STR("ja")), verb_stem), EL_STR("a"));
|
|
}
|
|
if (str_eq(tense, EL_STR("progressive"))) {
|
|
el_val_t fv = sw_verb_final(EL_STR("present"), 1);
|
|
el_val_t slen = str_len(verb_stem);
|
|
if (slen > 0) {
|
|
el_val_t last = sw_str_last_char(verb_stem);
|
|
if (str_eq(last, EL_STR("a"))) {
|
|
return el_str_concat(el_str_concat(neg_subj, sw_str_drop_last(verb_stem, 1)), fv);
|
|
}
|
|
}
|
|
return el_str_concat(el_str_concat(neg_subj, verb_stem), fv);
|
|
}
|
|
return el_str_concat(el_str_concat(neg_subj, verb_stem), EL_STR("i"));
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_noun_plural(el_val_t noun) {
|
|
if (str_eq(noun, EL_STR("mtu"))) {
|
|
return EL_STR("watu");
|
|
}
|
|
if (str_eq(noun, EL_STR("mtoto"))) {
|
|
return EL_STR("watoto");
|
|
}
|
|
if (str_eq(noun, EL_STR("mke"))) {
|
|
return EL_STR("wake");
|
|
}
|
|
if (str_eq(noun, EL_STR("mume"))) {
|
|
return EL_STR("waume");
|
|
}
|
|
if (str_eq(noun, EL_STR("mwana"))) {
|
|
return EL_STR("wana");
|
|
}
|
|
if (str_eq(noun, EL_STR("mwalimu"))) {
|
|
return EL_STR("walimu");
|
|
}
|
|
if (str_eq(noun, EL_STR("mgeni"))) {
|
|
return EL_STR("wageni");
|
|
}
|
|
if (str_eq(noun, EL_STR("mwanafunzi"))) {
|
|
return EL_STR("wanafunzi");
|
|
}
|
|
if (str_eq(noun, EL_STR("mfanyakazi"))) {
|
|
return EL_STR("wafanyakazi");
|
|
}
|
|
if (str_eq(noun, EL_STR("mkulima"))) {
|
|
return EL_STR("wakulima");
|
|
}
|
|
if (str_eq(noun, EL_STR("mgonjwa"))) {
|
|
return EL_STR("wagonjwa");
|
|
}
|
|
if (str_eq(noun, EL_STR("jicho"))) {
|
|
return EL_STR("macho");
|
|
}
|
|
if (str_eq(noun, EL_STR("jino"))) {
|
|
return EL_STR("meno");
|
|
}
|
|
if (str_eq(noun, EL_STR("bega"))) {
|
|
return EL_STR("mabega");
|
|
}
|
|
if (str_eq(noun, EL_STR("tunda"))) {
|
|
return EL_STR("matunda");
|
|
}
|
|
if (str_eq(noun, EL_STR("gari"))) {
|
|
return EL_STR("magari");
|
|
}
|
|
if (str_eq(noun, EL_STR("embe"))) {
|
|
return EL_STR("maembe");
|
|
}
|
|
if (str_eq(noun, EL_STR("wimbo"))) {
|
|
return EL_STR("nyimbo");
|
|
}
|
|
if (str_eq(noun, EL_STR("ubao"))) {
|
|
return EL_STR("mbao");
|
|
}
|
|
if (str_eq(noun, EL_STR("ugonjwa"))) {
|
|
return EL_STR("magonjwa");
|
|
}
|
|
if (str_eq(noun, EL_STR("uso"))) {
|
|
return EL_STR("nyuso");
|
|
}
|
|
if (str_eq(noun, EL_STR("ukuta"))) {
|
|
return EL_STR("kuta");
|
|
}
|
|
if (str_eq(noun, EL_STR("ulimi"))) {
|
|
return EL_STR("ndimi");
|
|
}
|
|
if (str_eq(noun, EL_STR("upande"))) {
|
|
return EL_STR("pande");
|
|
}
|
|
if (str_eq(noun, EL_STR("uwezo"))) {
|
|
return EL_STR("nguvu");
|
|
}
|
|
if (str_eq(noun, EL_STR("paka"))) {
|
|
return EL_STR("paka");
|
|
}
|
|
if (str_eq(noun, EL_STR("samaki"))) {
|
|
return EL_STR("samaki");
|
|
}
|
|
if (str_eq(noun, EL_STR("rafiki"))) {
|
|
return EL_STR("rafiki");
|
|
}
|
|
if (str_eq(noun, EL_STR("daktari"))) {
|
|
return EL_STR("madaktari");
|
|
}
|
|
if (str_eq(noun, EL_STR("habari"))) {
|
|
return EL_STR("habari");
|
|
}
|
|
if (str_eq(noun, EL_STR("nchi"))) {
|
|
return EL_STR("nchi");
|
|
}
|
|
if (str_eq(noun, EL_STR("bahari"))) {
|
|
return EL_STR("bahari");
|
|
}
|
|
if (str_eq(noun, EL_STR("shule"))) {
|
|
return EL_STR("shule");
|
|
}
|
|
if (str_eq(noun, EL_STR("hospitali"))) {
|
|
return EL_STR("hospitali");
|
|
}
|
|
if (str_eq(noun, EL_STR("ofisi"))) {
|
|
return EL_STR("ofisi");
|
|
}
|
|
if (str_eq(noun, EL_STR("serikali"))) {
|
|
return EL_STR("serikali");
|
|
}
|
|
if (sw_is_class1_noun(noun)) {
|
|
if (str_eq(sw_str_first2(noun), EL_STR("mw"))) {
|
|
return el_str_concat(EL_STR("wa"), str_slice(noun, 2, str_len(noun)));
|
|
}
|
|
if (str_eq(sw_str_first_char(noun), EL_STR("m"))) {
|
|
return el_str_concat(EL_STR("wa"), str_slice(noun, 1, str_len(noun)));
|
|
}
|
|
}
|
|
el_val_t p2 = sw_str_first2(noun);
|
|
if (str_eq(p2, EL_STR("ki"))) {
|
|
return el_str_concat(EL_STR("vi"), str_slice(noun, 2, str_len(noun)));
|
|
}
|
|
if (str_eq(p2, EL_STR("ch"))) {
|
|
return el_str_concat(EL_STR("vy"), str_slice(noun, 2, str_len(noun)));
|
|
}
|
|
if (str_eq(p2, EL_STR("ji"))) {
|
|
return el_str_concat(EL_STR("ma"), str_slice(noun, 2, str_len(noun)));
|
|
}
|
|
el_val_t p1 = sw_str_first_char(noun);
|
|
if (str_eq(p1, EL_STR("u"))) {
|
|
return str_slice(noun, 1, str_len(noun));
|
|
}
|
|
if (str_eq(p1, EL_STR("m"))) {
|
|
if (str_eq(p2, EL_STR("mw"))) {
|
|
return el_str_concat(EL_STR("mi"), str_slice(noun, 2, str_len(noun)));
|
|
}
|
|
return el_str_concat(EL_STR("mi"), str_slice(noun, 1, str_len(noun)));
|
|
}
|
|
return noun;
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_adj_prefix(el_val_t noun_class, el_val_t number) {
|
|
if (str_eq(number, EL_STR("pl"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("2"))) {
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("mi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("4"))) {
|
|
return EL_STR("mi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("ma");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("6"))) {
|
|
return EL_STR("ma");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("8"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("n");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("10"))) {
|
|
return EL_STR("n");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("n");
|
|
}
|
|
return EL_STR("wa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("m");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("m");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("4"))) {
|
|
return EL_STR("mi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("j");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("6"))) {
|
|
return EL_STR("ma");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("ki");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("8"))) {
|
|
return EL_STR("vi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("n");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("10"))) {
|
|
return EL_STR("n");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("mw");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("15"))) {
|
|
return EL_STR("ku");
|
|
}
|
|
return EL_STR("");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_agree_adj(el_val_t adj_stem, el_val_t noun_class, el_val_t number) {
|
|
if (str_eq(adj_stem, EL_STR("nzuri"))) {
|
|
return EL_STR("nzuri");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("baya"))) {
|
|
return EL_STR("baya");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("safi"))) {
|
|
return EL_STR("safi");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("chafu"))) {
|
|
return EL_STR("chafu");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("ghali"))) {
|
|
return EL_STR("ghali");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("rahisi"))) {
|
|
return EL_STR("rahisi");
|
|
}
|
|
if (str_eq(adj_stem, EL_STR("mzuri"))) {
|
|
return el_str_concat(sw_adj_prefix(noun_class, number), EL_STR("zuri"));
|
|
}
|
|
el_val_t prefix = sw_adj_prefix(noun_class, number);
|
|
if (str_eq(prefix, EL_STR(""))) {
|
|
return adj_stem;
|
|
}
|
|
if (str_eq(prefix, EL_STR("m"))) {
|
|
el_val_t first = sw_str_first_char(adj_stem);
|
|
if (str_eq(first, EL_STR("a"))) {
|
|
return el_str_concat(EL_STR("mw"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("e"))) {
|
|
return el_str_concat(EL_STR("mw"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("i"))) {
|
|
return el_str_concat(EL_STR("mw"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("o"))) {
|
|
return el_str_concat(EL_STR("mw"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("u"))) {
|
|
return el_str_concat(EL_STR("mw"), adj_stem);
|
|
}
|
|
return el_str_concat(EL_STR("m"), adj_stem);
|
|
}
|
|
if (str_eq(prefix, EL_STR("j"))) {
|
|
el_val_t first = sw_str_first_char(adj_stem);
|
|
if (str_eq(first, EL_STR("a"))) {
|
|
return el_str_concat(EL_STR("j"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("e"))) {
|
|
return el_str_concat(EL_STR("j"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("i"))) {
|
|
return el_str_concat(EL_STR("j"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("o"))) {
|
|
return el_str_concat(EL_STR("j"), adj_stem);
|
|
}
|
|
if (str_eq(first, EL_STR("u"))) {
|
|
return el_str_concat(EL_STR("j"), adj_stem);
|
|
}
|
|
return el_str_concat(EL_STR("l"), adj_stem);
|
|
}
|
|
return el_str_concat(prefix, adj_stem);
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_demonstrative(el_val_t noun_class, el_val_t number, el_val_t proximity) {
|
|
if (str_eq(proximity, EL_STR("near"))) {
|
|
if (str_eq(number, EL_STR("pl"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("hawa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("hii");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("haya");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("hivi");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("hizi");
|
|
}
|
|
return EL_STR("hawa");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("huyu");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("huu");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("hili");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("hiki");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("hii");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("huu");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("15"))) {
|
|
return EL_STR("huku");
|
|
}
|
|
return EL_STR("hii");
|
|
}
|
|
if (str_eq(number, EL_STR("pl"))) {
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("wale");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("ile");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("yale");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("vile");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("zile");
|
|
}
|
|
return EL_STR("wale");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("1"))) {
|
|
return EL_STR("yule");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("3"))) {
|
|
return EL_STR("ule");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("5"))) {
|
|
return EL_STR("lile");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("7"))) {
|
|
return EL_STR("kile");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("9"))) {
|
|
return EL_STR("ile");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("11"))) {
|
|
return EL_STR("ule");
|
|
}
|
|
if (str_eq(noun_class, EL_STR("15"))) {
|
|
return EL_STR("kule");
|
|
}
|
|
return EL_STR("ile");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_copula_present(el_val_t person, el_val_t number, el_val_t use_case) {
|
|
if (str_eq(use_case, EL_STR("equative"))) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
return EL_STR("ni");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
return EL_STR("ni");
|
|
}
|
|
return EL_STR("ni");
|
|
}
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("niko");
|
|
}
|
|
return EL_STR("tuko");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("uko");
|
|
}
|
|
return EL_STR("mko");
|
|
}
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("yuko");
|
|
}
|
|
return EL_STR("wako");
|
|
return 0;
|
|
}
|
|
|
|
el_val_t sw_copula_neg_present(el_val_t person, el_val_t number) {
|
|
if (str_eq(person, EL_STR("1"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("si");
|
|
}
|
|
return EL_STR("si");
|
|
}
|
|
if (str_eq(person, EL_STR("2"))) {
|
|
if (str_eq(number, EL_STR("sg"))) {
|
|
return EL_STR("si");
|
|
}
|
|
return EL_STR("si");
|
|
}
|
|
return EL_STR("si");
|
|
return 0;
|
|
}
|
|
|