Twinkle HubTwinkle Hub

地址中譯英

tw_address_zh_to_en

その他 · 26 件🇹🇼 台湾読み取り専用

中文地址 → 英文標準格式(中華郵政 Hanyu Pinyin 慣例)。

Args: address: 中文地址,例 "臺北市信義區忠孝東路五段 7 號"。 postal_code: 可選 5 碼 zip 附在英文地址尾。

Returns: english (倒序郵政格式) + parts (結構化拆解)。

Roma 化:縣市區用 bundled 官方英譯表(Taipei / Kaohsiung / Da'an 等慣用拼法);路名用 pypinyin 機械音譯(首字母 capitalize)。 Corner case:「三多三路」這種純數字路名輸出可能偏離官方拼法。

パラメータ

名前説明
address *string
postal_codestring
生の JSON schema
{
  "properties": {
    "address": {
      "title": "Address",
      "type": "string"
    },
    "postal_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Postal Code"
    }
  },
  "required": [
    "address"
  ],
  "title": "address_zh_to_enArguments",
  "type": "object"
}

呼び出し方

スターター——パラメータは​上表参照
tw_address_zh_to_en({ address: "…" })