Skip to main content

中文证件用名词(地理/姓名/机构)到俄语的对照库,内置 SQLite 数据库。

Project description

zh2ru-idterms

中文证件名词 → 俄语对照库
专门用于 护照 / 驾驶证 等涉外文档的中俄专用名词翻译。
库中内置 SQLite 数据库 terms.db,包含:

  • 地理名词(省、市、区县)
  • 姓名规则(姓氏拼音 → 俄文,名的拼音 → Palladius 转写)
  • 机构名称(护照 / 驾驶证相关的机关机构)

🚀 安装

pip install zh2ru-idterms

本地开发安装:

pip install -e .

📦 特点

• 开箱即用:数据库已内置,无需手动导入。 • 专门针对证件翻译(护照 / 驾驶证)。 • 提供 Python API,可直接查询。

📖 使用方法

from zh2ru_idterms import (
    get_place_path,
    find_surname_pinyin,
    to_palladius_given,
    translate_person_name,
    find_org,
)

# 1. 地理名词
print(get_place_path(province_zh="浙江省", city_zh="宁波市", district_zh="鄞州区"))
# 输出: Чжэцзян / Нинбо / Иньчжоу

# 2. 姓氏拼音 → 俄语
print(find_surname_pinyin("zhang"))
# 输出: чжан

# 3. 名(拼音 → Palladius 转写)
print(to_palladius_given("xiaoming"))
# 输出: сяомин

# 4. 中文姓名全名 → 俄语
print(translate_person_name("zhang", "xiaoming"))
# 输出: Чжан Сяомин

# 5. 机构名称
print(find_org("国家移民管理局", doc_type="passport"))
# 输出: Государственное управление по делам иммиграции КНР

📚 数据范围

  • 地理名词:包含中国各省、市、区县的俄语翻译。
  • 姓名规则:提供常见姓氏的拼音到俄语的映射,以及名的 Palladius 转写。
  • 机构名称:涵盖护照、驾驶证等相关机构的俄语翻译。
  • 支持多种证件类型:护照、驾驶证等。

🛠️ 开发者

数据导入(仅开发者需要)

最终用户无需操作数据库。 开发者可使用 import_all.py 或各独立脚本导入最新数据到 terms.db。

📜 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zh2ru_idterms-0.1.0.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zh2ru_idterms-0.1.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file zh2ru_idterms-0.1.0.tar.gz.

File metadata

  • Download URL: zh2ru_idterms-0.1.0.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for zh2ru_idterms-0.1.0.tar.gz
Algorithm Hash digest
SHA256 090dc9865aa27095008a966ea13f5331894a54cc0543b759428d99091b5777fe
MD5 0cffbf412973b635e7e2b346a55eb733
BLAKE2b-256 bdc2fa66a9fc74b399b18fa843615a35b9a67b0d6727aefccf37b779ddbe8e3d

See more details on using hashes here.

File details

Details for the file zh2ru_idterms-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zh2ru_idterms-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for zh2ru_idterms-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d04e2570ef59410f6e7200d7027a095c064aed0b0749c04389dbf7354db5aa1a
MD5 a3ff474d235334c4570c0066930cbc03
BLAKE2b-256 0363d4b87aed646c63e39ab628ce4b83192b9b29b923e4a97127d9929a2a8f55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page