stephenhky/PyShortTextCategorization
Various Algorithms for Short Text Mining
What it solves
Short texts carry too few words to classify directly. This package provides intermediate representations—topic models, word embeddings, and similar—so that classification algorithms can work with them effectively, supporting both supervised and unsupervised approaches.
How it works
The package offers a pipeline: text preprocessing, then building representations using gensim topic models (LDA, LSI, Random Projections), autoencoders, or pre-trained word embeddings. On top of those, it supplies classifiers including cosine distance, neural networks (ConvNet, C-LSTM), and maximum entropy. It also includes metrics for phrase similarity (soft Jaccard, Word Mover's distance) and character-level sequence-to-sequence learning for spell correction.
Who it’s for
Developers and researchers who need to categorize short text—for example, subject keywords or NIH RePORT data (example datasets are included). It's aimed at those working on text classification where the input length is limited.
Highlights
- Provides text preprocessing and example data.
- Supports pre-trained word-embedding models.
- Integrates gensim topic models and scikit-learn classifiers.
- Includes multiple classification algorithms: cosine distance, ConvNet, C-LSTM, maximum entropy.
- Offers phrase similarity metrics (soft Jaccard score, Word Mover's distance).
- Implements character-level seq2seq learning and spell correction.
- Runs on Python 3.11, 3.12, and 3.13.
Related
- Project
- Project
- Project
- Project
- Project