Few shot learning is common in Computer Vision, and I wondered how effective it would be to take a common CV algorithm and apply it to text classification.
In this repo I've converted Prototypical Networks for use in NLP.
git clone https://github.com/E-Renshaw/few-shot-text.git
- change the sentence variables to be your sentences
python3 main.py
We evaluate using the Multi-Domain Sentiment Dataset.
With 5 examples the algorithm gets 75.11% accuracy.