Liblouis User's and Programmer's Manual
7.11 lou_hyphenate ¶
int lou_hyphenate ( const char *tableList, const widechar *inbuf, int inlen, char *hyphens, int mode);
This function looks at the characters in inbuf and if it finds
a sequence of letters attempts to hyphenate it as a word. Note that
lou_hyphenate operates on single words only, and spaces or punctuation
marks between letters are not allowed. Leading and trailing
punctuation marks are ignored. The table named by the tableList
parameter must contain a hyphenation table. If it does not, the
function does nothing. inlen is the length of the character
string in inbuf. hyphens is an array of characters and
must be of size inlen + 1 (to account for the NULL terminator).
If hyphenation is successful it will have a 1 at the beginning of each
syllable and a 0 elsewhere. If the mode parameter is 0
inbuf is assumed to contain untranslated characters. Any
nonzero value means that inbuf contains a translation. In this
case, it is back-translated, hyphenation is performed, and it is
re-translated so that the hyphens can be placed correctly. The
lou_translate and lou_backTranslate functions are used
in this process. lou_hyphenate returns 1 if hyphenation was
successful and 0 otherwise. In the latter case, the contents of the
hyphens parameter are undefined. This function was provided for
use in liblouisutdml.