Repository navigation
Expand file tree
/
Copy pathamatch1.test
More file actions
82 lines (73 loc) · 2.12 KB
/
Copy pathamatch1.test
File metadata and controls
82 lines (73 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
==== amatch1-2.0
CREATE TABLE costs(iLang, cFrom, cTo, Cost);
INSERT INTO costs VALUES(0, '', '?', 100);
INSERT INTO costs VALUES(0, '?', '', 100);
INSERT INTO costs VALUES(0, '?', '?', 150);
CREATE TABLE vocab(w TEXT UNIQUE);
INSERT OR IGNORE INTO vocab SELECT term FROM t1aux;
CREATE VIRTUAL TABLE t2 USING approximate_match(
vocabulary_table=t1aux,
vocabulary_word=term,
edit_distances=costs
);
CREATE VIRTUAL TABLE t3 USING approximate_match(
vocabulary_table=vocab,
vocabulary_word=w,
edit_distances=costs
);
CREATE VIRTUAL TABLE t4 USING approximate_match(
vocabulary_table=vtemp,
vocabulary_word=w,
edit_distances=costs
);
----
stmt 0 ok
stmt 49 err 1 -1 96 no such table: costs
stmt 96 err 1 -1 143 no such table: costs
stmt 143 err 1 -1 191 no such table: costs
stmt 191 ok
stmt 230 err 1 -1 286 no such table: vocab
stmt 286 ok
stmt 431 ok
stmt 573 ok
==== amatch1-2.1
SELECT word, distance FROM t2
WHERE word MATCH 'josxph' AND distance<300;
----
stmt 0 err 1 -1 87 no such table: t2
==== amatch1-2.2
SELECT word, distance FROM t3
WHERE word MATCH 'josxph' AND distance<300;
----
stmt 0 err 1 -1 87 no such table: t3
==== amatch1-2.3a
CREATE TEMP TABLE vtemp(w TEXT UNIQUE);
INSERT OR IGNORE INTO vtemp SELECT term FROM t1aux;
----
stmt 0 ok
stmt 46 err 1 -1 104 no such table: vtemp
==== amatch1-2.3b
SELECT word, distance FROM t4
WHERE word MATCH 'josxph' AND distance<300;
----
stmt 0 err 1 -1 87 no such table: t4
==== amatch1-2.11
SELECT word, distance FROM t2
WHERE word MATCH 'joxxph' AND distance<=300;
----
stmt 0 err 1 -1 84 no such table: t2
==== amatch1-2.12
SELECT word, distance FROM t3
WHERE word MATCH 'joxxph' AND distance<=300;
----
stmt 0 err 1 -1 84 no such table: t3
==== amatch1-2.21
SELECT word, distance FROM t2
WHERE word MATCH 'joxxph' AND distance<300;
----
stmt 0 err 1 -1 83 no such table: t2
==== amatch1-2.22
SELECT word, distance FROM t3
WHERE word MATCH 'joxxph' AND distance<300;
----
stmt 0 err 1 -1 83 no such table: t3