Automatic discretionary hyphenation in ConTeXt
Below is the ConTeXt version of Ulrikes solution which uses LuaTeX’s extension of the \hyphenation
command to set \discretionary
values in the argument of the command.
\startexceptions[hu]
a{sz-}{sz}{ssz}o{ny-}{ny}{nny}al
\stopexceptions
\starttext
\starttabulate[|l|p(1pt)|]
\NC English \EQ asszonnyal \NC\NR
\NC Hungarian \EQ \language[hu]asszonnyal \NC\NR
\stoptabulate
\stoptext
With luatex \hyphenation
has an extended syntax and you can add the arguments of a \discretionary
. With latex e.g. this works:
\documentclass{article}
\usepackage[hungarian]{babel}
\hyphenation{a{sz-}{sz}{ssz}o{ny-}{ny}{nny}al}
\textwidth=1pt
\begin{document}
asszonnyal
\end{document}
I don't know if this could be done in \patterns in a generic way (I thought yes, but I think I have misunderstood the docu here) to avoid to have to create long word lists. You could ask on the tex-hyphen mailing list: https://www.tug.org/mailman/listinfo/tex-hyphen or on the context list.
I also don't know how to convert my latex example to context. The contextgarden is a bit vage here.