This project showcases the implementation of a Knowledge-Aware Neural Network (KAN) for sentiment analysis on movie reviews using the IMDb dataset. The KAN model integrates traditional neural network capabilities with knowledge from a graph to enhance the sentiment classification task.
The goal of this project is to demonstrate how integrating external knowledge through a knowledge graph can enhance the performance of neural networks in natural language processing tasks, specifically sentiment analysis. This project is a valuable resource for researchers and practitioners looking to explore the integration of knowledge graphs with neural networks for improved performance in various NLP tasks.
- Knowledge-Aware Neural Network (KAN): Incorporates external knowledge to improve sentiment analysis accuracy.
- IMDb Movie Reviews Dataset: Utilizes a widely recognized dataset for sentiment analysis, enabling robust evaluation and benchmarking.
- Comprehensive Directory Structure: Organized codebase with separate modules for data preparation, model definition, training, and evaluation.
- Interactive Jupyter Notebook: Provides an interactive environment for exploring and experimenting with the model.
- Data Preparation: Downloads and preprocesses the IMDb movie reviews dataset.
- Model Training: Trains the KAN model on the preprocessed data.
- Evaluation: Evaluates the trained model on a test dataset and visualizes performance metrics.
- Python 3.7 or later
- TensorFlow 2.x
- NetworkX
- Scikit-learn
-
Clone the repository:
git clone https://github.com/SreeEswaran/KAN-based-Movie-Review-Sentiment-Analysis.git cd KAN-based-Movie-Review-Sentiment-Analysis
-
Install the required packages:
pip install -r requirements.txt
-
Download the IMDb dataset:
python data/download_data.py
-
To train the model:
python src/train_model.py
-
To evaluate the model:
python src/evaluate_model.py
-
To explore the notebook:
jupyter notebook notebooks/KAN_Movie_Review_Sentiment.ipynb
The IMDb dataset is a large movie review dataset for binary sentiment classification. You can download it here.
The model is a Knowledge-Aware Neural Network (KAN) that integrates knowledge from a knowledge graph to enhance the learning process. The architecture includes an LSTM layer for sequence processing and an embedding layer that incorporates knowledge from the graph.
For any queries, feel free to write at 21pa1a05j8@vishnu.edu.in and don't forget to follow me on:
Linkedin: https://www.linkedin.com/in/sree-deekshitha-yerra
Medium: https://www.medium.com/@SreeEswaran
Book An Appointment: https://topmate.io/SreeEswaran