Hi,
somewhat off-topic to BaseX, but I wonder if anybody already tried to port the TeX hyphenation algorithm to XQuery?
See for example this Python port:
https://nedbatchelder.com/code/modules/hyphenate.py
>>> hyphenate_word("supercalifragilisticexpialidocious") ['su', 'per', 'cal', 'ifrag', 'ilis', 'tic', 'ex', 'pi', 'ali', 'do', 'cious']
Best, Daniel