Skip to content

Commit c275d54

Browse files
author
Artur Zakirov
committed
hunspell_tr_tr was deleted, added more tests
1 parent 5c7d0db commit c275d54

38 files changed

+232
-391390
lines changed

contrib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ SUBDIRS = \
2525
hunspell_fr \
2626
hunspell_nl_nl \
2727
hunspell_ru_ru \
28-
hunspell_tr_tr \
2928
intagg \
3029
intarray \
3130
isn \

contrib/hunspell_en_us/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTENSION = hunspell_en_us
2-
DATA = hunspell_en_us--1.0.sql
2+
DATA = sql/hunspell_en_us--1.0.sql
33

4-
DATA_TSEARCH = en_us.affix en_us.dict
4+
DATA_TSEARCH = dict/en_us.affix dict/en_us.dict
55

66
REGRESS = hunspell_en_us
77

Lines changed: 39 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,50 @@
11
CREATE EXTENSION hunspell_en_us;
2-
SELECT ts_lexize('english_hunspell', 'stories');
3-
ts_lexize
4-
-----------
5-
{story}
6-
(1 row)
7-
8-
SELECT ts_lexize('english_hunspell', 'traveled');
2+
CREATE TABLE table1(name varchar);
3+
INSERT INTO table1 VALUES ('stories'), ('traveled'), ('eaten'),
4+
('Saturdays'), ('healthcare'), ('generally'),
5+
('integrating'), ('lankiness'), ('rewritten');
6+
SELECT ts_lexize('public.english_hunspell', name) FROM table1;
97
ts_lexize
108
-------------------
9+
{story}
1110
{traveled,travel}
12-
(1 row)
13-
14-
SELECT ts_lexize('english_hunspell', 'eaten');
15-
ts_lexize
16-
-------------
1711
{eaten,eat}
18-
(1 row)
19-
20-
SELECT ts_lexize('english_hunspell', 'I''m');
21-
ts_lexize
22-
-----------
23-
{i'm}
24-
(1 row)
25-
26-
SELECT ts_lexize('english_hunspell', 'Saturdays');
27-
ts_lexize
28-
------------
2912
{saturday}
30-
(1 row)
31-
32-
SELECT ts_lexize('english_hunspell', 'healthcare');
33-
ts_lexize
34-
--------------
3513
{healthcare}
36-
(1 row)
37-
38-
SELECT ts_lexize('english_hunspell', 'generally');
39-
ts_lexize
40-
-----------
4114
{general}
42-
(1 row)
43-
44-
SELECT ts_lexize('english_hunspell', 'integrating');
45-
ts_lexize
46-
-------------
4715
{integrate}
48-
(1 row)
49-
50-
SELECT ts_lexize('english_hunspell', 'lankiness''s');
51-
ts_lexize
52-
-------------
53-
{lankiness}
54-
(1 row)
55-
56-
SELECT ts_lexize('english_hunspell', 'rewritten');
57-
ts_lexize
58-
-----------
16+
{lankiness,lanky}
5917
{written}
60-
(1 row)
18+
(9 rows)
19+
20+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.english', "name"));
21+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
22+
alias | description | token | dictionaries | dictionary | lexemes
23+
-----------+-----------------+-------------+---------------------------------+------------------+-------------------
24+
asciiword | Word, all ASCII | stories | {english_hunspell,english_stem} | english_hunspell | {story}
25+
asciiword | Word, all ASCII | traveled | {english_hunspell,english_stem} | english_hunspell | {traveled,travel}
26+
asciiword | Word, all ASCII | eaten | {english_hunspell,english_stem} | english_hunspell | {eaten,eat}
27+
asciiword | Word, all ASCII | Saturdays | {english_hunspell,english_stem} | english_hunspell | {saturday}
28+
asciiword | Word, all ASCII | healthcare | {english_hunspell,english_stem} | english_hunspell | {healthcare}
29+
asciiword | Word, all ASCII | generally | {english_hunspell,english_stem} | english_hunspell | {general}
30+
asciiword | Word, all ASCII | integrating | {english_hunspell,english_stem} | english_hunspell | {integrate}
31+
asciiword | Word, all ASCII | lankiness | {english_hunspell,english_stem} | english_hunspell | {lankiness,lanky}
32+
asciiword | Word, all ASCII | rewritten | {english_hunspell,english_stem} | english_hunspell | {written}
33+
(9 rows)
34+
35+
DROP INDEX name_idx;
36+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.english', "name"));
37+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
38+
alias | description | token | dictionaries | dictionary | lexemes
39+
-----------+-----------------+-------------+---------------------------------+------------------+-------------------
40+
asciiword | Word, all ASCII | stories | {english_hunspell,english_stem} | english_hunspell | {story}
41+
asciiword | Word, all ASCII | traveled | {english_hunspell,english_stem} | english_hunspell | {traveled,travel}
42+
asciiword | Word, all ASCII | eaten | {english_hunspell,english_stem} | english_hunspell | {eaten,eat}
43+
asciiword | Word, all ASCII | Saturdays | {english_hunspell,english_stem} | english_hunspell | {saturday}
44+
asciiword | Word, all ASCII | healthcare | {english_hunspell,english_stem} | english_hunspell | {healthcare}
45+
asciiword | Word, all ASCII | generally | {english_hunspell,english_stem} | english_hunspell | {general}
46+
asciiword | Word, all ASCII | integrating | {english_hunspell,english_stem} | english_hunspell | {integrate}
47+
asciiword | Word, all ASCII | lankiness | {english_hunspell,english_stem} | english_hunspell | {lankiness,lanky}
48+
asciiword | Word, all ASCII | rewritten | {english_hunspell,english_stem} | english_hunspell | {written}
49+
(9 rows)
6150

contrib/hunspell_en_us/results/hunspell_en_us.out

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
CREATE EXTENSION hunspell_en_us;
22

3-
SELECT ts_lexize('english_hunspell', 'stories');
4-
SELECT ts_lexize('english_hunspell', 'traveled');
5-
SELECT ts_lexize('english_hunspell', 'eaten');
6-
SELECT ts_lexize('english_hunspell', 'I''m');
7-
SELECT ts_lexize('english_hunspell', 'Saturdays');
8-
SELECT ts_lexize('english_hunspell', 'healthcare');
9-
SELECT ts_lexize('english_hunspell', 'generally');
10-
SELECT ts_lexize('english_hunspell', 'integrating');
11-
SELECT ts_lexize('english_hunspell', 'lankiness''s');
12-
SELECT ts_lexize('english_hunspell', 'rewritten');
3+
CREATE TABLE table1(name varchar);
4+
INSERT INTO table1 VALUES ('stories'), ('traveled'), ('eaten'),
5+
('Saturdays'), ('healthcare'), ('generally'),
6+
('integrating'), ('lankiness'), ('rewritten');
7+
8+
SELECT ts_lexize('public.english_hunspell', name) FROM table1;
9+
10+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.english', "name"));
11+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;
12+
13+
DROP INDEX name_idx;
14+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.english', "name"));
15+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.english', t.name) AS d;

contrib/hunspell_fr/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
EXTENSION = hunspell_fr
2-
DATA = hunspell_fr--1.0.sql
2+
DATA = sql/hunspell_fr--1.0.sql
33

4-
DATA_TSEARCH = fr.affix fr.dict
4+
DATA_TSEARCH = dict/fr.affix dict/fr.dict
55

66
REGRESS = hunspell_fr
77

File renamed without changes.
File renamed without changes.
Lines changed: 44 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,57 @@
11
CREATE EXTENSION hunspell_fr;
2-
SELECT ts_lexize('french_hunspell', 'beau');
3-
ts_lexize
4-
-----------
2+
CREATE TABLE table1(name varchar);
3+
INSERT INTO table1 VALUES ('beau'), ('antérieur'), ('fraternel'),
4+
('plaît'), ('comprends'), ('désolée'),
5+
('cents'), ('grammairiens'), ('résistèrent'),
6+
('derniers'), ('rapprochent');
7+
SELECT ts_lexize('public.french_hunspell', name) FROM table1;
8+
ts_lexize
9+
-----------------
510
{beau}
6-
(1 row)
7-
8-
SELECT ts_lexize('french_hunspell', 'antérieur');
9-
ts_lexize
10-
--------------
1111
{antérieure}
12-
(1 row)
13-
14-
SELECT ts_lexize('french_hunspell', 'fraternel');
15-
ts_lexize
16-
---------------
1712
{fraternelle}
18-
(1 row)
19-
20-
SELECT ts_lexize('french_hunspell', 'plaît');
21-
ts_lexize
22-
-----------
2313
{plaire}
24-
(1 row)
25-
26-
SELECT ts_lexize('french_hunspell', 'm''appelle');
27-
ts_lexize
28-
-----------
29-
{appeler}
30-
(1 row)
31-
32-
SELECT ts_lexize('french_hunspell', 'l''anglais');
33-
ts_lexize
34-
------------
35-
{anglaise}
36-
(1 row)
37-
38-
SELECT ts_lexize('french_hunspell', 'comprends');
39-
ts_lexize
40-
--------------
4114
{comprendre}
42-
(1 row)
43-
44-
SELECT ts_lexize('french_hunspell', 'désolée');
45-
ts_lexize
46-
-----------
4715
{désoler}
48-
(1 row)
49-
50-
SELECT ts_lexize('french_hunspell', 'cents');
51-
ts_lexize
52-
-----------
5316
{cent}
54-
(1 row)
55-
56-
SELECT ts_lexize('french_hunspell', 'grammairiens');
57-
ts_lexize
58-
-----------------
5917
{grammairienne}
60-
(1 row)
61-
62-
SELECT ts_lexize('french_hunspell', 'résistèrent');
63-
ts_lexize
64-
------------
6518
{résister}
66-
(1 row)
67-
68-
SELECT ts_lexize('french_hunspell', 'derniers');
69-
ts_lexize
70-
------------
7119
{dernière}
72-
(1 row)
73-
74-
SELECT ts_lexize('french_hunspell', 'rapprochent');
75-
ts_lexize
76-
--------------
7720
{rapprocher}
78-
(1 row)
21+
(11 rows)
22+
23+
CREATE INDEX name_idx ON table1 USING GIN (to_tsvector('public.french', "name"));
24+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.french', t.name) AS d;
25+
alias | description | token | dictionaries | dictionary | lexemes
26+
-----------+-------------------+--------------+-------------------------------+-----------------+-----------------
27+
asciiword | Word, all ASCII | beau | {french_hunspell,french_stem} | french_hunspell | {beau}
28+
word | Word, all letters | antérieur | {french_hunspell,french_stem} | french_hunspell | {antérieure}
29+
asciiword | Word, all ASCII | fraternel | {french_hunspell,french_stem} | french_hunspell | {fraternelle}
30+
word | Word, all letters | plaît | {french_hunspell,french_stem} | french_hunspell | {plaire}
31+
asciiword | Word, all ASCII | comprends | {french_hunspell,french_stem} | french_hunspell | {comprendre}
32+
word | Word, all letters | désolée | {french_hunspell,french_stem} | french_hunspell | {désoler}
33+
asciiword | Word, all ASCII | cents | {french_hunspell,french_stem} | french_hunspell | {cent}
34+
asciiword | Word, all ASCII | grammairiens | {french_hunspell,french_stem} | french_hunspell | {grammairienne}
35+
word | Word, all letters | résistèrent | {french_hunspell,french_stem} | french_hunspell | {résister}
36+
asciiword | Word, all ASCII | derniers | {french_hunspell,french_stem} | french_hunspell | {dernière}
37+
asciiword | Word, all ASCII | rapprochent | {french_hunspell,french_stem} | french_hunspell | {rapprocher}
38+
(11 rows)
39+
40+
DROP INDEX name_idx;
41+
CREATE INDEX name_idx ON table1 USING GIST (to_tsvector('public.french', "name"));
42+
SELECT d.* FROM table1 AS t, LATERAL ts_debug('public.french', t.name) AS d;
43+
alias | description | token | dictionaries | dictionary | lexemes
44+
-----------+-------------------+--------------+-------------------------------+-----------------+-----------------
45+
asciiword | Word, all ASCII | beau | {french_hunspell,french_stem} | french_hunspell | {beau}
46+
word | Word, all letters | antérieur | {french_hunspell,french_stem} | french_hunspell | {antérieure}
47+
asciiword | Word, all ASCII | fraternel | {french_hunspell,french_stem} | french_hunspell | {fraternelle}
48+
word | Word, all letters | plaît | {french_hunspell,french_stem} | french_hunspell | {plaire}
49+
asciiword | Word, all ASCII | comprends | {french_hunspell,french_stem} | french_hunspell | {comprendre}
50+
word | Word, all letters | désolée | {french_hunspell,french_stem} | french_hunspell | {désoler}
51+
asciiword | Word, all ASCII | cents | {french_hunspell,french_stem} | french_hunspell | {cent}
52+
asciiword | Word, all ASCII | grammairiens | {french_hunspell,french_stem} | french_hunspell | {grammairienne}
53+
word | Word, all letters | résistèrent | {french_hunspell,french_stem} | french_hunspell | {résister}
54+
asciiword | Word, all ASCII | derniers | {french_hunspell,french_stem} | french_hunspell | {dernière}
55+
asciiword | Word, all ASCII | rapprochent | {french_hunspell,french_stem} | french_hunspell | {rapprocher}
56+
(11 rows)
7957

0 commit comments

Comments
 (0)