Skip to main content

iso4

Implementation of ISO 4 (Rules for the abbreviation of title words and titles of publications) / CIEPS LTWA (ISSN International Centre's List of Title Word Abbreviations) as a Python library.

Usage

>>> from iso4 import abbreviate

>>> abbreviate("Recent Advances in Studies on Cardiac Structure and Metabolism")
'Recent Adv. Stud. Card. Struct. Metab.'

>>> abbreviate("Journal of the American Academy of Dermatology", periods=False)
'J Am Acad Dermatol'

>>> abbreviate("Real Living with Multiple Sclerosis")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  ...
Exception: Ambiguous word in title: real; must disambiguate between langs: eng, fre, spa

>>> abbreviate("Real Living with Multiple Sclerosis", disambiguation_langs=['eng'])
'Real Living Mult. Scler.'

>>> abbreviate("Anales de la Real Academia de Farmacia", True, ['spa'])
'An. R. Acad. Farm.'

VIM Plugin

A VIM plugin allows to abbreviate names directly from inside vim.

Install with Vundle

The easiest way to install the plugin is via a vim plugin manager. I use vundle Then, just add the following to your .vimrc file.

Plugin  'adlpr/iso4'

Then run :PluginInstall from within VIM.

Use

The following command will change the current line to its abbreviation

:ISO4

The command can also be used in visual mode.

Notes

  • Potential future improvements:
    • stricter treatment of language in general
    • better fuzzy matching with diacritics
    • conversion from non-Latin scripts
  • Consider this function fairly hacky as is; do not expect 100% accuracy!

Metadata

Release files for iso4 0.0.2

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

Source distribution (sdist)

Source distribution for iso4 0.0.2
File Size Uploaded Provenance
iso4-0.0.2.tar.gz 886.5 kB Without provenance Details

Release files / iso4-0.0.2.tar.gz

Download URL iso4-0.0.2.tar.gz
Size 886.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2d2563b117cf1fc2232f91f504ccb94a9e9fe240c70f1de252c84bb8847aef95
BLAKE2b-256 checksum
How to use checksums
a1a9d0b729ba8817496e5a09a1bd1ed7d65c7f8eec18d3e4b68381417e51c1cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.7

Security for iso4 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

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