A multiclass classification of comments with 6 possible labels.
- "severe_toxic"
- "obscene"
- "threat"
- "insult"
- "identity_hate"
- "toxic"
A comment classification has been done using CNN model. 1DConvnet is used for text classification.
A comment classification has been done using LSTM model. I used simple LSTM and Bidirectional LSTM for the good results
This work has two parts. One is Encoder and the other is Decoder
Encoder is doing the job of learning the vocabulary of language. Word Embedding of GLOVE is used. And it's hidden states is also saved in the model. These hidden states further used in decoder model.
It just translate the input using the hidden states of Encoder. Hidden states takes the previous memory of the input sequence which help to predict the translation.
https://github.com/umairiqbal78/Deep-learning-Projects/blob/main/seq2seq_urdu2eng_trans_LSTM.ipynb
This Attention techniques includes a special technique of gathering a context of a sentence like a human. It includes following steps.
- Inputs are passed through the BiDirectional LSTM.
- Hidden states are collected from inputs and concatenate them.
- Those passed through Neural Network.
- Output from Neural Network passed through from activation function and get weight (alpha).
- All alphas are dotted to weight sum of hidden states.
- N alphas from N inputs are combine and form a context of input.
- Which is further passed through decoder to get the Output.
https://github.com/umairiqbal78/Deep-learning-Projects/blob/main/attention_LSTM.ipynb
This LSTM model is trained on poetry dataset. From the dataset model learn the pattern and structure of sentences. Which is used for predicting the poetry by hte model.
https://github.com/umairiqbal78/Deep-learning-Projects/blob/main/poetry_LSTM.ipynb
https://github.com/lazyprogrammer/machine_learning_examples
An online cource I followed for the all above projects is Deep Learning: Advanced NLP and RNNs
https://deeplearningcourses.com/c/deep-learning-advanced-nlp