[liblouis-liblouisxml] Regex question

  • From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Sat, 26 Oct 2013 14:54:47 -0600

I'm very familiar with regex's and have made significant use of the powerful regex facility in Java. I understand how a regex can be used to identify the print item or items to which a braille translation action applies. But I don't off the top of my head see how to use a regex to represent the corresponding action.


Perhaps someone can give me an explicit example that would handle the EBAE rules that apply to the use of contractions and indicators in what EBAE refers to as partially emphasized words. These are words that are either mixed case (other than titlecase) or words where special typeforms apply to only some of the letters.

Use of contractions. Contractions may not be used in any partially emphasized word.

Use of capitalization indicators. (Note that more than one of these rules can apply to a single word.) (1)A sequence of two more trailing capital letters is to be preceded by the double capital sign. (2)Each sequence of two or more non-trailing capital letters is to be preceded by the double capital sign and followed by the termination sign. (3)Each individual capital letter is to be preceded by the single capital sign.

Use of typeform indicators.
(1)One or more trailing emphasized letters is to be preceded by the appropriate typeform indicator. (2)One or more non-trailing emphasized letters is to be preceded by the appropriate typeform indicator and followed by the termination sign.

(Note that EBAE uses the same typeform indicators for a single symbol or a word whereas UEB and some other codes have different indicators for a single symbol and for a sequence.)

Susan
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: