Note that there are some explanatory texts on larger screens.

plurals
  1. POOpenOffice Hyphenation algorithm - what does the parameters mean?
    primarykey
    data
    text
    <p>I am looking the hyphenation aglorithm downloaded from the OpenOffice site, but I couldn't understand what the parameter <strong>rep</strong>, <strong>pos</strong>, and <strong>cut</strong> are for after looking at the comment. Could someone with the knowledge tell me what these parameters do? Here are the comments.</p> <p>From the example, it seems like it's saying <strong>ff</strong> can be replaced with a single <strong>f</strong>, but what does that have to do with hyphenation?</p> <p>Thanks,</p> <p><pre><code> /*</p> <p>int hnj_hyphen_hyphenate2(): non-standard hyphenation.</p> <p>(It supports Catalan, Dutch, German, Hungarian, Norwegian, Swedish etc. orthography, see documentation.)</p> <p>input data: word: input word word_size: byte length of the input word</p> <p>hyphens: allocated character buffer (size = word_size + 5) hyphenated_word: allocated character buffer (size ~ word_size * 2) or NULL rep, pos, cut: pointers (point to the allocated and <em>zeroed</em> buffers (size=word_size) or with NULL value) or NULL</p> <p>output data: hyphens: hyphenation vector (hyphenation points signed with odd numbers) hyphenated_word: hyphenated input word (hyphens signed with <code>='), optional (NULL input) rep: NULL (only standard hyph.), or replacements (hyphenation points signed with</code>=' in replacements); pos: NULL, or difference of the actual position and the beginning positions of the change in input words; cut: NULL, or counts of the removed characters of the original words at hyphenation,</p> <p>Note: rep, pos, cut are complementary arrays to the hyphens, indexed with the character positions of the input word.</p> <p>For example: Schiffahrt -> Schiff=fahrt, pattern: f1f/ff=f,1,2 output: rep[5]="ff=f", pos[5] = 1, cut[5] = 2</p> <p>Note: hnj_hyphen_hyphenate2() can allocate rep, pos, cut (word_size length arrays):</p> <p>char ** rep = NULL; int * pos = NULL; int * cut = NULL; char hyphens[MAXWORDLEN]; hnj_hyphen_hyphenate2(dict, "example", 7, hyphens, NULL, &amp;rep, &amp;pos, &amp;cut);</p> <p>See example in the source distribution.</p> <p>*/</p> <p>int hnj_hyphen_hyphenate2 (HyphenDict *dict, const char *word, int word_size, char * hyphens, char *hyphenated_word, char <em>*</em> rep, int ** pos, int ** cut); </pre></code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload