/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* This is based on the algorithm in Greg Fast's perl module Lingua::EN::Syllable. */ #include #include #include "syllable.h" #include #include #include #define SYLLABLEFILE "syllables" static const char *subsyl[] = { "cial", "tia", "cius", "cious", "giu", "ion", "iou", "sia$", ".ely$", NULL }; /* ^ == match beginning . == match anything $ == match end ! == not next match + == match aeiouy _ == match aeiou < == match prev char @ == match g or q. an awful hack */ static const char *addsyl[] = { "ia", "riet", "dien", "iu", "io", "ii", "+bl$", "mbl$", "___", "^mc", "ism$", "!+