From a1a5b7ddd6c3c0532c37551b24fd573a554ac181 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 10 Jun 2011 23:04:53 +0300 Subject: Fix syllabification. * configure.ac: Add AC_PROG_YACC * src/ellinika/phoneme.y: New file. * src/ellinika/yyrename: New file. * src/ellinika/syllabificator.c: New file. * src/ellinika/.gitignore: Update. * src/ellinika/elchr.c (char_info_st): Move to header. (el_basic_ctype): (elchr_info): Remove static qualifier. Return a pointer to const. (elchr_letter,elchr_phoneme): New functions. (elchr_diphthong): Remove. * src/ellinika/elmorph.c (elstr): New members. (_elstr_syllabize): Rewrite. (invalidate_maps)" New static function. (_elstr_alloc): Initialize new fields, take function name as argument, for diagnostic purposes. (_elstr_print): Rewrite (deftab): Update. (elstr-syllable-prop,elstr-syllable) (_elstr_set_accent,_elstr_set_accent_on_char): Rewrite. (elstr-char-phoneme,elstr->phonetic-map): New functions. * src/ellinika/elmorph.h (CHF_DIPH1,CHF_DIPH2): Remove. (CHF_DIPHTHONG): New flag. (PHON_.*): New constants. (phoneme,syllable): New structures. (char_info_st): New members. (elchr_info,elchr_letter) (elchr_phoneme,phoneme_map) (syllable_map): New protos. (elchr_diphthong): Remove protos. * src/ellinika/elmorph.scm4: Move public definitions to elmorph-public.scm; include it here. * src/ellinika/xlat.scm (ellinika:sounds-like): Rewrite as a wrapper over elstr->soundslike. Describe Milesian numbers. * style.css (img.ellinika-img): New class. * xml/lingua.conf.in (IMAGE): New tag. * xml/pl/alfabhta.xml: Describe Milesian numbers. Various fixes. * data/dbverb.struct: fix a typo in flection. Use 'sub' theme for pas/sub/aor. * data/irregular-verbs.xml: Add more verbs. * scm/conjugator.scm: Various fixes. * scm/verbop.scm: Accept empty mood and voice declarations. --- configure.ac | 1 + data/dbverb.struct | 4 +- data/irregular-verbs.xml | 81 ++++----- scm/conj.scm | 335 -------------------------------------- scm/conjugator.scm | 129 +++++++++------ scm/elmorph.c | 10 -- scm/elmorph.h | 39 ----- scm/verbop.scm | 95 ++++++----- scm/xlat.scm | 280 ------------------------------- src/ellinika/.gitignore | 2 + src/ellinika/Makefile.am | 23 ++- src/ellinika/elchr.c | 273 ++++++++++++++++++------------- src/ellinika/elmorph-public.scm | 106 ++++++++++++ src/ellinika/elmorph.c | 308 ++++++++++++++++++++++------------- src/ellinika/elmorph.h | 82 +++++++++- src/ellinika/elmorph.scm4 | 25 +-- src/ellinika/phoneme.y | 353 ++++++++++++++++++++++++++++++++++++++++ src/ellinika/syllabificator.c | 152 +++++++++++++++++ src/ellinika/tenses.scm | 38 +++++ src/ellinika/xlat.scm | 113 +------------ src/ellinika/yyrename | 97 +++++++++++ style.css | 6 + xml/lingua.conf.in | 9 + xml/pl/alfabhta.xml | 204 +++++++++++++++++++++++ 24 files changed, 1588 insertions(+), 1177 deletions(-) delete mode 100644 scm/conj.scm delete mode 100644 scm/elmorph.c delete mode 100644 scm/elmorph.h delete mode 100644 scm/xlat.scm create mode 100644 src/ellinika/elmorph-public.scm create mode 100644 src/ellinika/phoneme.y create mode 100644 src/ellinika/syllabificator.c create mode 100644 src/ellinika/tenses.scm create mode 100755 src/ellinika/yyrename diff --git a/configure.ac b/configure.ac index 233ec46..01b27a2 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ AC_CONFIG_MACRO_DIR([m4]) ## * Checks for programs. AC_PROG_CC +AC_PROG_YACC AM_PROG_LIBTOOL M4='`cd $(top_srcdir); pwd`/scripts/missing --run m4' diff --git a/data/dbverb.struct b/data/dbverb.struct index 06745c8..d51633b 100644 --- a/data/dbverb.struct +++ b/data/dbverb.struct @@ -65,7 +65,7 @@ INSERT INTO verbflect VALUES (8, NULL, "ε", NULL, NULL, "ετε", NULL), (9, NULL, "ε", NULL, NULL, "τε", NULL), (11, "ομαι", "εσαι", "εται", "όμαστε", "εστε", "ονται"), -(12, "όμουν", "όσουν", "όταν", "όμαστε", "όμαστε", "ονταν"), +(12, "όμουν", "όσουν", "όταν", "όμαστε", "όσαστε", "ονταν"), (15, "ώ", "είς", "εί", "ούμε", "είτε", "ούν(ε)"), (17, NULL, "ου", NULL, NULL, NULL, NULL), (18, NULL, NULL, NULL, NULL, "είτε", NULL), @@ -123,7 +123,7 @@ INSERT INTO conjugation VALUES ("A", "pas", "ind", "Μέλλοντας στιγμιαίος", 'aor', NULL, 15, "111111", "θα", NULL, NULL), -- Υποτακτική ("A", "pas", "sub", "Ενεστώτας", 'pres', NULL, 11, "333333", "να", NULL, NULL), -("A", "pas", "sub", "Αόριστος", 'aor', NULL, 15, "111221", "να", NULL, NULL), +("A", "pas", "sub", "Αόριστος", 'sub', NULL, 15, "111221", "να", NULL, NULL), ("A", "pas", "sub", "Παρακείμενος", 'synt', NULL, 0, NULL, "να", "έχω", "Παρατατικός"), -- Προστακτική ("A", "pas", "imp", "Ενεστώτας", 'pres', NULL, 11, "-3--3-", "να", NULL, NULL), diff --git a/data/irregular-verbs.xml b/data/irregular-verbs.xml index ca2c7d1..d056f7d 100644 --- a/data/irregular-verbs.xml +++ b/data/irregular-verbs.xml @@ -56,28 +56,7 @@ - - - - - - - - - - - - - - - - - - - - - - + @@ -109,28 +88,8 @@ - - - - - - - - - - - - - - - - - - - - - - + + @@ -337,6 +296,31 @@ + + έρχομαι + A + + 000000 + + ερθ + + + + + + + + + + + + + + ήρθ + ερθ + + +