Add thesaurus dictionary which can replace N>0 lexemes by M>0 lexemes.
Teodor Sigaev <teodor@sigaev.ru>
Add thesaurus dictionary which can replace N>0 lexemes by M>0 lexemes. It required some changes in lexize algorithm, but interface with dictionaries stays compatible with old dictionaries. Funded by Georgia Public Library Service and LibLime, Inc.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/tsearch2/common.c | modified | +21 −0 |
| contrib/tsearch2/common.h | modified | +2 −0 |
| contrib/tsearch2/dict.c | modified | +50 −24 |
| contrib/tsearch2/dict.h | modified | +55 −5 |
| contrib/tsearch2/dict_thesaurus.c | added | +743 −0 |
| contrib/tsearch2/expected/tsearch2.out | modified | +11 −11 |
| contrib/tsearch2/Makefile | modified | +4 −4 |
| contrib/tsearch2/stopword.c | modified | +1 −22 |
| contrib/tsearch2/thesaurus | added | +19 −0 |
| contrib/tsearch2/ts_cfg.c | modified | +64 −62 |
| contrib/tsearch2/tsearch.sql.in | modified | +24 −1 |
| contrib/tsearch2/ts_lexize.c | added | +261 −0 |
| contrib/tsearch2/untsearch.sql.in | modified | +2 −0 |