Uniquely abbreviate a set of names in a language-appropriate way.
Project description
abbreviate-names
Uniquely abbreviate a set of names in a language-appropriate way. The original intent was to shorten a collection of Latin species names such that they would fit more nicely into tables and graphs, but other applications abound!
This packages provides both
- a programmatic API,
names.abbreviate.abbreviate()
and - a command line tool,
abbreviate-names
.
If installed with English or Latin options it also includes dependencies on natural language modules which enable it to break names up at syllable boundaries, which produces more readable results:
pip install 'abbreviate-names[Latin,English]'
Example output
Species | Abbreviation using Latin syllables | .. or by character |
---|---|---|
Agathidium laevigatum | Agat.lae. | A.l. |
Agathidium nigrinum | Agat.nigrinum | A.nigrin. |
Agathidium nigripenne | Agat.nigripen. | A.nigrip. |
Agathidium seminulum | Agat.se. | A.s. |
Agonum ericeti | Ago.e. | A.e. |
Agonum fuliginosum | Ago.fu. | A.f. |
Agonum gracile | Ago.gra. | A.g. |
Lithocharis sp. | Lit.sp. | L.sp. |
Xylocleptes bispinus | Xy.bis. | X.b. |
Xylodromus concinnus | Xy.con. | X.c. |
Xylodromus depressus | Xy.de. | X.d. |
Xylostiba monilicornis | Xy.mo. | X.m. |
Zeugophora subspinosa | Zeu.sub. | Z.s. |
Observe:
- Several different words above are all shortened to “Xy.” or “X.” — it's the whole abbreviation that's unique, not the individual words.
- The already-abbreviated “sp.” is untouched.
Online
- GitHub: https://github.com/ConradHughes/abbreviate-names
- PyPI: https://pypi.org/project/abbreviate-names/
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.1.2] - 2020-08-31
Added
- Initial version by @ConradHughes, including
- library function,
- command line script,
- support for Latin and English.
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
Built Distribution
File details
Details for the file abbreviate-names-0.1.2.tar.gz
.
File metadata
- Download URL: abbreviate-names-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 778a58f4c1e0942dc3f04eb435bcc2fd23bc73e012f3cf8889a40f5ab248361e |
|
MD5 | a1f0bb37efd67647e9a835e80e3bb177 |
|
BLAKE2b-256 | 9ebf34d14f1a3b78decec9e65ac5c87d2647d8e1109fa2045ec15d5dfa2b87cf |
File details
Details for the file abbreviate_names-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: abbreviate_names-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.47.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0679b9c1eae4288505255d0cf71e3e59b8b0861c97db66aa8eb8a1c169d618f5 |
|
MD5 | d653cd91bb6a73a161a0de69e4fcfe95 |
|
BLAKE2b-256 | 9d115f9394ac025aa962c3120760a9582ce8ea9c0a6bb11c73525760a9df3bd0 |