← all repositories
yangheng95/PyABSA

ABSA without the acronym soup

A unified toolkit that turns aspect-based sentiment analysis from a pile of bespoke scripts into something you can actually ship.

1.1k stars Jupyter Notebook Language ModelsML Frameworks
PyABSA
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does PyABSA wraps the whole aspect-based sentiment analysis pipeline — extracting opinion targets, classifying their polarity, even pulling out (aspect, opinion, sentiment) triplets or quadruplets — behind a single Python API. It bundles pretrained multilingual checkpoints, auto-downloads what you need, and handles CPU/GPU switching without fuss.

The interesting bit The framework treats ABSA subtasks (APC, ATEPC, ASTE, ASQP/ACOS) as modular variants rather than separate codebases. That means the same predict()/batch_predict() pattern and checkpoint registry apply whether you’re just scoring sentiment on known aspects or extracting everything from raw text. For researchers, there’s a CIKM 2023 paper backing the design; for practitioners, there are Hugging Face demos to test drive before installing.

Key highlights

  • Unified API across training, evaluation, and inference for all supported ABSA tasks
  • Auto-resolving checkpoint registryavailable_checkpoints() lists local and remote models, downloads on demand
  • Built-in dataset enums (e.g., APC.APCDatasetList.Laptop14) for quick experiments without data wrangling
  • Human-in-the-loop annotation helpers and a companion dataset hub at ABSADatasets
  • Text augmentation and adversarial defense modules, though these require extra dependencies

Caveats

  • v2 broke backward compatibility; older scripts will need rewrites
  • Some advanced features (visualization, augmentation) aren’t in the base pip install
  • GPU is “optional” in the same way a kitchen knife is optional for dicing onions

Verdict Worth a look if you’re doing applied NLP research or production ABSA and tired of gluing together five different repos. Skip it if you just need generic sentiment scoring — this is overkill unless you care about which aspect of a product the opinion targets.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.