Skip to main content

A powerful dictionary for common internet and text slang (Lychee Language Core).

Project description

Lychee: Language Core Lychee is a lightweight Python package designed to quickly look up the meanings of common internet abbreviations, text slang, and acronyms in a case-insensitive manner. It is the core utility for cleaning and analyzing user-generated text.

Installation pip install lychee

Lychee Core Features (SlangDictionary Class) The core SlangDictionary class provides robust lookups and replacement functionality:

Method

Description

Example

replace_slang_in_text()

Crucial for Data Cleaning. Replaces all recognized slang terms in a string with their full meanings.

slang.replace_slang_in_text(text)

get_meaning()

Finds the meaning of a given slang term (case-insensitive).

slang.get_meaning('BRB')

reverse_lookup()

Finds slang terms based on a keyword in the meaning.

slang.reverse_lookup('laugh')

search_slang()

Searches terms or meanings containing a specific keyword.

slang.search_slang('friend')

Quick Start: Slang Replacement You can easily apply this function to a single string or a pandas Series/Column.

from lychee import SlangDictionary

Initialize the Lychee Core Slang Dictionary

slang_lookup = SlangDictionary()

input_text = "TBH, the new game slaps! I'm AFK now, BRB. No cap, it was fire."

Clean the text using the replacement function

cleaned_text = slang_lookup.replace_slang_in_text(input_text)

print(cleaned_text)

Output: To be honest, the new game Describing something as good (e.g. This song slaps)! I'm Away from keyboard now, Be right back. No lie, it was A word to describe something positive (e.g. That game is fire).

Upcoming Text Processing Utilities (Future Release) The TextCleaner class is a structural placeholder for future feature development, including:

to_lowercase()

remove_html_tags()

remove_urls()

remove_punctuation()

Contributing We welcome contributions! Feel free to fork the repository on GitHub and submit a pull request.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

him_lychee-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file him_lychee-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: him_lychee-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for him_lychee-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d487f138c342a9762b7251f225147ff3dc95de6e7eb155eac9dc9afce0e6625a
MD5 636d490f8597a5180204073a560336f1
BLAKE2b-256 2c4f496d5f8c261b0aceb4b280b8c18dbcbebc41426146b0b72bc62797feb3a2

See more details on using hashes here.

Supported by

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