Text Classification using spaCy 2.0 in Python #nlp #tutorial

preview_player
Показать описание
Text Classification using spaCy in Python | Natural Language Processing Tutorial | #NLProc
In this video I will be explaining how you can perform text classification with spaCy library in Python.
We would perform text classification using spaCy on tweet data to classify tweets as "positive", "negative" or "neutral"

If you are new here and like such content please subscribe to the channel here:

If you like to support me financially, It is totally optional and voluntary.

Chapters/Timestamps :
00:00 Text Classification using spaCy in Python - Natural Language Processing Tutorial
00:26 spaCy
00:58 Dataset description
02:30 Pre-processing methods
02:38 Converting training data to spaCy training format
04:51 Model Evaluation Method
06:06 Train a spaCy text classification model
11:58 Training spaCy text classification models
15:08 Testing spaCy text classification models

spaCy
Рекомендации по теме
Комментарии
Автор

Hi, This is very helpful! Thank you! When I tried your code, and ran "nlp = train_spacy(training_data, 10, test_texts, test_cats, "bow")", I got ConfigValidationError:

15 # nlp.create_pipe works for built-ins that are registered with spaCy

16 if "textcat" not in nlp.pipe_names:
---> 17 textcat = nlp.add_pipe(
18 "textcat", config={"exclusive_classes": True, "architecture": model_arch}
19 )




Config validation error

textcat -> architecture extra fields not permitted
textcat -> exclusive_classes extra fields not permitted

Could you tell me what's going on here and/or point me to any relevant documentation? Thank you!

wujiunshiung
Автор

Hope you find this video useful!! There is an error at 14:06 . I have misspelt "ensemble" for the model architecture parameter. Even after correcting this i am getting similar results. It could be due to the fact that default architecture for text categorizer in spaCy is "ensemble" as per official documentation. Would be more careful in my future videos. Thanks to @Malik Rumi for pointing out this error. Have also updated the code on github

RitheshSreenivasan
Автор

Thanks for the Amazing guide, sir. Sir, please make a video on how to use a Spacy transformer for text classification/ NER.

dv
Автор

Sir, how can I access mimic or i2b2 dataset .

rehabemadel-dein
Автор

Why did you remove the emojis instead of teaching them as 'words' or 'tokens' based on their unicode character equivalents? These would then be powerful indicators of sentiment, wouldn't they?!

malikrumi