libpostal | C library for parsing/normalizing street addresses | Natural Language Processing library

 by   openvenues C Version: v1.1 License: MIT

kandi X-RAY | libpostal Summary

kandi X-RAY | libpostal Summary

libpostal is a C library typically used in Artificial Intelligence, Natural Language Processing applications. libpostal has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP and open data. The goal of this project is to understand location-based strings in every language, everywhere. For a more comprehensive overview of the research behind libpostal, be sure to check out the (lengthy) introductory blog posts:. :jp: :ru: :de: :kr: :es: :cn: :gb: . Addresses and the locations they represent are essential for any application dealing with maps (place search, transportation, on-demand/delivery services, check-ins, reviews). Yet even the simplest addresses are packed with local conventions, abbreviations and context, making them difficult to index/query effectively with traditional full-text search engines. This library helps convert the free-form addresses that humans use into clean normalized forms suitable for machine comparison and full-text indexing. Though libpostal is not itself a full geocoder, it can be used as a preprocessing step to make any geocoding application smarter, simpler, and more consistent internationally. :us: :it: :fr: . The core library is written in pure C. Language bindings for Python, Ruby, Go, Java, PHP, and NodeJS are officially supported and it's easy to write bindings in other languages.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              libpostal has a medium active ecosystem.
              It has 3716 star(s) with 391 fork(s). There are 107 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 259 open issues and 198 have been closed. On average issues are closed in 300 days. There are 44 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of libpostal is v1.1

            kandi-Quality Quality

              libpostal has no bugs reported.

            kandi-Security Security

              libpostal has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              libpostal is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              libpostal releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libpostal
            Get all kandi verified functions for this library.

            libpostal Key Features

            No Key Features are available at this moment for libpostal.

            libpostal Examples and Code Snippets

            No Code Snippets are available at this moment for libpostal.

            Community Discussions

            QUESTION

            Only get street and country from Libpostal (Pypostal) - PySpark
            Asked 2021-Mar-21 at 19:24

            I'm using libpostal - pypostal to parse an address but I only need the road and the country in an Array ["franklin ave","usa"],["leonard st","united kingdom"]

            How can I achieve this ?

            Return type is net.razorvine.pickle.objects.classdictconstructor

            ...

            ANSWER

            Answered 2021-Mar-19 at 13:52

            Maybe you can try a list comprehension before returning the parsed address:

            Source https://stackoverflow.com/questions/66709172

            QUESTION

            Dockerfile is not working properly when using WORKDIR command?
            Asked 2021-Feb-25 at 03:32

            Here's my Dockerfile that I want to use for one of my web-api using python fastapi, but whenever I try to built it, I am getting the below given error.

            ...

            ANSWER

            Answered 2021-Feb-25 at 03:32

            The default WORKDIR for your base image tiangolo/uvicorn-gunicorn:python3.8 is /app. I believe this is the Dockerfile for the base. When you cloned the repo, you were actually running it in /app.

            You can explicitly set WORKDIR / or specify WORKDIR /app/libpostal to successfully run the bootstrap script.

            You should also adjust your paths in the RUN commands after cloning since they should be relative. Here are the changes I suggest:

            Option 1

            Source https://stackoverflow.com/questions/66361507

            QUESTION

            How to identify address location from text string php with SmartyStreets US Extract API?
            Asked 2020-May-02 at 22:06

            I'm trying to identify and extract any input address location (Not limited to US - SmartyStreets) from a long string of text using php on my xampp.

            I've read several topics/libraries regarding on how to do this, which revolves around using NLP, Google's Geocoding API and regex to perform the above mentioned task. These 3 links are some plausible link that may help Link 1, Link 2, Link 3/GitHub Library(Seems Promising).

            However, I do not know whether these links may be of any help with the implementation? Can anyone help me with it?

            ...

            ANSWER

            Answered 2017-Feb-08 at 23:58

            That is the holy grail of address parsing, for sure. A few things to consider when attacking this project. First, each country can have their own particular addressing format. As much as it would be nice, there's no standard addressing format.

            Here are some good compilations of address formats, but even these don't always agree:

            Address formats by Informatica

            Address formats by Universal Postal Union

            Address formats by a guy who has spent a lot of time thinking about this kind of stuff

            Step 1 - Once you have become familiar with all the possible address formats for each country, you can group the formats that are similar and create a regex for each group.

            Step 2 - This is critical. Do everything you can to determine the country that the address might pertain to. This will let you know which regex to utilize. If you can't do this, you may end up with many different address candidates.

            Step 3 - Using your regex, scan through the source text to determine potential horizons, start and end points for an address. In the USA, addresses typically begin with a house number and end with a zipcode (5 or 9 or eleven digit). In Germany addresses typically begin with a street name and end with a city/state or postal code.

            Step 4 - Now scan through that address candidate to determine the various components of the address, based on your understanding of the formatting pattern for that country. Find the following components:

            • primary number
            • street pre-directional (helps to have an index of all the possible values)
            • street name (helps to have an index of all the possible values)
            • street suffix (helps to have an index of all the possible values)
            • street post-directional (helps to have an index of all the possible values)
            • secondary number designator (helps to have an index of all the possible values)
            • secondary number
            • city (helps to have an index of all the possible values)
            • state (helps to have an index of all the possible values)
            • postal code

            (there are a lot more, but that's a good start)

            Step 5 - If you only want to determine a string that looks like an address, you're done. Feed this string into a geocoding tool and get the lat/lon that corresponds to it. Google Maps or OpenStreetMap should be able to do the trick for you.

            If you want to know if an address is actually valid (as in matches a known entry in an authoritative dataset, like the local post office) then you'll need to use an address validation tool, like one that you'll find with a simple google search:

            Google Search: "address validation"

            Full disclosure: I spend a lot of time thinking about this very topic, trying to find different ways to solve it, and explaining it to a lot of people. I work international addresses all day long at SmartyStreets.

            Source https://stackoverflow.com/questions/41680019

            QUESTION

            Deploy jpostal/libpostal into EC2 instances
            Asked 2019-Aug-09 at 11:50

            I am trying to deploy jpostal artifacts into an EC2 instances so that our web application can use the library. As I understand, jni files in "scr/main/jniLibs" are linking to c libraries in "/usr/local/include/libpostal" and "/usr/local/lib/". However, I do not have permission to write "libpostal.h" into "/usr/local/include/libpostal" and "pkgconfig,libpostal.a,libpostal.la,libpostal.so,libpostal.so.1,libpostal.so.1.0.0" into "/usr/local/lib/" in the EC2 instances. Is there any solution for this?

            Thanks.

            ...

            ANSWER

            Answered 2018-Sep-11 at 07:08

            I managed to build and save all artefacts into a local folder, e.g. "/app/libpostal/" and then the deployment process is simply copying them to the same folder in a EC2 machine. The key thing is to use ./configure command to specify all the folders to store the artefacts and there is a tricky step where I use my own jpostal_build.sh instead of the default one:

            1. Custom "jpostal_build.sh" has 2 lines:

            Source https://stackoverflow.com/questions/50148509

            QUESTION

            Finding a regular-expression-like sequence of values in a Clojure vector
            Asked 2018-Jun-14 at 00:27

            I am using the libpostal library to find an full address (street, city, state, and postal code) within a news article. libpostal when given input text:

            There was an accident at 5 Main Street Boulder, CO 10566 -- which is at the corner of Wilson.

            returns a vector:

            ...

            ANSWER

            Answered 2018-Jun-14 at 00:27

            You could do this with clojure.spec. First define some specs that match your maps' :label values:

            Source https://stackoverflow.com/questions/50847946

            QUESTION

            C# bindings for a c++ library
            Asked 2017-Sep-10 at 22:49

            I've created a c# bindings for libpostal library (link to LibPostalNet).

            I've used CppSharp to create bindings. It works but I don't how to convert this code :

            ...

            ANSWER

            Answered 2017-Sep-10 at 22:49

            This is a bit complex as those is a pointer to a list of pointers of chars, something very similar to an array of strings.

            You need to iterate the pointers, retrieve the internal pointers and convert those to strings (I'm assuming you can use unmanaged code):

            Source https://stackoverflow.com/questions/46145428

            QUESTION

            How do I avoid the "unresolved external symbol _mainCRTStartup" error when using the MSVC toolchain (ex: CL.EXE) from within an MSYS environment?
            Asked 2017-Jul-14 at 16:11

            How do I avoid the unresolved external symbol _mainCRTStartup error when using the MSVC toolchain (ex: CL.EXE) from within an MSYS environment?

            Details:

            I started a "VS2013 x64 Native Tools Command Prompt" and the launched C:\msys64\msys2.exe from there.

            In my MSYS session I get results like this:

            ...

            ANSWER

            Answered 2017-Jul-14 at 16:11

            After checking everything in agonizing detail, I found the problem:

            When C:\msys64\msys2.exe is executed from the "VS2013 x64 Native Tools Command Prompt", the $PATH variable will end up containing /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin, but that is the wrong directory for 64-bit work. Instead the path should contain /c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64. Once I did that substitution, cl.exe worked fine.

            Running vcvars64.bat from within the MSYS environment will not fix the $PATH. The above substitution has to be done manually or from a custom startup script like ~/.bashrc.

            Source https://stackoverflow.com/questions/45044364

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install libpostal

            Before you install, make sure you have the following prerequisites:.
            For Windows the build procedure currently requires MSys2 and MinGW. This can be downloaded from http://msys2.org. Please follow the instructions on the MSys2 website for installation.

            Support

            Bug reports, issues and pull requests are welcome. Please read the contributing guide before submitting your issue, bug report, or pull request. Submit issues at: https://github.com/openvenues/libpostal/issues.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/openvenues/libpostal.git

          • CLI

            gh repo clone openvenues/libpostal

          • sshUrl

            git@github.com:openvenues/libpostal.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Natural Language Processing Libraries

            transformers

            by huggingface

            funNLP

            by fighting41love

            bert

            by google-research

            jieba

            by fxsjy

            Python

            by geekcomputers

            Try Top Libraries by openvenues

            pypostal

            by openvenuesC

            node-postal

            by openvenuesC++

            ruby_postal

            by openvenuesC

            php-postal

            by openvenuesC

            gopostal

            by openvenuesGo