Skip to main content

A simple package to replace abbreviations/contractions by full forms. Also works with slangs like b4 (before)

Project description

abbreviations_py

abbreviations_py is a Python package that provides a convenient way to abbreviate and normalize text. It offers functionality to clean text by replacing common abbreviations with their full forms, removing punctuations and hashtags.

Installation

You can install abbreviations_py using pip:

pip install abbreviations-py

Usage

from abbreviations_py.textes.abbreviator import fix, update_abbreviations

# Fix abbreviated text
input_text = "I'll txt you when you're back, ttyl! #BonVoyage"
result = fix(input_text)
print(result)
# Output: I will text you when you are back talk to you later

# Update abbreviation mappings
new_mappings = {
    "ttyl": "talk to you later",
    "txt": "text",
    # Add more mappings here
}

update_abbreviations(new_mappings)

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.


Created by Prajwal Khairnar

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abbreviations_py-0.2.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file abbreviations_py-0.2.tar.gz.

File metadata

  • Download URL: abbreviations_py-0.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.5

File hashes

Hashes for abbreviations_py-0.2.tar.gz
Algorithm Hash digest
SHA256 5011e891868cab8c96b4364f911494fe77b5cf552793732f3a0978e8d145e9b0
MD5 fec4f307f92a9112af9f35706bc686bc
BLAKE2b-256 fd52d7835446a1755940c35d6df0d12ccaea42ca6dd0a08782fa07e102df3bd9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page