Обсуждение: Re: [SQL] FW: indexing functions

Поиск
Список
Период
Сортировка

Re: [SQL] FW: indexing functions

От
"Gene Selkov Jr."
Дата:
> Thanks for your answer. The only thing I would like to do is just index
> words with character entities. Searching munchen is a lot easier than
> searching münchen, therefore I would like to index entities like
> ü as u. A friend of mine is a C programmer and is willing to help
> (I am only familiar with Perl).

I am not a c partisan myself, but we haven't got much choice :)

> Could you give some more information or
> an example of a simple c function, or a pointer to some examples? How do
> you pass the field data through the function?

Check out this one:

http://wit.mcs.anl.gov/~selkovjr/foldit.tgz

It may be incomplete for your task but it shows how to do it in
principle. You may want to add more character translations, and you
can do that without changing the code too much, by editing rules in
folditscan.l (at least, this is a lot easier than coding in c).

You won't have to touch the c code as long as the objects you want yylex()
to return will remain single characters. In case you want something bigger,
such as strings, the interface between yylex() and foldit() should be
changed


Further questions welcome,

--Gene