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: "…" })