Coder Social home page Coder Social logo

chinese-address-parser's Introduction

Chinese Address Parser

This moudle is responsible for parsing chinse address based on a lexicon of chinese place name. Default, a given chinese address will be parsed into five parts, i.e. third level address.

Usage

from address_parser import Address_Parser

ap = Address_Parser()
address = u'黑龙江省哈尔滨市南岗区西大直街92号'
print ap.parse(address)

address = u'上海市黄浦区西凌家宅路90弄33号'
print ap.parse(address)

address = u'丰台区南三环西路16号'
print ap.parse(address)

address = u'美国加利福尼亚州'
print ap.parse(address)

Output

[u'**', u'黑龙江省', u'哈尔滨市', u'南岗区', u'西大直街92号']

[u'**', u'上海市', u'上海市', u'黄浦区', u'西凌家宅路90弄33号']

[u'**', u'北京市', u'北京市', u'丰台区', u'南三环西路16号']

[u'UNKNOWN', u'', u'', u'', u'美国加利福尼亚州']

Acknowledge

The original lexicon of chinese place name is here: https://github.com/cnluzhang/chinaddress

License

MIT License

chinese-address-parser's People

Contributors

dengliangshi avatar

Watchers

 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.