跳转到主要内容

addressing_dictionary

面向地址缩写归一化的全文检索词典与配置

addressing_dictionary · 面向地址缩写归一化的全文检索词典与配置

概览

ID扩展软件包版本类别许可证编程语言
2270addressing_dictionaryaddressing_dictionary1.1FTSMITSQL
属性可执行文件动态库需要预加载需要建扩展可迁移可信
----d-r否否否是是否
SQL and dictionary data only; no shared library. PostgreSQL 14-18 verified in PGSTY builds; upstream declares no current major-version matrix.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY1.119 18 17 16 15addressing_dictionary-
RPMPIGSTY1.119 18 17 16 15addressing_dictionary_$v-
DEBPIGSTY1.119 18 17 16 15postgresql-$v-addressing-dictionary-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
el8.aarch64N/APIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
el9.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
el9.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
el10.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
el10.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
d12.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
d12.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
d13.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
d13.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u22.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u22.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u24.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u24.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u26.x86_64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
u26.aarch64PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1PIGSTY 1.1
软件包版本平台仓库大小下载
addressing_dictionary_191.1el9.x86_64pigsty11.5 KiBaddressing_dictionary_19-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_191.1el9.aarch64pigsty11.5 KiBaddressing_dictionary_19-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_191.1el10.x86_64pigsty11.6 KiBaddressing_dictionary_19-1.1-1PGSTY.el10.noarch.rpm
addressing_dictionary_191.1el10.aarch64pigsty11.6 KiBaddressing_dictionary_19-1.1-1PGSTY.el10.noarch.rpm
postgresql-19-addressing-dictionary1.1d12.x86_64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-19-addressing-dictionary1.1d12.aarch64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-19-addressing-dictionary1.1d13.x86_64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-19-addressing-dictionary1.1d13.aarch64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-19-addressing-dictionary1.1u22.x86_64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-19-addressing-dictionary1.1u22.aarch64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-19-addressing-dictionary1.1u24.x86_64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-19-addressing-dictionary1.1u24.aarch64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-19-addressing-dictionary1.1u26.x86_64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
postgresql-19-addressing-dictionary1.1u26.aarch64pigsty4.5 KiBpostgresql-19-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
软件包版本平台仓库大小下载
addressing_dictionary_181.1el8.x86_64pigsty11.5 KiBaddressing_dictionary_18-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_181.1el8.aarch64pigsty11.5 KiBaddressing_dictionary_18-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_181.1el9.x86_64pigsty11.5 KiBaddressing_dictionary_18-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_181.1el9.aarch64pigsty11.5 KiBaddressing_dictionary_18-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_181.1el10.x86_64pigsty11.6 KiBaddressing_dictionary_18-1.1-1PGSTY.el10.noarch.rpm
addressing_dictionary_181.1el10.aarch64pigsty11.6 KiBaddressing_dictionary_18-1.1-1PGSTY.el10.noarch.rpm
postgresql-18-addressing-dictionary1.1d12.x86_64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-18-addressing-dictionary1.1d12.aarch64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-18-addressing-dictionary1.1d13.x86_64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-18-addressing-dictionary1.1d13.aarch64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-18-addressing-dictionary1.1u22.x86_64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-18-addressing-dictionary1.1u22.aarch64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-18-addressing-dictionary1.1u24.x86_64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-18-addressing-dictionary1.1u24.aarch64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-18-addressing-dictionary1.1u26.x86_64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
postgresql-18-addressing-dictionary1.1u26.aarch64pigsty4.5 KiBpostgresql-18-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
软件包版本平台仓库大小下载
addressing_dictionary_171.1el8.x86_64pigsty11.5 KiBaddressing_dictionary_17-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_171.1el8.aarch64pigsty11.5 KiBaddressing_dictionary_17-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_171.1el9.x86_64pigsty11.5 KiBaddressing_dictionary_17-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_171.1el9.aarch64pigsty11.5 KiBaddressing_dictionary_17-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_171.1el10.x86_64pigsty11.6 KiBaddressing_dictionary_17-1.1-1PGSTY.el10.noarch.rpm
addressing_dictionary_171.1el10.aarch64pigsty11.6 KiBaddressing_dictionary_17-1.1-1PGSTY.el10.noarch.rpm
postgresql-17-addressing-dictionary1.1d12.x86_64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-17-addressing-dictionary1.1d12.aarch64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-17-addressing-dictionary1.1d13.x86_64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-17-addressing-dictionary1.1d13.aarch64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-17-addressing-dictionary1.1u22.x86_64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-17-addressing-dictionary1.1u22.aarch64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-17-addressing-dictionary1.1u24.x86_64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-17-addressing-dictionary1.1u24.aarch64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-17-addressing-dictionary1.1u26.x86_64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
postgresql-17-addressing-dictionary1.1u26.aarch64pigsty4.5 KiBpostgresql-17-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
软件包版本平台仓库大小下载
addressing_dictionary_161.1el8.x86_64pigsty11.5 KiBaddressing_dictionary_16-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_161.1el8.aarch64pigsty11.5 KiBaddressing_dictionary_16-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_161.1el9.x86_64pigsty11.5 KiBaddressing_dictionary_16-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_161.1el9.aarch64pigsty11.5 KiBaddressing_dictionary_16-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_161.1el10.x86_64pigsty11.6 KiBaddressing_dictionary_16-1.1-1PGSTY.el10.noarch.rpm
addressing_dictionary_161.1el10.aarch64pigsty11.6 KiBaddressing_dictionary_16-1.1-1PGSTY.el10.noarch.rpm
postgresql-16-addressing-dictionary1.1d12.x86_64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-16-addressing-dictionary1.1d12.aarch64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-16-addressing-dictionary1.1d13.x86_64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-16-addressing-dictionary1.1d13.aarch64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-16-addressing-dictionary1.1u22.x86_64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-16-addressing-dictionary1.1u22.aarch64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-16-addressing-dictionary1.1u24.x86_64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-16-addressing-dictionary1.1u24.aarch64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-16-addressing-dictionary1.1u26.x86_64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
postgresql-16-addressing-dictionary1.1u26.aarch64pigsty4.5 KiBpostgresql-16-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
软件包版本平台仓库大小下载
addressing_dictionary_151.1el8.x86_64pigsty11.5 KiBaddressing_dictionary_15-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_151.1el8.aarch64pigsty11.5 KiBaddressing_dictionary_15-1.1-1PGSTY.el8.noarch.rpm
addressing_dictionary_151.1el9.x86_64pigsty11.5 KiBaddressing_dictionary_15-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_151.1el9.aarch64pigsty11.5 KiBaddressing_dictionary_15-1.1-1PGSTY.el9.noarch.rpm
addressing_dictionary_151.1el10.x86_64pigsty11.6 KiBaddressing_dictionary_15-1.1-1PGSTY.el10.noarch.rpm
addressing_dictionary_151.1el10.aarch64pigsty11.6 KiBaddressing_dictionary_15-1.1-1PGSTY.el10.noarch.rpm
postgresql-15-addressing-dictionary1.1d12.x86_64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-15-addressing-dictionary1.1d12.aarch64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~bookworm_all.deb
postgresql-15-addressing-dictionary1.1d13.x86_64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-15-addressing-dictionary1.1d13.aarch64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~trixie_all.deb
postgresql-15-addressing-dictionary1.1u22.x86_64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-15-addressing-dictionary1.1u22.aarch64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~jammy_all.deb
postgresql-15-addressing-dictionary1.1u24.x86_64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-15-addressing-dictionary1.1u24.aarch64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~noble_all.deb
postgresql-15-addressing-dictionary1.1u26.x86_64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~resolute_all.deb
postgresql-15-addressing-dictionary1.1u26.aarch64pigsty4.5 KiBpostgresql-15-addressing-dictionary_1.1-1PGSTY~resolute_all.deb

源码

addressing_dictionary-1.1-bf3590e038d8.tar.gz

pig build pkg addressing_dictionary;		# build rpm/deb

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

pig repo add pgsql -u   # add both repo and update cache

使用 pig 安装扩展。

pig install addressing_dictionary;		# install by package name

pig install addressing_dictionary -v 19;   # install for PG 19
pig install addressing_dictionary -v 18;   # install for PG 18
pig install addressing_dictionary -v 17;   # install for PG 17
pig install addressing_dictionary -v 16;   # install for PG 16
pig install addressing_dictionary -v 15;   # install for PG 15

在数据库中创建扩展。

CREATE EXTENSION addressing_dictionary;

用法

来源:

addressing_dictionary 安装面向地址的全文搜索配置与词典。它适合在本地地址近似检索中,把街道类型、方向和序数的不同写法归一为可比较的词位;它不是地理编码器,也不能替代地址解析与校验。

核心流程

在数据库中安装一次扩展,用所提供的配置归一化地址文本,并让索引表达式与查询表达式保持一致。

CREATE EXTENSION addressing_dictionary;

SELECT to_tsvector('addressing_en', '1234 n main st');

CREATE INDEX address_search_idx
ON address_book
USING gin (to_tsvector('addressing_en', full_address));

SELECT *
FROM address_book
WHERE to_tsvector('addressing_en', full_address)
      @@ plainto_tsquery('addressing_en', '1234 north main street');

1.1 版会保留方向缩写,同时产生展开形式,因此单字母的北向标记可以输出两种形式。这种设计刻意保留歧义,而不会假定每次出现都只有一种含义。

已安装对象

  • 英文配置把地址标记的同义词词典、停用词词典和叙词表组合起来。
  • 法文配置安装对应的法文文本搜索对象。
  • 两套配置都复制自 PostgreSQL 的简单配置,因此通过扩展的数据文件归一化,而不是使用通用语言词干提取器。

运维边界

该扩展可重定位,不需要预加载或重启。所有可能执行查询或恢复扩展的服务器都必须安装其词典、同义词、停用词和叙词表文件。

全文匹配属于启发式方法。缩写可能有歧义,全国范围的数据也可能产生大量误匹配或重复候选。应把它用于改进候选检索,尤其是范围有限的城市或地区;对正确性有要求时,仍需另外使用结构化地址或地理空间检查。

表格阅读器