File: test1.sql

package info (click to toggle)
pg-similarity 1.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 576 kB
  • sloc: ansic: 3,257; sql: 517; makefile: 25; sh: 1
file content (29 lines) | stat: -rw-r--r-- 1,497 bytes parent folder | download | duplicates (5)
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
--
-- pg_similarity
-- testing similarity functions and operators
--

CREATE EXTENSION pg_similarity;

\set a '\'Euler Taveira de Oliveira\''
\set b '\'Euler T Oliveira\''
\set c '\'Oiler Taviera do Oliviera\''

select block(:a, :b), block_op(:a, :b), :a ~++ :b as operator;
select cosine(:a, :b), cosine_op(:a, :b), :a ~## :b as operator;
select dice(:a, :b), dice_op(:a, :b), :a ~-~ :b as operator;
select euclidean(:a, :b), euclidean_op(:a, :b), :a ~!! :b as operator;
select hamming_text(:a, :c), hamming_text_op(:a, :c), :a ~@~ :c as operator;
select jaccard(:a, :b), jaccard_op(:a, :b), :a ~?? :b as operator;
select jaro(:a, :b), jaro_op(:a, :b), :a ~%% :b as operator;
select jarowinkler(:a, :b), jarowinkler_op(:a, :b), :a ~@@ :b as operator;
select lev(:a, :b), lev_op(:a, :b), :a ~== :b as operator;
select levslow(:a, :b), levslow_op(:a, :b);
select matchingcoefficient(:a, :b), matchingcoefficient_op(:a, :b), :a ~^^ :b as operator;
--select mongeelkan(:a, :b), mongeelkan_op(:a, :b), :a ~|| :b as operator;
--select needlemanwunsch(:a, :b), needlemanwunsch_op(:a, :b), :a ~#~ :b as operator;
select overlapcoefficient(:a, :b), overlapcoefficient_op(:a, :b), :a ~** :b as operator;
select qgram(:a, :b), qgram_op(:a, :b), :a ~~~ :b as operator;
--select smithwaterman(:a, :b), smithwaterman_op(:a, :b), :a ~=~ :b as operator;
--select smithwatermangotoh(:a, :b), smithwatermangotoh_op(:a, :b), :a ~!~ :b as operator;
select soundex(:a, :b), soundex_op(:a, :b), :a ~*~ :b as operator;