{"id":14383817,"url":"https://github.com/openvenues/node-postal","last_synced_at":"2025-05-14T19:04:02.573Z","repository":{"id":45442902,"uuid":"48209961","full_name":"openvenues/node-postal","owner":"openvenues","description":"NodeJS bindings to libpostal for fast international address parsing/normalization","archived":false,"fork":false,"pushed_at":"2025-01-30T09:22:18.000Z","size":59,"stargazers_count":229,"open_issues_count":16,"forks_count":37,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T15:06:04.852Z","etag":null,"topics":["address","address-parser","binding","international","native","nlp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openvenues.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-18T02:31:16.000Z","updated_at":"2025-04-12T14:03:25.000Z","dependencies_parsed_at":"2024-01-14T19:14:36.889Z","dependency_job_id":"52c3cddc-4eda-4251-9a06-5720bd0b2457","html_url":"https://github.com/openvenues/node-postal","commit_stats":{"total_commits":61,"total_committers":10,"mean_commits":6.1,"dds":"0.21311475409836067","last_synced_commit":"8c83daf7298c54783dd0ebddad9f614ffff83bc8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvenues%2Fnode-postal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvenues%2Fnode-postal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvenues%2Fnode-postal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvenues%2Fnode-postal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openvenues","download_url":"https://codeload.github.com/openvenues/node-postal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732485,"owners_count":21152852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["address","address-parser","binding","international","native","nlp"],"created_at":"2024-08-28T18:01:00.824Z","updated_at":"2025-04-13T15:06:09.147Z","avatar_url":"https://github.com/openvenues.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"node-postal\n-----------\n\n[![Build Status](https://travis-ci.org/openvenues/node-postal.svg?branch=master)](https://travis-ci.org/openvenues/node-postal) [![npm](https://img.shields.io/npm/v/node-postal.svg)](https://www.npmjs.com/package/node-postal)\n\nThese are the NodeJS bindings to [libpostal](https://github.com/openvenues/libpostal), a fast, multilingual NLP library for parsing/normalizing physical addresses. libpostal is written in C because virtually every other language can bind to C.\n\nUsage\n-----\n\n```node\nvar postal = require('node-postal');\n\n// Expansion API\npostal.expand.expand_address('V XX Settembre, 20');\n\n// Parser API\npostal.parser.parse_address('Barboncino (first unionized pizza place in NYC), 781 Franklin Ave, Crown Heights, Brooklyn, NY 11238');\n```\n\nInstallation\n------------\n\nBefore using the Node bindings, you must install the libpostal C library. Make sure you have the following prerequisites:\n\n**On Ubuntu/Debian**\n```\nsudo apt-get install curl autoconf automake libtool pkg-config\n```\n\n**On CentOS/RHEL**\n```\nsudo yum install curl autoconf automake libtool pkgconfig\n```\n\n**On Mac OSX**\n```\nbrew install curl autoconf automake libtool pkg-config\n```\n\n**Installing libpostal**\n\n```\ngit clone https://github.com/openvenues/libpostal\ncd libpostal\n./bootstrap.sh\n./configure --datadir=[...some dir with a few GB of space...]\nmake\nsudo make install\n\n# On Linux it's probably a good idea to run\nsudo ldconfig\n```\n**Install node-gyp**\n\nThen install node-gyp system-wide:\n\n```\nsudo npm install -g node-gyp\n```\n\n**Installing node-gyp on Linux (Ubuntu)**\n\nFirst make sure you have:\n\n1. gcc, g++ and make (```sudo apt-get install build-essential``` on Ubuntu)\n2. NodeJS with all the development headers (if using a package manager like apt-get, follow the instructions here: https://nodejs.org/en/download/package-manager/)\n3. python 2.7\n\n\n**Installing the Node bindings**\n\n```\nnpm install node-postal\n```\n\nCompatibility\n-------------\n\nnode-postal is tested on most major versions of Node (0.10+) in continuous integration. The C++ bindings are written using [Nan](https://github.com/nodejs/nan), which abstracts the API changes across various versions of V8, so the latest versions of Node will likely work.\n\nIf you're having trouble compiling, post a Github issue with your OS and Node versions along with the output of npm install / node-gyp rebuild.\n\nTests\n-----\n\nTo run the unit tests:\n\n```\nnpm test\n```\n\nTroubleshooting\n---------------\n**Installing [libpostal](https://github.com/openvenues/libpostal):**\nnode-postal is a thin wrapper around libpostal, which is written in C. Installing node-postal with npm will not install libpostal as a dependency. The install steps described above will install it in standard locations for your OS. For OS X and Linux, that's `/usr/local/include` and `/usr/local/lib`. node-postal will look in these locations for the C libraries. If you have problems installing node-postal, check there for recently installed libpostal libraries.\n\n**Downloading Large Files**\nThe ```make``` process downloads ~750MB of data, ~2GB unzipped (note: these are production-quality machine learning models trained on over a billion addresses, that's how much disk/memory it takes). Make sure the --datadir argument to ```configure```, which requires an absolute path, has enough room to accommodate the models. If you get errors after downloading, e.g.:\n```\nmake[3]: *** [all-local] Error 1\nmake[2]: *** [all-recursive] Error 1\nmake[1]: *** [all-recursive] Error 1\nmake: *** [all] Error 2\n```\n\nthere may be problems with subsequent install steps. Occasionally something will go wrong and it will give up downloading. Once downloading is complete, the make script will unpack the langauge_classifier.tar.gz.X files. If you see these files, your download may have stopped. Try running the make script again.\n\nSpecial Thanks\n--------------\n\nLucas Hrabovsky (https://github.com/imlucas) for information and examples of repos using Nan, node-gyp, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvenues%2Fnode-postal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenvenues%2Fnode-postal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvenues%2Fnode-postal/lists"}