• Jump To … +
    case_ignore.foma fallback.EN.foma fallback.ES.foma hyphenate.EN.foma hyphenate.ES.foma morfo.EN.foma morfo.ES.foma normalise.foma tokenize.foma verbs.ES.foma
  • ¶

    Case Ignore

  • ¶

    This script makes the previous script in the pipeline case-insensitive (only for the first letter). It does that by popping the stack into the variable Stack and then composing it with a transducer (Upper) that optionally converts the first letter to upper-case

    define Stack;
    define Upper [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];
    regex Stack .o. [[Upper .p. ?] ?*]; # Only capitallize first letter