Skip to content

Toadoum/Text-Classification-using-Fully-Connected-Neural-Network

Repository files navigation

Problem understanding: Text Classification using Full Convolutional NN

In this toy project, we aim to build a deep learning clssifier that predicts whether a text is a positive or negetive review. In this project you will try to use NN, namely FC NNs, for the task of text classification. Here is what we did:

• We converted the text into vectors of numbers, using different ways for word repre- sentation that can used with FC NNs.

• We explained the different ways for sentence representation • Explain different ways to deal with sentences of different length (padding, truncating, etc). • Train a FC NN for text classification. We used PyTorch for training the network. • Analyze and describe the difficulties in training FC NNs on text data.

Refer to this link to get the data.

Open In Colab

Run the project

In this project, we have two steps: training and predicting. In the predict step, you can type a sentence as a review and predict it. Let's show you how to run the project.

If you do not have venv package, please refer to this link

Create virtual environment

$ python3 -m venv ENV_NAME

Activate your environment

$ source ENV_NAME/bin/activate

Requirement installations

To run this, make sure to install all the requirements by:

$ pip install -r requirements.txt 

Training the model

$ python3 main.py 

Results Presentation

BoW train result
caption

TF-IDF train result
caption

BoW predict result result
caption

TF-IDF predict result
caption

Make prediction

$python3 predict.py



Contributors

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors