This project aims to perform text style transfer, specifically converting informal text to formal text. It leverages the NUS Social Media Text Normalization and Translation Corpus. The repository explores three primary approaches:
- A simple encoder-decoder model.
- An encoder-decoder model with an attention mechanism.
- Pre trained model (facebook bart-large)
Ensure you have the following Python libraries installed:
- NumPy
- pandas
- Matplotlib
- seaborn
- TensorFlow
- NLTK (for
nltk.translate.bleu_score) - joblib
- scikit-learn
- NLPAug
Execute the Data_Preprocessing.ipynb notebook to prepare the data for training:
jupyter notebook Data_Preprocessing.ipynbTo run the simple encoder-decoder model:
jupyter notebook Simple_Encoder_Decoder.ipynbFor the attention mechanism-enhanced model:
jupyter notebook Final_Attention_Model.ipynbFor the pretrained model:
jupyter notebook Pre_Trained_Model.ipynbThis project includes a user-friendly interface built using Streamlit, a powerful framework for creating interactive web applications with Python. The interface allows users to interact with the model seamlessly and obtain results in real-time.
To run the Streamlit interface, execute the following command in your terminal:
streamlit run app.py