Persian sentiment analysis (polarity) for short user-generated text, trained on the SnappFood review corpus. A hashed-bigram linear textcat with no vectors and no transformer: 85.92 macro F on the held-out test split at 7,868 docs/second on an i5-7200U (2 cores). Fine-tuned ParsBERT scores 87.31 on the same split at 229 docs/second on a Tesla T4, so this model gives up 1.4 F for a 34x throughput gain and no GPU requirement. Labels: HAPPY, SAD.

Feature Description
Name fa_persian_sentiment_snappfood_bow
Version 0.1.0
spaCy >=3.8.14,<3.9.0
Default Pipeline textcat
Components textcat
Vectors 0 keys, 0 unique vectors (0 dimensions)
Sources SnappFood sentiment corpus (Farahani et al. (ParsBERT), via ParsiAI)
License MIT
Author Fazel

Label Scheme

View label scheme (2 labels for 1 components)
Component Labels
textcat HAPPY, SAD

Accuracy

Type Score
CATS_SCORE 86.08
CATS_MICRO_P 86.12
CATS_MICRO_R 86.12
CATS_MICRO_F 86.12
CATS_MACRO_P 86.61
CATS_MACRO_R 86.16
CATS_MACRO_F 86.08
CATS_MACRO_AUC 92.64
TEXTCAT_LOSS 4219.38

Trained from configs/textcat_bow.cfg. No vectors are bundled, so the wheel is ~2 MB and inference is pure CPU. Tokenisation is spaCy's blank Persian tokenizer with no normalisation, which is deliberate: hashed bigrams absorb ZWNJ and elongation variants as distinct features rather than collapsing them.

Downloads last month
12
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Phazel/persian-sentiment-analysis-snappfood-bow

Evaluation results