{"id":51492067,"url":"https://github.com/idanmoradarthas/text-summarization","last_synced_at":"2026-07-07T12:02:07.702Z","repository":{"id":36239037,"uuid":"191353313","full_name":"idanmoradarthas/text-summarization","owner":"idanmoradarthas","description":"Summarizer in python with Spacy and Universal Sentence Encoder build on Flask framework","archived":false,"fork":false,"pushed_at":"2022-11-21T22:00:11.000Z","size":346,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-03T11:55:54.222Z","etag":null,"topics":["deep-learning","flask-application","networkx","nlp-machine-learning","spacy","summarization","tensorflow","universal-sentence-encoder"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idanmoradarthas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-11T10:59:07.000Z","updated_at":"2023-02-18T22:13:05.000Z","dependencies_parsed_at":"2023-01-16T23:45:11.155Z","dependency_job_id":null,"html_url":"https://github.com/idanmoradarthas/text-summarization","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/idanmoradarthas/text-summarization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idanmoradarthas%2Ftext-summarization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idanmoradarthas%2Ftext-summarization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idanmoradarthas%2Ftext-summarization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idanmoradarthas%2Ftext-summarization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idanmoradarthas","download_url":"https://codeload.github.com/idanmoradarthas/text-summarization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idanmoradarthas%2Ftext-summarization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35226918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deep-learning","flask-application","networkx","nlp-machine-learning","spacy","summarization","tensorflow","universal-sentence-encoder"],"created_at":"2026-07-07T12:02:05.561Z","updated_at":"2026-07-07T12:02:07.690Z","avatar_url":"https://github.com/idanmoradarthas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto Text Summarization\n\n[full code documentation](https://idanmoradarthas.github.io/text-summarization/)\n\n```\nAutomatic summarization is the process of shortening a text document with software, in order to create a summary \nwith the major points of the original document.\n```\n--Wikipedia\n\nThis project was inspired by work of Praveen Dubey in \n[Understand Text Summarization and create your own summarizer in python](https://towardsdatascience.com/understand-text-summarization-and-create-your-own-summarizer-in-python-b26a9f09fc70).\n\nThe summarization uses the Universal Sentence Encoder[1] with the deep learning framework of TensorFlow, SpaCy for \nlinguistic and NetworkX for ranking. The project itself is a RestAPI script build with Flask framework.\n\nThe algorithm steps are as follows:\n1. Read the given text and splitting it into sentences using SpaCy.\n2. Generate sentences pairs cosine similarity score based on their dimensional vectors with TensorFlow graph and the \nUniversal Sentence Encoder as an embedding layer (see network architecture picture below).\n3. Generate similarity matrix across the sentences and rank them using NetworkX implementation of PageRank.\n4. Sort the rank sentences and pick the top ones according the user's input. \n\n## TensorFlow graph with the Universal Sentence Encoder\n![Graph](images/graph_run=.png)\n\n## Install and run project\nbuild with ```python==3.7.3``` and ```tox==3.12.0```.\n\n```\ngit clone https://github.com/idanmoradarthas/text-summarization.git\ncd text-summarization\npip install -r requirements.txt\npython app.py \n```\n\nthe app will run on 0.0.0.0:8080\n\n## Interface v1.0\n### Request and Response\nRequest Should be constructed as such and send in method POST:\n```json\n{\n  \"doc\": text,\n  \"summarized sentences length\": number of sentences that will comprised the summary\n}\n```\nwhere each document will be in separate brackets.\n\nThe API is exposed in route \"/summarize/v1.0\". so the full address should be ```\u003cIP\u003e:8080/classify/v1.0```\n\nFor example:\n\nFor the following text:\n```\nIn an attempt to build an AI-ready workforce, Microsoft announced Intelligent Cloud Hub which has been launched to \nempower the next generation of students with AI-ready skills. Envisioned as a three-year collaborative program, \nIntelligent Cloud Hub will support around 100 institutions with AI infrastructure, course content and curriculum, \ndeveloper support, development tools and give students access to cloud and AI services. As part of the program, the \nRedmond giant which wants to expand its reach and is planning to build a strong developer ecosystem in India \nwith the program will set up the core AI infrastructure and IoT Hub for the selected campuses. The company will \nprovide AI development tools and Azure AI services such as Microsoft Cognitive Services, Bot Services and Azure \nMachine Learning. According to Manish Prakash, Country General Manager-PS, Health and Education, Microsoft India, \nsaid, \"With AI being the defining technology of our time, it is transforming lives and industry and the jobs of \ntomorrow will require a different skillset. This will require more collaborations and training and working with AI. \nThat’s why it has become more critical than ever for educational institutions to integrate new cloud and AI \ntechnologies. The program is an attempt to ramp up the institutional set-up and build capabilities among the \neducators to educate the workforce of tomorrow.\" The program aims to build up the cognitive skills and in-depth \nunderstanding of developing intelligent cloud connected solutions for applications across industry. Earlier in \nApril this year, the company announced Microsoft Professional Program In AI as a learning track open to the public. \nThe program was developed to provide job ready skills to programmers who wanted to hone their skills in AI and data \nscience with a series of online courses which featured hands-on labs and expert instructors as well. This program \nalso included developer-focused AI school that provided a bunch of assets to help build AI skills.\n```\n(source: [analyticsindiamag.com](https://www.analyticsindiamag.com/microsoft-launches-intelligent-cloud-hub-to-upskill-students-in-ai-cloud-technologies/))\n\nwe will give the following request (replace \u003cinput_text\u003e with the text above)\n```json\n{\n   \"doc\": \"\u003cinput_text\u003e\",\n   \"summarized sentences length\": 3\n}\n```\n\nThe response will be \n```json\n{\n  \"summarized text\": \"summarized text\"\n}\n```\n\nFor example:\n\nThe returned summarized text from the above request will be:\n```\nIn an attempt to build an AI-ready workforce, Microsoft announced Intelligent Cloud Hub which has been launched to \nempower the next generation of students with AI-ready skills. The company will provide AI development tools and \nAzure AI services such as Microsoft Cognitive Services, Bot Services and Azure Machine Learning. The program \nwas developed to provide job ready skills to programmers who wanted to hone their skills in AI and data science \nwith a series of online courses which featured hands-on labs and expert instructors as well.\n```\n\n## References\n[1] Daniel Cer, Yinfei Yang, Sheng-yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario \nGuajardo-Céspedes, Steve Yuan, Chris Tar, Yun-Hsuan Sung, Brian Strope, Ray Kurzweil. \n[Universal Sentence Encoder](https://arxiv.org/abs/1803.11175). arXiv:1803.11175, 2018.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidanmoradarthas%2Ftext-summarization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidanmoradarthas%2Ftext-summarization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidanmoradarthas%2Ftext-summarization/lists"}