# Make initial downcasing after the misnamed U.Cap.Opt # This gives oslolaš across the board # like Pariisi -> pariisilainen # ---- starts here: ------ # The value of HypMinFlag depends on the configuration: if hyperminimisation is # enabled, it will expand to a flag diacritic, if not it will be the empty string. # This will ensure that lowercasing will work correctly for all proper strings # independent of configuration. The alternative is to make the flag diacritic # optional, but then a hyperminimised generator will overgenerate, producing # an initial capital variant in addition to the lowercase string intended. # Don't be mislead by the notation: Autoconf also uses @STRING@ notation! define Flag "@U.Cap.Opt@" ; define CmpHyph "@U.CmpHyph.TRUE@" ; @WANT_HYPERMINIMISATION_TRUE@@IF_HFST@define HypMinFlag "@P.LEXNAME.Root@" ; read regex [ A -> a, B -> b, C -> c, D -> d, E -> e, F -> f, G -> g, H -> h, I -> i, J -> j, K -> k, L -> l, M -> m, N -> n, O -> o, P -> p, Q -> q, R -> r, S -> s, T -> t, U -> u, V -> v, W -> w, X -> x, Y -> y, Z -> z, Á -> á, Č -> č, Đ -> đ, Ŋ -> ŋ, Š -> š, Ŧ -> ŧ, Ž -> ž @WANT_HYPERMINIMISATION_TRUE@ || .#. HYPMINFLAG FLAG ( HYPHFLAG ) _ , @WANT_HYPERMINIMISATION_FALSE@|| .#. FLAG ( HYPHFLAG ) _ , FLAG ( HYPHFLAG ) ?* %- _ # ---- ends here: ------ # The lower context fixes issue when downcasing words like Davvi-Suopma # -> davvi-suopmelaš # Kept for reference: The old version, i.e., # The Book's treatment of paloaltolainen and pariisilainen, p. 368 ff. # Allow optional initial downcasing after @U.Cap.Opt@ #A (->) a, B (->) b, C (->) c, D (->) d, E (->) e, #F (->) f, G (->) g, H (->) h, I (->) i, J (->) j, #K (->) k, L (->) l, M (->) m, N (->) n, O (->) o, #P (->) p, Q (->) q, R (->) r, S (->) s, T (->) t, #U (->) u, V (->) v, W (->) w, X (->) x, Y (->) y, #Z (->) z, Á (->) á, #Č (->) č, Đ (->) đ, Ŋ (->) ŋ, Š (->) š, Ŧ (->) ŧ, Ž (->) ž #|| .#. %@U%.Cap%.Opt%@ _ #.o. # No uppercase in the middle of a downcasable word #A->a, B->b, C->c, D->d, E->e, F->f, G->g, H->h, #I->i, J->j, K->k, L->l, M->m, N->n, O->o, P->p, #Q->q, R->r, S->s, T->t, U->u, V->v, W->w, X->x, #Y->y, Z->z || %@U%.Cap%.Opt%@ ?+ _ #.o. # Eliminate internal spaces inside a downcasable word # Spaces are indicated here with the literal # underscore character #%_ -> [] || .#. %@U%.Cap%.Opt%@ ?+ _ ] ; substitute defined Flag for FLAG substitute defined CmpHyph for HYPHFLAG @WANT_HYPERMINIMISATION_TRUE@@IF_HFST@substitute defined HypMinFlag for HYPMINFLAG