Skip to main content

A lightweight utility for preprocessing and cleaning social media text (slang, emojis, hashtags, etc.).

Project description

SocialPreText

A simple, lightweight Python utility for preprocessing and cleaning social media text.

socialpretext cleans raw text by expanding slang, expanding contractions, removing emojis, URLs, hashtags, and more, making it ready for NLP models and analysis.

Features

  • Expand common slang (e.g., idk -> I do not know)
  • Expand English contractions (e.g., don't -> do not)
  • Remove or "demojize" emojis (e.g., 😊 -> :smiling_face:)
  • Remove URLs
  • Remove user mentions (@mentions)
  • Remove hashtags (#hashtags)
  • Normalize whitespace

Installation

pip install socialpretext

Project details


Download files

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

Source Distribution

socialpretext-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

socialpretext-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file socialpretext-0.1.0.tar.gz.

File metadata

  • Download URL: socialpretext-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for socialpretext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22d655a16e441eccd5dcad20cf3d8bb00a7e0614f2c27efeb291d9dd4e31f8d0
MD5 2118b11617f4915603ffd27b34669755
BLAKE2b-256 b480d497e9cc2f41bc2b3900bd85b0ae18979baefdd50e433a8d4b28117af424

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for socialpretext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac2509b67f7eeacf299519a72ab9ca13795d6cf649d200f2137ae951c73fc5a6
MD5 49bf93b5795008b5ffda0eb49d26a513
BLAKE2b-256 9fb86b0c77408b4bbf0ee0e534455db04a79017d102fe269c5ed6ae51221b3e8

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