Skip to content

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

License

Notifications You must be signed in to change notification settings

prajwalkhairnar/abbreviations_py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Click here for the documentation.

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages