|From:||Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>|
|Cc:||Mohammad Alhashash <alhashash(at)alhashash(dot)net>|
|Subject:||Re: PATCH: Allow empty targets in unaccent dictionary|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
I've attached a patch to contrib/unaccent as outlined in my review the
other day. I'm familiar with multiple languages in which modifiers are
separate characters (but not Arabic), so I decided to try a quick test
because I was curious.
I added a line containing only U+0940 (DEVANAGARI VOWEL SIGN II) to
unaccent.rules, and tried the following (the argument to unaccent is
U+0915 U+0940, and the result is U+0915):
ams=# select unaccent('unaccent','की ');
So the patch works fine: it correctly removes the modifier.
To add a test, however, it would be necessary to add this modifier to
unaccent.rules. But if we're adding one modifier to unaccent.rules, we
really should add them all. I have nowhere near the motivation needed to
add all the Devanagari modifiers, let alone any of the other languages I
know, and even if I did, it still wouldn't address Mohammad's use case.
(As a separate matter, it's not clear to me if stripping these modifiers
using unaccent is something everyone will want to do.)
So, though I'm not fond of saying it, perhaps the right thing to do is
to forget my earlier objection (that the patch didn't have tests), and
just commit as-is. It's a pretty straightforward patch, and it works.
I'm setting this as ready for committer.
-- अभजत "unaccented in three languages" മനന-সন
|Next Message||Mohammad Alhashash||2014-06-29 12:03:10||Re: PATCH: Allow empty targets in unaccent dictionary|
|Previous Message||MauMau||2014-06-29 11:35:04||Re: [Fwd: Re: proposal: new long psql parameter --on-error-stop]|