skillfed

contractions

Fixes contractions such as `you're` to you `are`

contractions v0.1.73 588.2K downloads/30d#5,869 on PyPI318
Permissive license MIT Abandoned released

What it is and what it does

Contractions is a text preprocessing library that converts English contractions and informal speech patterns into their expanded forms. It handles common cases like "you're" → "you are" and "gotta" → "got to", and resolves ambiguous cases by choosing the most common interpretation (e.g., "he's" becomes "he is" rather than "he has"). The package includes a slang mode (enabled by default) that expands informal patterns like "ima" and "yall", and allows users to register custom expansion rules.

The library depends on textsearch for pattern matching and is distributed as a pure Python wheel with low installation friction. It targets NLP preprocessing workflows where normalized text is needed for downstream analysis or model training. The package is no longer actively maintained, with the last release on 2022-11-15.

Use it for:

  • Normalize user-generated text before feeding it to NLP models or text classifiers
  • Preprocess social media or chat data where contractions and slang are common
  • Expand contractions in customer service transcripts for consistent text analysis
  • Prepare training data for language models by standardizing contraction forms
  • Add domain-specific contraction rules for specialized text processing pipelines

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Expands English contractions and slang into their full forms (e.g., "you're" → "you are", "ima" → "I am going to"), with support for custom additions.

Yes, if you need lightweight contraction expansion and can accept an abandoned package. The library is simple, has no known vulnerabilities, and low install friction. However, verify that textsearch remains compatible with your Python version, and consider whether the lack of maintenance poses a risk for your use case—bug fixes or Python version updates will not be forthcoming.

Install

contractions on PyPI

pip

pip install contractions

uv

uv add contractions

poetry

poetry add contractions

Installing contractions

Before you install

Low friction: pure Python wheel with a single runtime dependency. However, the package is abandoned—last commit was 2022-11-15. The description notes versions >0.0.18 are 50x faster, suggesting older releases had performance issues; verify you have a recent enough version.

License in practice

MIT license is permissive and imposes no restrictions on use, modification, or distribution in your own projects.

Quickstart

pip install contractions

import contractions
result = contractions.fix("you're happy now")
print(result)  # "you are happy now"

Verify before relying

  • Whether the runtime dependency textsearch is actively maintained and compatible with current Python versions
  • Whether the 50x performance improvement claim in the description applies to version 0.1.73 specifically
  • Python version compatibility given the package targets Python 2.7 and 3.4-3.6 but has not been updated since 2022-11-15

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — textsearch
Maintenance abandoned — 1,368 days since the last release
Last repo commit
First released
Downloads 588,160/month — #5,869 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: contractions-0.1.73-py2.py3-none-any.whl

Intended Audience :: Customer ServiceIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating System :: MacOS :: MacOS XOperating System :: MicrosoftOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Software DistributionTopic :: System :: Systems AdministrationTopic :: Utilities

Tags

expand contractionscontraction resolvertext preprocessingnlp text normalizationslang expansioncontraction fixenglish text expansion
text-preprocessingnlpabandoned

More Software Development packages