No project description provided
Project description
vietnamese_address_parser is an experimental library for parsing and normalizing Vietnamese addresses, used in our search and data scraping tools.
Installation
pip install address
⚠️ API Note
This parser integrates with the OpenStreetMap Nominatim API to enhance address accuracy through geolocation. Because of this, some lookups may take a few seconds to complete, depending on network speed and API rate limits.
Usage in Python
Import and use the parser in your Python code:
from vietnamese_address_parser import VietnameseAddressParser
parser = VietnameseAddressParser()
address = "54-55 Bàu Cát 4, Phường 14, Tân Bình, Hồ Chí Minh"
result = parser(address)
print(result)
General Notes
- Keep abbreviations to two segments or fewer for best search performance.
- Separate all address components with commas, in this order:
- Maximun field length is 6
{dia_chi}, {extra_field}, {phuong_xa}, {quan_huyen}, {tinh_thanh_pho}, {Việt Nam}
Valid address example
TP. VT, Tỉnh BR-VTĐường XVNT, Quận Bình Thạnh, TP. HCM, VNĐường Lê Lợi, P.1, Q.1, TP. HCM67 Trần Kế Xương, Q. PN, TP. HCM218 Trần Quý Cáp, X. TL, TP. PT, Tỉnh Bình ThuậnPhú Thạnh, Tân Phú, Hồ Chí Minh, Việt Nam218 Tran Quy Cap, Thanh pho Phan Thiet, Tinh Binh Thuan43/47 Cù Chính Lan, Thanh Khê Đông, TK, ĐN
CLI Usage
When you run the command:
vietnamese_address_parser
it will print:
Vietnamese Address Parser v0.1.7
Hello! Welcome to the Vietnamese Address Parser CLI.
Usage example:
parser = VietnameseAddressParser()
result = parser("54-55 Bàu Cát 4, Phường 14, Tân Bình, Hồ Chí Minh")
print(result)
⚠️ NOTE:
This parser uses the OpenStreetMap Nominatim API for geolocation enhancement.
As a result, some lookups may take a few seconds due to network latency or rate limits
1. House Number & Street Name
Format
{house_number}\s{prefix?}\.?\s{street_name}
where {prefix} is one of:
Đ.Đường
or just
{house_number}\s{street_name}
Valid Examples
123A/32 Trần Hưng Đạo45A đường Nguyễn HuệĐường Nam Kỳ Khởi NghĩaĐ. XVNT
Invalid:
Nam Kỳ Khởi Nghĩa(missing “Đường” prefix)
2. Phường / Xã
Format Options
{prefix}\.?\s{phuong_xa}
where {prefix} is one of:
X.XaP.PhuongTT.Thi tran
or just
{phuong_xa}
Valid Examples
P. 7P. BNP. Bến NghéPhường Bến Nghé
3. Quận / Huyện / Thị xã
Format Options
{prefix}\.?\s{quan_huyen}
where {prefix} is one of:
Q.QuanH.HuyenTX.Thi xa
or just
{quan_huyen}
4. Tỉnh / Thành Phố
Format Options
{prefix}\.?\s{tinh_thanh_pho}
where {prefix} is one of:
T.TỉnhTP.Thanh pho
or just
{tinh_thanh_pho}
End of Guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vietnamese_address_parser-0.1.8.tar.gz.
File metadata
- Download URL: vietnamese_address_parser-0.1.8.tar.gz
- Upload date:
- Size: 60.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2f8451ae71f6edd943a8df87e8a799f4a579b54e6b6fa5fdda13eeffc8f695
|
|
| MD5 |
0e5b233c1e01ed0f45069874d452ac1b
|
|
| BLAKE2b-256 |
89dc8bc2b6faa33d5ad69d6db6c94ea6f5f879abba8fdf85a6321e371cbba23a
|
File details
Details for the file vietnamese_address_parser-0.1.8-py3-none-any.whl.
File metadata
- Download URL: vietnamese_address_parser-0.1.8-py3-none-any.whl
- Upload date:
- Size: 61.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682ecfd5dc842e79beca43560a48b668db30f6cae9bd73727d518a4713d0bb36
|
|
| MD5 |
e0a28242933b770439178148a9e30488
|
|
| BLAKE2b-256 |
9c44f0cd0235477f433689eef38887c683efd83aeb2ac8ab914838b8d941e70c
|