A lightweight Python module for converting named entities and capitalized phrases into acronyms using natural language processing and regular expressions.
This tool helps standardize and compress text by replacing proper names and formal phrases with acronyms. It's useful for:
- Text summarization
- Preprocessing for NLP tasks
- Creating anonymized or encoded corpora
- Named Entity Recognition via spaCy
- Regex-based detection of capitalized phrases
- Chainable transformations (NER β Capital Phrases)
- Simple integration with file processing
- Detect named entities like Barack Obama or New York.
- Convert them into acronyms:
BO,NY. - Detect multi-word capitalized phrases: Artificial Intelligence System β
AIS. - Output the transformed text.
python acronymizer.py