[Snowball-discuss] sb_symbol
Richard Boulton
richard at lemurconsulting.com
Wed Jul 8 15:13:30 BST 2009
2009/7/8 Richard Boulton <richard at lemurconsulting.com>:
> I can't remember any details other than that, I'm afraid. The
> internal "symbol" type referred to here is defined in runtime/api.h -
> I'm not sure if changing it to "char" instead of "unsigned char" would
> break anything (but I wouldn't be surprised if it did).
Just checked, and changing this certainly does break things - for
example, in the generated src_c/stem_UTF_8_finnish.c, there's a line:
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 164) return 0;
The comparison to != 164 is always true if symbol is char, since the
range of char is -128 to 127.
--
Richard
More information about the Snowball-discuss
mailing list