Skip to main content

word2num-de

EN

  • Transforms written numbers in German to numbers.
  • Works for numbers 0-999999

DE

  • Übersetzt ausgeschriebene Zahlen in (auf Deutsch) in Zahlen
  • Unterstützt Zahlen zwischen 0 und 999999.

Implementation based on the following project: https://github.com/IBM/wort-to-number

Installation

Package can be installed using pip.

pip install word2num-de

Usage example

Import the main function word_to_number.

from word2num_de import word_to_number

Given a written-out number, the function returns the number as an integer.

print(word_to_number("sechshunderteinundzwanzig"))
621

Larger numbers are also supported.

print(word_to_number("zweiunddreißigtausendfünfhundertachtundvierzig"))
32548

None is returned in case the word is not a number.

print(word_to_number("bäckerei"))
None

The function should also be robust to words including numbers in them (e.g.; Viereck, Servieren, Tausendsassa, etc.).

print(word_to_number("tausendsassa"))
None

Metadata

Release files for word2num-de 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for word2num-de 1.1
File Size Uploaded
word2num_de-1.1.tar.gz 2.7 kB Details

Release files / word2num_de-1.1.tar.gz

Download URL word2num_de-1.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
41c6808fcf505b15123953278e6eecd216010506b9fd1777cd3d8c34989d3a40
BLAKE2b-256 checksum
How to use checksums
86fafcfa49759572f219f382b2b5ed23ae5d1249eebe21db3967a8596fcb6a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page