{"id":15683684,"url":"https://github.com/ivanbongiorni/attention-chatbot","last_synced_at":"2025-05-07T14:22:04.967Z","repository":{"id":49874153,"uuid":"245836402","full_name":"IvanBongiorni/Attention-Chatbot","owner":"IvanBongiorni","description":"Chatbot for Twitter Customer Support. A Seq2seq Neural Network with Multiplicative Attention mechanism implemented in TensorFlow 2.","archived":false,"fork":false,"pushed_at":"2021-12-29T15:27:18.000Z","size":10521,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T14:22:00.132Z","etag":null,"topics":["attention","attention-mechanism","chatbot","deeplearning","machine-learning","rnn","seq2seq","tensorflow","tensorflow2","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IvanBongiorni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-08T15:11:41.000Z","updated_at":"2021-12-29T13:13:48.000Z","dependencies_parsed_at":"2022-09-16T11:50:19.985Z","dependency_job_id":null,"html_url":"https://github.com/IvanBongiorni/Attention-Chatbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2FAttention-Chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2FAttention-Chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2FAttention-Chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanBongiorni%2FAttention-Chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IvanBongiorni","download_url":"https://codeload.github.com/IvanBongiorni/Attention-Chatbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892682,"owners_count":21820687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attention","attention-mechanism","chatbot","deeplearning","machine-learning","rnn","seq2seq","tensorflow","tensorflow2","twitter"],"created_at":"2024-10-03T17:08:12.167Z","updated_at":"2025-05-07T14:22:04.944Z","avatar_url":"https://github.com/IvanBongiorni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WARNING: WORK IN PROGRESS\nThis repository is not ready yet. Please don't clone or use right now. A functioning prototype should be ready in the next weeks.\n\n# Attention-based Chatbot for Twitter Customer Support.\n\nThis is a Chatbot for Twitter Customer Support.\nIt is implemented as a **Seq2seq RNN with Multiplicative Attention** mechanism.\n\nData have been taken from Kaggle's [Customer Support on Twitter](https://www.kaggle.com/thoughtvector/customer-support-on-twitter) dataset. \nThis dataset comprehends tweet exchanges from multiple companies. \nEach company requires a different model implementation.\n\n\n## How it works\n\nThe model implemented is a **Seq2Seq** Neural Network with **LSTM** layers and **Luong's Multiplicative Attention**. \nIt is written in **TensorFlow 2.1** and optimized with **Autograph**.\nThe model is character-based, i.e. single characters are tokenized and predicted.\nTraining is implemented with **teacher forcing**.\n\n\n## Structure of the Repository\n\nFolders:\n- `/data_raw`: uncompressed raw dataset must be pasted here.\n- `/data_processed`: all pre-processed observations will be saved in `/Training`, `/Validation` and `/Test` sub-folders. \nIt contains also `.yaml` dictionaries to translate from token (character) to vector; their naming convention is `char2idx_{company}.yaml`.\n- `/dataprep`: contains all data preprocessing scripts, with names as `dataprep_{company}.py`.\n- `/tools`: useful functions to be iterated in dataprep. \nOne main `tools.py` module contains functions used for all models. \nFor more company-specific tools other modules are available as `tools_{company}.py`.\n- `/saved_models`: where trained models are saved and/or loaded after launching `train.py`.\n- `/talk`: contains a list of scripts to be called from terminal to chat with a trained model. Naming convention is still `talk_{company}.py`.\n\nFiles:\n- `config.yaml`: main configuration file. Every hyperparameter and model choice can be decided here.\n- `model.py`: model implementation.\n- `train.py`: model training. The company's model and the data to be trained on can be chosed from `config.yaml`.\n\n\n## Modules\n```\nlangdetect==1.0.8\ntensorflow==2.1.0\nnumpy==1.18.1\npandas==1.0.1\n```\n\n## Bibliography\n\nPapers:\n- *Luong, Minh-Thang, Hieu Pham, and Christopher D. Manning. \"Effective approaches to attention-based neural machine translation.\" arXiv preprint arXiv:1508.04025 (2015).*\n\nOther useful resources:\n- The official TensorFlow tutorial on a [Neural machine translation with attention](https://www.tensorflow.org/tutorials/text/nmt_with_attention).\n- [Attention-based Sequence-to-Sequence in Keras](https://wanasit.github.io/attention-based-sequence-to-sequence-in-keras.html) on Wanasit Tanakitrungruang's [blog](https://wanasit.github.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbongiorni%2Fattention-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanbongiorni%2Fattention-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanbongiorni%2Fattention-chatbot/lists"}