--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: duck_pinyin excerpt: | DuckDB Community Extensions Chinese pinyin conversion, polyphonic phrase disambiguation, and ordered pinyin matching extension: name: duck_pinyin description: Chinese pinyin conversion, polyphonic phrase disambiguation, and ordered pinyin matching version: "0.1" language: Rust build: cargo license: MIT AND CC-BY-SA-4.0 maintainers: - DeoLeung requires_toolchains: "rust;python3" excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw;windows_amd64_rtools;linux_amd64_musl;linux_arm64_musl;osx_amd64;windows_arm64" repo: github: aiyou178/duck_pinyin ref: 3f92fbd1a11c5e321a681c05e7343892e3dc24ed docs: hello_world: | LOAD duck_pinyin; SELECT pinyin_char_romanize('我ABC们123'); SELECT pinyin_word_romanize('重庆银行'); SELECT pinyin_matches('wu han huang he lou', 'whh'); extended_description: | Native Chinese pinyin conversion and ordered phrase matching, ported from pg_pinyin with pinned embedded dictionaries. Includes character conversion, longest-phrase polyphonic disambiguation, batch documents, pre-tokenized input, and explicit per-call dictionary overrides. Query modes include full syllables, initials, autocomplete, automatic, and legacy compatibility parsing. Ordered matching supports a total skipped-token budget. The core extension is independent of PostgreSQL and FTS. An optional official FTS/BM25 SQL example is provided separately. Its current dynamic-term macro has a documented correlated-query scaling limitation; consult the repository benchmarks before using that example on large tables. Extension code is MIT licensed. Embedded phrase dictionary data includes CC-BY-SA-4.0 material. Source attribution, pinned data manifests, and complete data license texts are included in the repository and release archives. Qualified with DuckDB 2.0.0 using the legacy V1 C API entrypoint. extension_star_count: 3 extension_star_count_pretty: 3 extension_download_count: 539 extension_download_count_pretty: 539 image: '/images/community_extensions/social_preview/preview_community_extension_duck_pinyin.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ❌ | ❌ | | macOS ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |-----------------------------------|---------------|-------------|---------|----------| | pinyin_char_romanize | scalar | NULL | NULL | | | pinyin_matches | scalar | NULL | NULL | | | pinyin_phrase | scalar | NULL | NULL | | | pinyin_regex_phrase | scalar | NULL | NULL | | | pinyin_regex_phrase_mode | scalar | NULL | NULL | | | pinyin_regex_phrase_patterns | scalar | NULL | NULL | | | pinyin_regex_phrase_patterns_mode | scalar | NULL | NULL | | | pinyin_word_romanize | scalar | NULL | NULL | | | pinyin_word_romanize_batch | scalar | NULL | NULL | | | pinyin_word_romanize_tokens | scalar | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |