Skip to main content

This library converts German numbers written as text to integer and float values.

Project description

text2numde

This python package converts numbers written as text into float or integer values.

It can furthermore:

  • Validate a text to see if it represents a numbers
  • Replace numbers in sentences without modifying the sentence around the numbers.

Example usage

>>> from text2numde import text2num, is_number, sentence2num
>>> text2numde('Eins')
1

>>> text2num('Einhundertunddrei')
103

>>> text2numd'Vierzehnkommaachtneundrei')
14.893

>>> is_number('Einhundertunddrei')
True

>>> is_number('Zehnzehnhundert')
False

>>> sentence2num('Ich habe zwei Hunde und vierzig Vögel.')
Ich habe 2 Hunde und 40 gel.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

text2numde-1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

text2numde-1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file text2numde-1.0.tar.gz.

File metadata

  • Download URL: text2numde-1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for text2numde-1.0.tar.gz
Algorithm Hash digest
SHA256 0ff319cbc266548e24b02ffe0fde91e30c3b9b0280a850d947ed94f04bcac3a3
MD5 2b04f5c7788fe3e26e2ece1ddaae97ed
BLAKE2b-256 3657845c6e55803d262df413d7421997da9898db1a236506790516652a9cf3f1

See more details on using hashes here.

File details

Details for the file text2numde-1.0-py3-none-any.whl.

File metadata

  • Download URL: text2numde-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for text2numde-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da2eceacedbd1435d543257c5671a0ac666d69b2df9d919e4f86d9b3a6bd6b1c
MD5 43c0d83782b17e1628e9afd23cfb7e99
BLAKE2b-256 1d2c3e56b8d9f7adb31636236726c1e7820fe669709da3e7fc6b32930e651531

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