Skip to main content

Convert written-out numbers to digits in multiple languages using a fast Rust + Python binding.

Project description

text2num-py

Convert written out numbers (e.g. "duizendnegenhonderddrieënzeventig") into digits (1973) using a fast Rust + Python binding.

Based on: https://github.com/allo-media/text2num-rs

Works for the following languages:

  • Dutch ("nl")
  • English ("en")
  • French ("fr")
  • Spanish ("es")
  • German ("de")
  • Italian ("it)

Installation

pip install polytext2num

Usage

from polytext2num import text_to_number

print(text_to_number("duizendnegenhonderddrieënzeventig", "dutch"))    # → "1973"
print(text_to_number("one thousand nine hundred seventy-three", "en")) # → "1973"
print(text_to_number("quatre-vingt-dix", "french"))                    # → "90"

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

polytext2num-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

polytext2num-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

polytext2num-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

polytext2num-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

polytext2num-0.2.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

polytext2num-0.2.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (327.3 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file polytext2num-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e26fd76dddf0660ad4a28898e594b4c20d9a975c53ef3a56dab53861fbd9641
MD5 b188ff792a29d2e3ced9d5c14b6ed618
BLAKE2b-256 c59340e4d819b07c1649052c330eaf43fc71e2c6747c3610f2bede3efcabf17a

See more details on using hashes here.

File details

Details for the file polytext2num-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8924907338926f1c01187cdc0e307eb6f087f7a03e3855ba4e23412f2eff4565
MD5 025db554b012c890d07273f08af8f94d
BLAKE2b-256 12767488a9831088707a0b0c901331729c412edd0c225f09907c82047a2b2235

See more details on using hashes here.

File details

Details for the file polytext2num-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8397435865246e38e53b914a117c7b62184a27dbbbbe75e865d7b07355c34bba
MD5 3bed7ae8f7e80bd5421c6cf58d7cbd10
BLAKE2b-256 13bbc9aee15e6cdb286e782cec176cb8371a49e1a979af28488a4b6281123048

See more details on using hashes here.

File details

Details for the file polytext2num-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d847f715a8262efdc02d14f9a382f4ea3f882df574ce7cbfc3905018e359f7ad
MD5 51faad43be7fffe3428ee07ff022eb94
BLAKE2b-256 1953ff576f304f157de34f20df36df5b17fd211c390f2c8f330d2ac397d40ea2

See more details on using hashes here.

File details

Details for the file polytext2num-0.2.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07a026aba63414133c335c8ae38005f5ef0f1f8c3ab1d7c50a909857466282b9
MD5 73ee4f9b2ac65f80dbc496b2e5d5766c
BLAKE2b-256 66b3df4219ae3dc540142b7f69c1b4a7bb0dd990760c5f90e02f459a0c2a328d

See more details on using hashes here.

File details

Details for the file polytext2num-0.2.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polytext2num-0.2.17-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bce942c199bcb0cbc0c39994bb81a228670caa14fdecd76f9527127437cf919e
MD5 1ab9818674b9be0be394ecf306fcd9dd
BLAKE2b-256 5b83acc0fc8fd0a7fd1bb7a75ecdd210404d48b81d3ec8dc0e99dee0afdc6725

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