I'm currently developing a custom UI layout library. At the moment a user of that library should supply strings for UI labels in a format that allow for subsequent shortening of those labels, so that they fit into the available space, without omission or indiscriminate ellipsis. Such a label list might look like this (pseudocode):

[ "Frequency Control / Channel {%d}",
  "Frequency Control / Chan. {%d}",
  "Frequency Ctrl. / Chan. {%d}",
  "Freq. Ctrl. / Chan. {%d}",
  "Freq. Ctrl. / Ch. {%d}",
  "Freq. Ctl. / Ch. {%d}",
  "Frq. Ctl. / Ch. {%d}" ]

Now combine this with localization variants, and this is bound to become tedious. For the moment having the developer supply several label format strings (along with localization variants) is acceptable. But I'd rather like to automate this process. For hyphenation this is a solved problem (Knuth's TeX hyphenation algorithm). However I wasn't able to find an equivalent for generating abbreviations (any search terms I could think of came up with work done on ML/LLMs for automatic deduction and expansion of acronyms).

Does anyone know of an algorithm for generating abbreviations, similar in spirit and implementation to the TeX hyphenation algorithm?

  • 1
    $\begingroup$ I am nt. sur. tht. ths. tsk. cn. b. autm. I gus. tht. th. meninf. abbvns. wll. depn. on th. freqc. of otr. siml. wrs. $\endgroup$
    – user16034
    Commented Aug 29, 2023 at 13:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.