Skip to main content

A Python package for converting and normalizing Vietnamese addresses

Project description

Vietnam Address Converter

This is the result of my vibe coding experiment to fully use AI to solve a problem.

Vietnam recently merged 63 provinces into 34, creating a need to convert old addresses to the new administrative format. This Python package provides a solution for converting old Vietnamese addresses to the new format.

Most of the code is written with Github Copilot using GPT 4.1 and Claude Sonet 4 model.

The mapping data is sourced from here. Initially, I tried to parse from this wiki page, but the result was so bad that I ended up abandoning the parser.

Disclaimer

This package is experimental and may not be 100% accurate. Please verify results and contribute improvements!

Installation

pip install vn-address-converter

Usage Example

from vn_address_converter import convert_to_new_address, Address

address = Address(
    street_address="720A Điện Biên Phủ",
    ward="Phường 22",
    district="Quận Bình Thạnh",
    province="Thành phố Hồ Chí Minh"
)

new_address = convert_to_new_address(address)
print(new_address)
# Output: {'street_address': '720A Điện Biên Phủ', 'ward': 'Phường Thạnh Mỹ Tây', 'district': None, 'province': 'Thành phố Hồ Chí Minh'}

License

MIT

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

vn_address_converter-0.1.0.tar.gz (97.8 kB view details)

Uploaded Source

Built Distribution

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

vn_address_converter-0.1.0-py3-none-any.whl (99.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vn_address_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 14aceb7c666b9489d2fcbea58247e3e31f851e2df46f1ac5847f538a198622f5
MD5 974e6efcafb80448d3608208ce9609a8
BLAKE2b-256 93cf6d0168b85684447b4d2f3b8c99e050828ee668c176330485c31718b171a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vn_address_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8f08d8ca900006d0e39b254059f45965d262267705cd5e7db4eef0c95735efa
MD5 0fcf8feba16a944f0fed50c2395d5eec
BLAKE2b-256 785a90ea5215717c9db368384b038468b5387d77984527f0b2ef9935937358a7

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