Catalog PyPI
Back to packageRELEASE DETAILS

26.2.2024

PyPI

abbrfix

Expand and collapse abbreviations commonly used in online communication

Published26 Feb 2024
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 26.2.2024 documentation

abbrfix

Library for expanding and collapsing abbreviations commonly used in online communication.

Installation

To install the library, use pip:

pip install abbrfix

Alternatively, install the latest directly from the GitHub repository:

pip install git+https://github.com/dsymbol/abbrfix.git

Usage

Expand

from abbrfix import expand_all, expand_one

# Example text with abbreviations
text = "I'll brb, gtg for lunch, ttyl!"

# Expand all abbreviations in the text
expanded_text = expand_all(text)
print(expanded_text)
# Output: "I'll be right back, got to go for lunch, talk to you later!"

# Expand a specific abbreviation
expanded_text = expand_one(text, "brb")
print(expanded_text)
# Output: "I'll be right back, gtg for lunch, ttyl!"

Collapse

from abbrfix import collapse_all, collapse_one

# Example text with expanded abbreviations
text = "I'll be right back, got to go for lunch, talk to you later!"

# Collapse all abbreviations in the text
collapsed_text = collapse_all(text)
print(collapsed_text)
# Output: "I'll brb, gtg for lunch, ttyl!"

# Collapse a specific full form
collapsed_text = collapse_one(text, "talk to you later")
print(collapsed_text)
# Output: "I'll be right back, got to go for lunch, ttyl!"

Update and Remove Abbreviations

from abbrfix import update_abbreviations, remove_abbreviations

# Update the abbreviations dictionary with more abbreviations
new_abbreviations = {"lol": "laughing out loud", "omg": "oh my god"}
update_abbreviations(new_abbreviations)

# Remove abbreviations from the dictionary
abbreviations_to_remove = ["brb", "gtg"]
remove_abbreviations(abbreviations_to_remove)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
abbrfix-26.2.2024-py3-none-any.whl

bdist_wheel · 4.57 KB · Python py3

Source file
abbrfix-26.2.2024.tar.gz

sdist · 3.99 KB · Python source

Source file

Repository

PENDING
dsymbol/abbrfix

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:11 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0b267d201b242f03fe9c3cdfb3db05a2386f74a38d1eedb1d1506fa6617367dc

Other collected versions

View all collected versions →