Git Product home page Git Product logo

rust-postal's People

Contributors

johnallen3d avatar pnordahl avatar schmidek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rust-postal's Issues

Nim port?

Do you think it would be easy to do a c2nim wrapping (similar to bindgen) and expose libpostal to Nim?

Implement Send for ExpandAddressOptions

Hi, I'm trying to use this in a async_graphql context, however I can't use expand_address at all because it expects all structs to implement Send:

future cannot be sent between threads safely
within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `*mut *mut i8`

I was able to share the postal context using an Arc<Mutex<>>, but it's not possibleto do the same for the options. Could you have a look at it?

Unable to pass multiple language codes to expand_address

When using the expand_address binding I am unable to pass more than one language code to the ExpandAddressOptions. I can pass a slice with only one language in it, but as soon as I pass a second value I get a segfault.

See example code here, which yields the following results:

Testing:
Address: "Foo Str"
Language(s): ["en"]
Results: ["foo street", "foo strata unit"]
Testing:
Address: "Foo Str"
Language(s): ["de"]
Results: ["foo strasse"]
Testing:
Address: "Foo Str"
Language(s): ["de", "en"]
[1]    20143 segmentation fault  cargo run

Expected result (using PyPostal):

In [1]: from postal.expand import expand_address

In [2]: expand_address("Foo Str", languages=["en"])
Out[2]: ['foo street', 'foo strata unit']

In [3]: expand_address("Foo Str", languages=["de"])
Out[3]: ['foo strasse']

In [4]: expand_address("Foo Str", languages=["de", "en"])
Out[4]: ['foo strasse', 'foo street', 'foo strata unit']

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.