pg_tokenizer
pg_tokenizer : Tokenizers for full-text search
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 2160 | pg_tokenizer | pg_tokenizer | 0.1.1 |
FTS | Apache-2.0 | Rust |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | tokenizer_catalog |
| See Also | pgroonga pg_jieba pg_cjk_parser zhparser pg_bigm pg_tiktoken pg_tiktoken_c unaccent dict_xsyn dict_int hunspell_cs_cz pg_kazsearch |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.1 |
18 17 16 15 14 | pg_tokenizer |
- |
| RPM | PIGSTY | 0.1.1 |
18 17 16 15 14 | pg_tokenizer_$v |
- |
| DEB | PIGSTY | 0.1.1 |
18 17 16 15 14 | postgresql-$v-pg-tokenizer |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| el8.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| el9.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| el9.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| el10.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| el10.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| d12.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| d12.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| d13.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| d13.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u22.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u22.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u24.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u24.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u26.x86_64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
| u26.aarch64 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 | PIGSTY 0.1.1 |
Source
github.com/tensorchord/pg_tokenizer.rs
pg_tokenizer.rs-0.1.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
pg_tokenizer is a PostgreSQL extension that provides tokenizers for full-text search. It is designed to work with VectorChord-bm25 for native BM25 ranking index support.
Quick Start
Tokenizer Models
pg_tokenizer supports multiple tokenizer models for different languages and use cases:
| Model | Language | Description |
|---|---|---|
llmlingua2 |
English | BERT-based tokenizer from LLMLingua2 |
jieba |
Chinese | Jieba Chinese text segmentation |
lindera/ipadic |
Japanese | Lindera tokenizer with IPADIC dictionary |
| Custom models | Any | User-trained models for domain-specific text |
Creating Tokenizers
Tokenizing Text
Text Analyzer
pg_tokenizer also provides text analyzer functionality that combines tokenization with additional text processing steps. For detailed text analyzer usage, refer to the Text Analyzer documentation.
Integration with VectorChord-BM25
pg_tokenizer is typically used together with VectorChord-BM25 for full BM25 ranking support:
Documentation
For more details, see the full documentation: