Issue with capital letters
Closed this issue · 5 comments
ftyers commented
This works:
<e lm="Jun Ajpu" c=""><p>
<l>jun<s n="num"/><j/>ajpu<s n="np"/><s n="ant"/><s n="m"/><j/></l>
<r>Jun<b/>Ajpu<s n="np"/><s n="ant"/><s n="m"/></r>
</p>
</e>
$ echo "^Jun<num>$ ^Ajpu<np><ant><m>$ " | lsx-proc quc-spa.autoseq.bin
^Jun Ajpu<np><ant><m>$
But this doesn't:
<e lm="Jun Ajpu" c=""><p>
<l>Jun<s n="num"/><j/>Ajpu<s n="np"/><s n="ant"/><s n="m"/><j/></l>
<r>Jun<b/>Ajpu<s n="np"/><s n="ant"/><s n="m"/></r>
</p>
</e>
$ echo "^Jun<num>$ ^Ajpu<np><ant><m>$ " | lsx-proc quc-spa.autoseq.bin
^Jun<num>$ ^Ajpu<np><ant><m>$
ftyers commented
This looks like it's an issue in lttoolbox/fst_processor.cc
:
else if(val > 0)
{
int val_lowercase = towlower(val);
s.step_override(val_lowercase, alphabet(L"<ANY_CHAR>"), val); // FIXME deal with cases! in step_override
}
mr-martian commented
Oops, I noted how to fix this issue and Github proceeded to close it.
mr-martian commented
If apertium/lttoolbox#100 gets merged then in this
apertium-separable/src/lsx_processor.cc
Lines 235 to 241 in 0818c6d
we just need to change
s.step_override(val, any_char, lu[i]);
to s.step_override(lu[i], val, any_char, lu[i]);
and it should work, I think.mr-martian commented
mr-martian commented
Closing this, since the behavior is now consistent with lt-proc
.