Skip to main content

english-text-normalization

PyPI PyPI MIT PyPI PyPI PyPI DOI

Command-line interface (CLI) and library to normalize English texts.

Installation

pip install english-text-normalization --user

Usage as CLI

# Show supported normalizing operations
norm-eng-cli list-operations -h

# Normalize
norm-eng-cli normalize -h

Usage as a library

from english_text_normalization import *

Development setup

# update
sudo apt update
# install Python 3.8, 3.9, 3.10, 3.11 & 3.12 for ensuring that tests can be run
sudo apt install python3-pip \
  python3.8 python3.8-dev python3.8-distutils python3.8-venv \
  python3.9 python3.9-dev python3.9-distutils python3.9-venv \
  python3.10 python3.10-dev python3.10-distutils python3.10-venv \
  python3.11 python3.11-dev python3.11-distutils python3.11-venv \
  python3.12 python3.12-dev python3.12-distutils python3.12-venv
# install pipenv for creation of virtual environments
python3.8 -m pip install pipenv --user

# check out repo
git clone https://github.com/jasminsternkopf/english_text_normalization.git
cd english_text_normalization
# create virtual environment
python3.8 -m pipenv install --dev

Running the tests

# first install the tool like in "Development setup"
# then, navigate into the directory of the repo (if not already done)
cd english_text_normalization
# activate environment
python3.8 -m pipenv shell
# run tests
tox

Final lines of test result output:

  py38: commands succeeded
  py39: commands succeeded
  py310: commands succeeded
  py311: commands succeeded
  py312: commands succeeded
  congratulations :)

License

MIT License

Acknowledgments

Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410

Citation

If you want to cite this repo, you can use this BibTeX-entry generated by GitHub (see About => Cite this repository).

Sternkopf, J. and Taubert, S. (2024). english-text-normalization (Version 0.0.3) [Computer software]. https://doi.org/10.5281/zenodo.10555229

Release files for english-text-normalization 0.0.3

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

Source distribution (sdist)

Source distribution for english-text-normalization 0.0.3
File Size Uploaded
english-text-normalization-0.0.3.tar.gz 38.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for english-text-normalization 0.0.3
File Interpreter ABI Platform
english_text_normalization-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 91.3 kB

Release files / english-text-normalization-0.0.3.tar.gz

Download URL english-text-normalization-0.0.3.tar.gz
Size 38.8 kB
Tags Source
SHA-256 checksum
How to use checksums
47cf843b4baa125553c3675b5f0f3fec83984470dc75b6274245e60d6d916a79
BLAKE2b-256 checksum
How to use checksums
7cbc5337d0580795f81391769cbb2f151d735c7f00e14d9978a70c4d5ee00cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.18

Release files / english_text_normalization-0.0.3-py3-none-any.whl

Download URL english_text_normalization-0.0.3-py3-none-any.whl
Size 52.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e445b2905701da33962a1d8a6b724502ea5b30f241ca02e8a00815881b3af1e4
BLAKE2b-256 checksum
How to use checksums
d13ba241e0271f7017ce7c7c35a8c7f1ab4478dd6ebdfd04e89db74dae84a8e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

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