Re: Searching for "bare" letters

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема Re: Searching for "bare" letters
Дата
Msg-id CABs1bs1V8DOGJBvP=hGDBcEDExbHNkPjG91anS9DAaOsUwcy9w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Searching for "bare" letters  ("Reuven M. Lerner" <reuven@lerner.co.il>)
Список pgsql-general
>> I don't see the problem - you can have a dictionary, which does all work
>> on recognizing bare letters and output several versions. Have you seen
>> unaccent
>> dictionary ?
>
> This seems to be the direction that everyone is suggesting, and I'm quite
> grateful for that.  (I really hadn't ever needed to deal with such issues in
> the past, having worked mostly with English and Hebrew, which don't have
> such accent marks.)
>
> As for the unaccent dictionary, I hadn't heard of it before, but just saw it
> now in contrib, and it looks like it might fit perfectly.  I'll take a look;
> thanks for the suggestion.

I wrote this code for something similar I was doing, feel free to rip
it off or copy the regular expressions:


input = Regex.Replace(input, @"[\xC0-\xC5\xE0-\xE5]", "a");  //Replace with "a"
input = Regex.Replace(input, @"[\xC8-\xCB\xE8-\xEB]", "e");  //Replace with "e"
input = Regex.Replace(input, @"[\xCC-\xCF\xEC-\xEF]", "i");  //Replace with "i"
input = Regex.Replace(input, @"[\xD1\xF1]", "n");            //Replace with "n"
input = Regex.Replace(input, @"[\xD2-\xD6\xF2-\xF6]", "o");  //Replace with "o"
input = Regex.Replace(input, @"[\xD9-\xDC\xF9-\xFC]", "u");  //Replace with "u"
input = Regex.Replace(input, @"[\xDD\xDF\xFF]", "y");        //Replace with "y"

В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Christensen
Дата:
Сообщение: Re: Why PGSQL has no developments in the .NET area?
Следующее
От: Diego Augusto Molina
Дата:
Сообщение: Re: [Solved] Generic logging system for pre-hstore using plperl triggers