This project is a sentiment analysis AI built from scratch in Python, without using any AI library. It is built using object-oriented programming (OOP), Layers, and RNN base with GRU and LSTM.
The sentiment analysis AI is a machine learning model that takes text data as input and predicts the sentiment of the text. The AI is built using object-oriented programming (OOP), Layers, and RNN base with GRU and LSTM.
The model is trained on a large dataset of labeled text data that includes a variety of feelings such as happiness, sadness, anger, and more. During training, the model learns to predict the specific feeling conveyed by the text, instead of just positive, negative, or neutral sentiment.
The processed data is then fed into the model for training. During training, the model's parameters are saved and can be loaded for future use. The training progress is also tracked using the Weights and Biases website to monitor the model's performance and improve its accuracy.
- Sentiment analysis of text data to predict specific feelings
- 20+ different feelings can be learned (Discalimer: some aren't very stable)
- Training on a variety of feelings from the dataset including happiness, sadness, and anger
- Preprocessing of the dataset to remove stopwords and punctuations
- Processing of the text data to convert it into vectors using the "spacy" library for word embedding
- Saving and loading of the model parameters
- Training progress tracked using the Weights and Biases website
- Includes an API code and a website
To use PsychoBot, follow these steps:
- Clone the repository
- Install Python and the required libraries via pip:
- numpy
- spacy
- pickle
- wandb
- gensim
- pandas
- Install Node.js
- Navigate to the website folder and run
npm install
in the terminal to install all the required libraries for the website - Run the file
main.py
in the API folder to activate the API - In the website folder, run
npm run dev
in the terminal to run the website.
Throughout the development of this project, I have been learning and improving my knowledge of the mathematical topics required for machine learning and neural networks. This includes topics such as linear algebra, calculus, probability, and statistics.
I have also been learning the theoretical concepts of machine learning and neural networks, including topics such as supervised learning, unsupervised learning, gradient descent, backpropagation, and more.
The sentiment analysis AI can be used in a variety of ways, including:
- Analyzing social media posts to understand public opinion on a topic
- Analyzing customer reviews to understand customer sentiment towards a product
- Analyzing news articles to understand the sentiment towards a particular event or issue
To use the sentiment analysis AI, users can input their text data into the API or the website, and the AI will predict the specific feeling conveyed by the text.