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

Data Science Garage
Data Science Garage
1.3 هزار بار بازدید - پارسال - You can train state-of-the-art text
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: 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: huggingface.co/sentence-transformers/paraphrase-Mi… The Github repository with the full Python code for the tutorial is available here: github.com/vb100/spacy_text_classificator 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: turingcollege.org/DataScienceGarage ! --- 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
پارسال در تاریخ 1402/04/16 منتشر شده است.
1,310 بـار بازدید شده
... بیشتر