- The Chatbot with GUI project is an application that uses the
tkinter
library to create a graphical user interface (GUI) that allows users to interact with various natural language processing (NLP) functionalities. The application includes features for text tokenization, stemming, lemmatization, access to various corpora, the use of regular expressions, and part-of-speech (POS) tagging. These functionalities are integrated into a simple and intuitive GUI.
- This project is a prototype of a larger and more complex system aimed at providing advanced tools for natural language processing. The goal is to demonstrate basic capabilities and provide a solid foundation on which to build additional features and improvements.
The chatbot currently:
-
Preprocesses Text:
- Uses various techniques for tokenization, stemming, lemmatization, and stopword removal to prepare the text.
-
Transforms Text:
- Converts the text into a numerical representation using the Bag of Words model.
-
Predicts Classes:
- Uses a neural model to make predictions based on the preprocessed and transformed text.
-
Generates Responses:
- Uses the pre-trained DialoGPT model to generate responses based on user input.
-
User Interface:
- Provides a graphical interface with Tkinter to input text, process it, and display the results.
- DialoGPT: The DialoGPT model is a variant of the GPT-2 (Generative Pre-trained Transformer 2) model developed by OpenAI. It has been trained on a large corpus of Reddit conversations to generate coherent and contextually relevant responses in a dialogue. DialoGPT is particularly suitable for chatbot applications due to its ability to understand and generate natural language fluently.
- Install Dependencies:
- Ensure you have Python installed.
- Install the required libraries:
tkinter
,nltk
,tensorflow
,scikit-learn
,imblearn
,matplotlib
,transformers
,torch
.
pip install <libraries>
- Download and Run the Application:
- Open Git Bash terminal.
- Clone the repository:
git clone https://github.com/Mike014/Chatbot_App.git
- Navigate to the project directory, Run the App::
- Run the application
cd Chatbot_App
python main.py
- Enter text in the input area and click the "Process Text" button to see the preprocessing, transformation, and prediction results.
- Use the "Clear" button to clear the text area and the "Quit" button to close the application.
- Description: Manages the chatbot's graphical interface and coordinates the interaction between various modules.
- Libraries:
tkinter
,pickle
,numpy
.
- Description: Initializes the language model modules.
- Modules:
BagOfWords
,NeuralModel
,DialoGPTModel
.
- Description: Implements the Bag of Words model for numerical text representation.
- Libraries:
sklearn.feature_extraction.text.CountVectorizer
.
- Description: Implements a dialogue model based on DialoGPT.
- Libraries:
transformers
,torch
.
- Description: Implements a neural model for text classification.
- Libraries:
tensorflow
,nltk
,sklearn
,imblearn
,numpy
,matplotlib
.
- Description: Initializes the text generation modules.
- Description: Implements a Seq2Seq model for text generation.
- Libraries:
tensorflow.keras.layers
,tensorflow.keras.models
.
- Description: Implements the Teacher Forcing technique for training Seq2Seq models.
- Libraries:
numpy
.
- Description: Manages word representations using embeddings.
- Libraries:
tensorflow.keras.preprocessing.text
,tensorflow.keras.preprocessing.sequence
.
- Description: Initializes the text preprocessing modules.
- Modules:
Tokenizer
,Stemmer
,Regex
,NLTKCorpora
,TextPreprocessing
.
- Description: Implements various text preprocessing techniques.
- Libraries:
nltk
,Text_Preprocessing.Corpus
,Text_Preprocessing.Re
,Text_Preprocessing.Stem
,Text_Preprocessing.Tokenize
.
In summary, the chatbot takes a text input, preprocesses it, transforms it into a numerical representation, makes a prediction with a neural model, generates a response with DialoGPT, and displays the results to the user.