-1 1 'børn' 'Børn' 0+5
-2 2 'le' 'Le' 0+3
-3 2 'carré' 'Carré' 3+6
-4 3 'le' 'Le' 0+3
-5 3 'carre' 'Carre' 3+5
-6 4 'le' 'Le' 0+3
-7 4 'carré' 'Carré' 3+7
+1 1 'børn' 'Børn' 0+5 *Børn*
+2 2 'le' 'Le' 0+3 *Le *Carré
+3 2 'carré' 'Carré' 3+6 Le *Carré*
+4 3 'le' 'Le' 0+3 *Le *Carre
+5 3 'carre' 'Carre' 3+5 Le *Carre*
+6 4 'le' 'Le' 0+3 *Le *Carré
+7 4 'carré' 'Carré' 3+7 Le *Carré*
-1 1 'børn' 'Børn' 0+5
-2 2 'le' 'Le' 0+3
-3 2 'carre' 'Carre' 3+6
-4 3 'le' 'Le' 0+3
-5 3 'carre' 'Carre' 3+5
-6 4 'le' 'Le' 0+3
-7 4 'carre' 'Carre' 3+7
+1 1 'børn' 'Børn' 0+5 *Børn*
+2 2 'le' 'Le' 0+3 *Le *Carré
+3 2 'carre' 'Carre' 3+6 Le *Carré*
+4 3 'le' 'Le' 0+3 *Le *Carre
+5 3 'carre' 'Carre' 3+5 Le *Carre*
+6 4 'le' 'Le' 0+3 *Le *Carré
+7 4 'carre' 'Carre' 3+7 Le *Carré*
-1 1 'men' '' 0+4
-2 1 'run' '' 4+7
-3 2 'he' '' 0+3
-4 2 'run' '' 3+5
+1 1 'men' '' 0+4 *men *running
+2 1 'run' '' 4+7 men *running*
+3 2 'he' '' 0+3 *he *runs
+4 2 'run' '' 3+5 he *runs *
else
{
size_t start, len;
+ const char *org_string = 0;
const char *sortkey = icu_chain_token_sortkey(p_config->chain);
- icu_chain_get_org_info(p_config->chain, &start, &len);
+ icu_chain_get_org_info2(p_config->chain, &start, &len,
+ &org_string);
wrbuf_rewind(sw);
wrbuf_puts_escaped(sw, sortkey);
token_count++;
{
fprintf(p_config->outfile, " %ld+%ld",
(long) start, (long) len);
+ fputc(' ', p_config->outfile);
+ fwrite(org_string, 1, start, p_config->outfile);
+ fputc('*', p_config->outfile);
+ fwrite(org_string + start, 1, len, p_config->outfile);
+ fputc('*', p_config->outfile);
+ fputs(org_string + start + len, p_config->outfile);
}
fprintf(p_config->outfile, "\n");
}