Skip to main content

A Python parser for Thai address

Project description

thaiaddress: A Parser for Thai Address

Parser for Thai address. ไลบรารี่เพื่อแยกแยะชื่อ/ที่อยู่/รหัสไปรษณีย์/เบอร์โทรศัพท์

Installation

You can install a recent development (recommended) using pip directly from the repository

pip install git+git://github.com/425degree-developers/thaiaddress.git

or stable version from PyPi using

pip install thaiaddress

Example Usage

import thaiaddress
thaiaddress.parse("นายปรายุ้ด จันทร์กะเพรา 099-999-9999 25/25 ถ.พุทธมณฑล สาย 4 ต. ศาลายา อ.พุทธมณฑล จ.นครปฐม 73170")

>>> {
    'text': 'นายปรายุ้ด จันทร์กะเพรา 25/25 ถ.พุทธมณฑล สาย 4 ต. ศาลายา อ.พุทธมณฑล จ.นครปฐม 73170',
    'name': 'นายปรายุ้ด จันทร์กะเพรา',
    'address': '25/25 ถ.พุทธมณฑล สาย 4',
    'location': 'ต. ศาลายา อ.พุทธมณฑล จ.นครปฐม',
    'province': 'นครปฐม',
    'district': 'พุทธมณฑล',
    'subdistrict': 'ศาลายา',
    'postal_code': '73170',
    'phone_number': '0999999999',
    'email': ''
}

Display output on Jupyter notebook

Development Plan

  • This is an early version of our parser with very little data. We will make a better model relatively soon.

Developers

This repository is developed at 425 Degree Co., Bangkok, Thailand

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

thaiaddress-0.2.1.tar.gz (252.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page