Metadata-Version: 2.1
Name: english-text-normalization
Version: 0.0.3
Summary: Command-line interface (CLI) and library to normalize English texts.
Author-email: Jasmin Sternkopf <jasmin.sternkopf@mathematik.tu-chemnitz.de>, Stefan Taubert <pypi@stefantaubert.com>
Maintainer-email: Stefan Taubert <pypi@stefantaubert.com>
License: MIT
Project-URL: Homepage, https://github.com/jasminsternkopf/english_text_normalization
Project-URL: Issues, https://github.com/jasminsternkopf/english_text_normalization/issues
Keywords: Text-to-speech,Speech synthesis,Regex,Language,Linguistics
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Operating System :: OS Independent
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Requires-Python: <3.13,>=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyenchant
Requires-Dist: nltk
Requires-Dist: inflect
Requires-Dist: unidecode

# english-text-normalization

[![PyPI](https://img.shields.io/pypi/v/english-text-normalization.svg)](https://pypi.python.org/pypi/english-text-normalization)
[![PyPI](https://img.shields.io/pypi/pyversions/english-text-normalization.svg)](https://pypi.python.org/pypi/english-text-normalization)
[![MIT](https://img.shields.io/github/license/jasminsternkopf/english_text_normalization.svg)](https://github.com/jasminsternkopf/english_text_normalization/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/wheel/english-text-normalization.svg)](https://pypi.python.org/pypi/english-text-normalization/#files)
![PyPI](https://img.shields.io/pypi/implementation/english-text-normalization.svg)
[![PyPI](https://img.shields.io/github/commits-since/jasminsternkopf/english_text_normalization/latest/main.svg)](https://github.com/jasminsternkopf/english_text_normalization/compare/v0.0.3...main)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10555229.svg)](https://doi.org/10.5281/zenodo.10555229)

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

## Installation

```sh
pip install english-text-normalization --user
```

## Usage as CLI

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

# Normalize
norm-eng-cli normalize -h
```

## Usage as a library

```py
from english_text_normalization import *
```

## Development setup

```sh
# 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

```sh
# 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:

```log
  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*).

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