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 Vögel.
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ff319cbc266548e24b02ffe0fde91e30c3b9b0280a850d947ed94f04bcac3a3
|
|
| MD5 |
2b04f5c7788fe3e26e2ece1ddaae97ed
|
|
| BLAKE2b-256 |
3657845c6e55803d262df413d7421997da9898db1a236506790516652a9cf3f1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da2eceacedbd1435d543257c5671a0ac666d69b2df9d919e4f86d9b3a6bd6b1c
|
|
| MD5 |
43c0d83782b17e1628e9afd23cfb7e99
|
|
| BLAKE2b-256 |
1d2c3e56b8d9f7adb31636236726c1e7820fe669709da3e7fc6b32930e651531
|