{"id":13811241,"url":"https://github.com/theamrzaki/text_summurization_abstractive_methods","last_synced_at":"2025-05-14T15:31:42.044Z","repository":{"id":50466572,"uuid":"153877805","full_name":"theamrzaki/text_summurization_abstractive_methods","owner":"theamrzaki","description":"Multiple implementations for abstractive text summurization , using google colab","archived":false,"fork":false,"pushed_at":"2020-10-06T19:51:17.000Z","size":4514,"stargazers_count":526,"open_issues_count":13,"forks_count":219,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-19T05:56:10.871Z","etag":null,"topics":["abstractive-text-summarization","ai","artificial-intelligence","deep-learning","deeplearning","encoder-decoder","google-colab","google-colaboratory","machine-learning","machinelearning","nlp","pointer-generator","policy-gradient","reinforcement-learning","rnn","seq2seq","tensorflow","text-summarization","word2vec"],"latest_commit_sha":null,"homepage":"https://medium.com/@theamrzaki","language":"Jupyter Notebook","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/theamrzaki.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":"2018-10-20T06:49:03.000Z","updated_at":"2024-11-18T17:12:21.000Z","dependencies_parsed_at":"2022-08-29T04:01:49.002Z","dependency_job_id":null,"html_url":"https://github.com/theamrzaki/text_summurization_abstractive_methods","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/theamrzaki%2Ftext_summurization_abstractive_methods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theamrzaki%2Ftext_summurization_abstractive_methods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theamrzaki%2Ftext_summurization_abstractive_methods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theamrzaki%2Ftext_summurization_abstractive_methods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theamrzaki","download_url":"https://codeload.github.com/theamrzaki/text_summurization_abstractive_methods/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254171893,"owners_count":22026536,"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":["abstractive-text-summarization","ai","artificial-intelligence","deep-learning","deeplearning","encoder-decoder","google-colab","google-colaboratory","machine-learning","machinelearning","nlp","pointer-generator","policy-gradient","reinforcement-learning","rnn","seq2seq","tensorflow","text-summarization","word2vec"],"created_at":"2024-08-04T03:00:43.177Z","updated_at":"2025-05-14T15:31:37.029Z","avatar_url":"https://github.com/theamrzaki.png","language":"Jupyter Notebook","funding_links":[],"categories":["Technologies"],"sub_categories":[],"readme":"# Text Summarization models\n\nif you are able to endorse me on Arxiv, i would be more than glad https://arxiv.org/auth/endorse?x=FRBB89 thanks \nThis repo is built to collect multiple implementations for abstractive approaches to address text summarization , for different languages (Hindi, Amharic, English, and soon isA Arabic)\n\nIf you found this project helpful please consider citing our work, it would truly mean so much for me\n\n```\n@INPROCEEDINGS{9068171,\n  author={A. M. {Zaki} and M. I. {Khalil} and H. M. {Abbas}},\n  booktitle={2019 14th International Conference on Computer Engineering and Systems (ICCES)}, \n  title={Deep Architectures for Abstractive Text Summarization in Multiple Languages}, \n  year={2019},\n  volume={},\n  number={},\n  pages={22-27},}\n```\n\n```\n@misc{zaki2020amharic,\n    title={Amharic Abstractive Text Summarization},\n    author={Amr M. Zaki and Mahmoud I. Khalil and Hazem M. Abbas},\n    year={2020},\n    eprint={2003.13721},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL}\n}\n```\n\n**it is built to simply run on google colab , in one notebook  so you would only need an internet connection to run these examples without the need to have a powerful machine , so all the code examples would be in a jupiter format , and you don't have to download data to your device as we connect these jupiter notebooks to google drive**\n\n- **Arabic Summarization** Model using the corner stone implemtnation (seq2seq using Bidirecional LSTM Encoder and attention in the decoder) for summarizing Arabic news\n-  **implementation A** Corner stone seq2seq with attention (using bidirectional ltsm ) , three different models for this implemntation \n-  **implementation B** seq2seq with pointer genrator model\n-  **implementation C** seq2seq with reinforcement learning\n\n# Blogs\nThis repo has been explained in a series of Blogs\n- to understand how to work with google colab eco system , and how to integrate it with your google drive , this blog can prove useful [DeepLearning Free Ecosystem](https://hackernoon.com/begin-your-deep-learning-project-for-free-free-gpu-processing-free-storage-free-easy-upload-b4dba18abebc \"DeepLearning Free Ecosystem\")\n- **Tutorial 1** [ Overview on the different appraches used for abstractive text summarization](https://hackernoon.com/text-summarizer-using-deep-learning-made-easy-490880df6cd?source=post_stats_page--------------------------- \"Overview on  abstractive text summarization\")\n- **Tutorial 2**  [ How to represent text for our text summarization task ](https://hackernoon.com/abstractive-text-summarization-tutorial-2-text-representation-made-very-easy-ef4511a1a46?source=post_stats_page--------------------------- \"text represneataion for text summarization\")\n- **Tutorial 3**  [ What seq2seq and why do we use it in text summarization ](https://hackernoon.com/tutorial-3-what-is-seq2seq-for-text-summarization-and-why-68ebaa644db0?source=post_stats_page--------------------------- \"What and why seq2seq\")\n- **Tutorial 4** [Multilayer Bidirectional Lstm/Gru for text summarization](https://medium.com/@theamrzaki/multilayer-bidirectional-lstm-gru-for-text-summarization-made-easy-tutorial-4-a63db108b44f)\n- **Tutorial 5** [Beam Search \u0026 Attention for text summarization](https://medium.com/@theamrzaki/beam-search-attention-for-text-summarization-made-easy-tutorial-5-3b7186df7086)\n- **Tutorial 6** [Build an Abstractive Text Summarizer in 94 Lines of Tensorflow](http://bit.ly/2ZeEmvO)\n- **Tutorial 7** [Pointer generator for combination of Abstractive \u0026 Extractive methods for Text Summarization](http://bit.ly/2EhcRIZ)\n- **Tutorial 8** [Teach seq2seq models to learn from their mistakes using deep curriculum learning](http://bit.ly/2My51kX)\n- **Tutorial 9** [Deep Reinforcement Learning (DeepRL) for Abstractive Text Summarization made easy](http://bit.ly/2MDlUHC)\n- **Tutorial 10** [Hindi Text Summarization](https://medium.com/analytics-vidhya/hindi-abstractive-text-summarization-tutorial-10-eac471bdafad)\n---------------------------------------------------------------------------------\n\nTry out this text summarization through [this website (eazymind)](http://bit.ly/2VxhPqU) ,\n![eazymind](https://scontent.fcai3-1.fna.fbcdn.net/v/t1.0-9/60785552_445522029607880_7282873905209933824_o.jpg?_nc_cat=101\u0026_nc_ht=scontent.fcai3-1.fna\u0026oh=927d1fae6521813b3d6e7a7d7a5b01aa\u0026oe=5D5C3AD5) which enables you to summarize your text through\n- curl call\n```\ncurl -X POST \nhttp://eazymind.herokuapp.com/arabic_sum/eazysum\n-H 'cache-control: no-cache' \n-H 'content-type: application/x-www-form-urlencoded' \n-d \"eazykey={eazymind api key}\u0026sentence={your sentence to be summarized}\"\n```\n- python package ([pip install eazymind](http://bit.ly/2Ef5XnS))\n\t```pip install eazymind```\n\t\n```\nfrom eazymind.nlp.eazysum import Summarizer\n\n#---key from eazymind website---\nkey = \"xxxxxxxxxxxxxxxxxxxxx\"\n\n#---sentence to be summarized---\nsentence = \"\"\"(CNN)The White House has instructed former\n    White House Counsel Don McGahn not to comply with a subpoena\n    for documents from House Judiciary Chairman Jerry Nadler, \n    teeing up the latest in a series of escalating oversight \n    showdowns between the Trump administration and congressional Democrats.\"\"\"\n    \nsummarizer = Summarizer(key)\nprint(summarizer.run(sentence))\n```\n\n---------------------------------------------------------------------------------\n\n## Implementation A (seq2seq with attention and feature rich representation)\ncontains 3 different models that implements the concept of hving a seq2seq network with attention \nalso adding concepts like having a feature rich word representation \nThis work is a continuation of these amazing repos\n\n### Model 1 \nis a modification on of David Currie's https://github.com/Currie32/Text-Summarization-with-Amazon-Reviews seq2seq \n\n### Model 2 \n#### 1- Model_2/Model_2.ipynb\na modification to https://github.com/dongjun-Lee/text-summarization-tensorflow \n#### 2- Model_2/Model 2 features(tf-idf , pos tags).ipynb\na modification to Model 2.ipynb by using concepts from http://www.aclweb.org/anthology/K16-1028\n#### Results\nA folder contains the results of both the 2 models , from validation text samples \nin a zaksum format , which is combining all of \n- bleu\n- rouge_1\n- rouge_2\n- rouge_L\n- rouge_be\nfor each sentence , and average of all of them\n\n### Model 3\na modification to https://github.com/thomasschmied/Text_Summarization_with_Tensorflow/blob/master/summarizer_amazon_reviews.ipynb\n\n\t\t\n---------------------------------------------------------------------------------\n\n## Implementation B (Pointer Generator seq2seq network)\nit is a continuation of the amazing work of\n\thttps://github.com/abisee/pointer-generator\n\thttps://arxiv.org/abs/1704.04368\nthis implementation uses the concept of having a pointer generator network to diminish some problems that appears with the normal \nseq2seq network\n\t\n### Model_4_generator_.ipynb\nuses a pointer generator with seq2seq with attention \nit is built using python2.7\n### zaksum_eval.ipynb\nbuilt by python3 for evaluation\n### Results/Pointer Generator\n- output from generator (article / reference / summary) used as input to the zaksum_eval.ipynb\n- result from zaksum_eval\n\t\n\t\ni will still work on their implementation of coverage mechanism , so much work is yet to come if God wills it isA\n\n---------------------------------------------------------------------------------\n## Implementation C (Reinforcement Learning For Sequence to Sequence )\n\nthis implementation is a continuation of the amazing work done by\nhttps://github.com/yaserkl/RLSeq2Seq\nhttps://arxiv.org/abs/1805.09461\n\n```\n@article{keneshloo2018deep,\n title={Deep Reinforcement Learning For Sequence to Sequence Models},\n author={Keneshloo, Yaser and Shi, Tian and Ramakrishnan, Naren and Reddy, Chandan K.},\n journal={arXiv preprint arXiv:1805.09461},\n year={2018}\n}\n```\n\n\n### Model 5 RL\nthis is a library for building multiple approaches using Reinforcement Learning with seq2seq , i have gathered their code to run in a jupiter notebook , and to access google drive \nbuilt for python 2.7\n\n### zaksum_eval.ipynb\nbuilt by python3 for evaluation\n\n### Results/Reinforcement Learning\n- output from Model 5 RL used as input to the zaksum_eval.ipynb\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheamrzaki%2Ftext_summurization_abstractive_methods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheamrzaki%2Ftext_summurization_abstractive_methods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheamrzaki%2Ftext_summurization_abstractive_methods/lists"}