Twinkle HubTwinkle Hub
Sign in

📌 2026-08-17 added: ⚖️ Taiwan statute time machine — historical article text · revision history · full-text search · citation graph (935 datasets · 35,454+ rows)

View full changelog →

Extract admin code from address

tw_extract_admin_code_from_addr

TW-specificMIT

從中文自由文字地址 regex 抽 縣市/鄉鎮 → admin code (sub-ms).

Args:
    address: e.g. '110臺北市信義區忠孝東路五段236巷66號'
             郵遞區號 (3-5 digit) 可有可無.

Returns:
    {found, addr_input, county, town, county_code, town_code}

Use case: 文字 dataset (PCC agency_addr / 統編公司登記地址 /
          健保特約地址) batch enrich admin code.

Input schema

{
  "properties": {
    "address": {
      "title": "Address",
      "type": "string"
    }
  },
  "required": [
    "address"
  ],
  "title": "extract_admin_code_from_addrArguments",
  "type": "object"
}

How to call

Once your Twinkle Hub MCP client is configured, your agent will see tw_extract_admin_code_from_addr. Just ask it to call — example:

# Ask Claude / any MCP client:
請用 tw_extract_admin_code_from_addr 處理 "…"。

# It will call:
tw_extract_admin_code_from_addr(input="…")

Haven't set up a client yet?

Claude Desktop in 3 minutes — download the .mcpb and double-click, or see docs for other clients.

See user docs