1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-21 10:42:50 +03:00

Add regression tests for ispell, synonym and thesaurus dictionaries.

Rename synonym.syn.sample and thesaurs.ths.sample to
synonym_sample.syn and thesaurs_sample.ths accordingly to be able to use they
in regression test.

Ispell dictionary uses synthetic simple dictionary files.
This commit is contained in:
Teodor Sigaev
2007-09-11 11:54:42 +00:00
parent c4b2b2960a
commit 64def09592
11 changed files with 514 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
#
# Copyright (c) 2006-2007, PostgreSQL Global Development Group
#
# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.2 2007/08/22 06:11:56 tgl Exp $
# $PostgreSQL: pgsql/src/backend/tsearch/Makefile,v 1.3 2007/09/11 11:54:42 teodor Exp $
#
#-------------------------------------------------------------------------
subdir = src/backend/tsearch
@@ -13,7 +13,8 @@ include $(top_builddir)/src/Makefile.global
DICTDIR=tsearch_data
DICTFILES=synonym.syn.sample thesaurus.ths.sample
DICTFILES=synonym_sample.syn thesaurus_sample.ths hunspell_sample.affix \
ispell_sample.affix ispell_sample.dict
OBJS = ts_locale.o ts_parse.o wparser.o wparser_def.o dict.o \
dict_simple.o dict_synonym.o dict_thesaurus.o \

View File

@@ -0,0 +1,24 @@
COMPOUNDFLAG Z
ONLYINCOMPOUND L
PFX B Y 1
PFX B 0 re .
PFX U N 1
PFX U 0 un .
SFX J Y 1
SFX J 0 INGS [^E]
SFX G Y 1
SFX G 0 ING [^E]
SFX S Y 1
SFX S 0 S [^SXZHY]
SFX A Y 1
SFX A Y IES [^AEIOU]Y
SFX \ N 1
SFX \ 0 Y/L [^Y]

View File

@@ -0,0 +1,26 @@
compoundwords controlled Z
prefixes
flag *B:
. > RE # As in enter > reenter
flag U:
. > UN # As in natural > unnatural
suffixes
flag *J:
[^E] > INGS # As in cross > crossings
flag *G:
[^E] > ING # As in cross > crossing
flag *S:
[^SXZHY] > S # As in bat > bats
flag *A:
[^AEIOU]Y > -Y,IES # As in imply > implies
flag ~\\:
[^Y] > Y #~ advarsel > advarsely-

View File

@@ -0,0 +1,8 @@
book/GJUS
booking/SB
footballklubber
foot/ZS
football/Z
ball/SZ\
klubber/Z
sky/A

View File

@@ -1,3 +0,0 @@
skies sky
booking book
bookings book

View File

@@ -0,0 +1,4 @@
postgres pgsql
postgresql pgsql
postgre pgsql
gogle googl

View File

@@ -11,10 +11,8 @@ one two : *12
one : *1
two : *2
#foo bar : blah blah
#f bar : fbar
#e bar : ebar
#g bar bar : gbarbar
#asd:sdffff
#qwerty:qwer wert erty
supernovae stars : *sn
supernovae : *sn
booking tickets : order invitation cards
booking the tickets : order invitation Cards