Build Custom Text Classification Model with Only Few Sample | Spacy and Setfit

Опубликовано: 07 Июль 2023
на канале: Data Science Garage
1,414
28

You can train state-of-the-art text classification models with only a few samples straight in SpaCy now. Together with Spacy SetFit which is a new few-shot text classification library you can do that very easily just by following steps in this hands-on tutorial.

The combination of Spacy and Setfit allows you to add your small training set (few text samples) that will be used for fine tune the base Spacy model. For example, as in this tutorial, the new text will be classified to two classes: inlier and outlier.

As a base NLP model, we use Universal English Language model (small version), which is named as en_core_web_sm. You can read more on this here: https://spacy.io/models/en

Also, we use sentence-transformers model released by HuggingFace: paraphrase-MiniLM-L3-v2, which maps our text into tokens. You can find more information on this from here: https://huggingface.co/sentence-trans...

The Github repository with the full Python code for the tutorial is available here: https://github.com/vb100/spacy_text_c...

Subscribe the ‪@DataScienceGarage‬ channel to get more high quality tutorials, reviews and explainable videos!

- -
If you want to change you career and became advanced data analytic or data scientist, check this awesome Turing College!
Meet industry leaders and take your role in the job market with heavy baggage of you skills!
Visit: https://turingcollege.org/DataScience... !

---
The content of the tutorial:
0:00 - Intro
0:27 - Install Spacy and Spacy Setfit
1:00 - Install en_core_web_sm
1:33 - Setup a Python file to implement text classification
6:16 - Test the fine-tuned NLP model on test data
7:41 - Bonus: Github repository and the best data science school

#nlp #python #setfit #spacy #textclassification


Смотрите видео Build Custom Text Classification Model with Only Few Sample | Spacy and Setfit онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Data Science Garage 07 Июль 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,414 раз и оно понравилось 28 людям.