Code Monkey home page Code Monkey logo

vn_address_standardizer's Introduction

Bộ chuẩn hóa địa chỉ Việt Nam (English below)

A package for parsing Vietnamese address

Tính năng

  1. Xử lỹ những tên viết tắt thông dụng
  2. Sửa chính tả
  3. Sửa lỗi thứ tự tên đơn vị hành chính
  4. Thêm prefix (xã, huyện, tỉnh, ...)

Cài đặt qua PyPi

pip3 install vnaddress

Testing

from vnaddress import VNAddressStandardizer

address = VNAddressStandardizer(raw_address = "Dicjh Vongj Haaju", comma_handle = True)
address.execute()

# output
# phường Dịch Vọng Hậu, quận Cầu Giấy, thành phố Hà Nội


address = VNAddressStandardizer(raw_address = "Dicjh Vongj Haaju, ", comma_handle = True, detail=True)
address.execute()

# output
# {'result': 'phường Dịch Vọng Hậu, quận Cầu Giấy, thành phố Hà Nội', 'match': {'match_address': 'Dịch Vọng Hậu, Cầu Giấy, Hà Nội', 'match_percent': 100}, 'missing': ['TTP', 'QH'], 'detail': {'PX': 'Dịch Vọng Hậu', 'QH': 'Cầu Giấy', 'TTP': 'Hà Nội'}}

[English]

Features

  1. Handling common abbreviations
  2. Edit the spelling
  3. Correct the order of administrative unit names
  4. Add prefix (commune, district, province, ...)

Install via PyPi

pip3 install vnaddress

Testing

from vnaddress import VNAddressStandardizer

address = VNAddressStandardizer(raw_address = "Dicjh Vongj Haaju", comma_handle = True)
address.execute()

# output
# phường Dịch Vọng Hậu, quận Cầu Giấy, thành phố Hà Nội


address = VNAddressStandardizer(raw_address = "Dicjh Vongj Haaju, ", comma_handle = True, detail=True)
address.execute()

# output
# {'result': 'phường Dịch Vọng Hậu, quận Cầu Giấy, thành phố Hà Nội', 'match': {'match_address': 'Dịch Vọng Hậu, Cầu Giấy, Hà Nội', 'match_percent': 100}, 'missing': ['TTP', 'QH'], 'detail': {'PX': 'Dịch Vọng Hậu', 'QH': 'Cầu Giấy', 'TTP': 'Hà Nội'}}

vn_address_standardizer's People

Contributors

vantrong291 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.