Skip to main content

bonjour

[!CAUTION]

Work in progress, first usable version hasn't landed yet!

Experimental crate to extract first names with a confidence level.

Expected output may be something like this:

{
  "input": "Quentin Richert",
  "first_name": "Quentin",
  "confidence": 0.95,
  "gender": "male",
  "country": "FR"
}

The idea is that is also "detects", or at lease significantly reduces confidences in company names, for instance:

// The company marker 'SAS' significantly reduces confidence.
{
  "input": "Quentin Richert SAS",
  "first_name": "Quentin",
  "confidence": 0.1,
  "gender": "male",
  "country": "FR"
}

Up to no detection at all:

{
  "input": "Les Motards d'Alsace",
  "first_name": null,
  "confidence": 0.0,
  "gender": null,
  "country": null
}

Country and gender hints

Gender is not a property of a name alone — Simone is female in France, male in Italy. Pass the user's country and/or gender as hints and they resolve each other: a country pins the gender, a gender pins the country.

$ bonjour --country=IT Simone Veil
{
  "input": "Simone Veil",
  "first_name": "Simone",
  "confidence": 0.65,
  "gender": "male",
  "country": "IT"
}

$ bonjour --country=FR Simone Veil
{
  "input": "Simone Veil",
  "first_name": "Simone",
  "confidence": 0.7,
  "gender": "female",
  "country": "FR"
}

With no hint and a name whose gender differs by country, gender is left null rather than guessed:

{
  "input": "Simone",
  "first_name": "Simone",
  "confidence": 0.7,
  "gender": null,
  "country": "FR"
}

License

The source code is available under the 0BSD license.

Datasets distributed with or used to build this project are compiled from publicly available information. They are not covered by the 0BSD license; their contents remain subject to any applicable rights and source terms.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjour-0.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyjour-0.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file pyjour-0.0.0.tar.gz.

File metadata

  • Download URL: pyjour-0.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyjour-0.0.0.tar.gz
Algorithm Hash digest
SHA256 f6e3718df473baecd8031e3d7a2504a35b80adc6dea46f0fad0fb8f1b510c71a
MD5 d29c73c8bc48ad2ebc296b57c5bccbce
BLAKE2b-256 a93ad20fff9818f0bb46683c9faa55f3755e9db22373e5035b45677b5e3c0d60

See more details on using hashes here.

File details

Details for the file pyjour-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyjour-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyjour-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ccf9d393bfe5656f171a8caff5c4ac9f640c1e685ed7ca2d575d70f0c85b6e
MD5 0ee04de7302f51493431b512a4daabab
BLAKE2b-256 799369402faddbdcf0925913fb4e9befb4ef961cc71ddfbeb40e2c30ebfc0947

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page