Summarize articles on the net by simply copying the intended article.
This was built in Python 3.4 and please refer to the pre-requistes required for running it successfully. If you are on Linux or some other OS you will experience problem in creating system notifications. Will update the code for that soon.
- Python 3.4 (although it shoudn't have problem running on other Python versions.)
- NLTK for Python
- nltk.corpus
-
- (For Linux users) PyMsgBox library for creating alert box(refer google for installation)
- Clone/Download zip of TextSummarizer
- Extract content of the zip.
- Open IDLE/cmd to run the following code -
import os
os.chdir('path') #path where script is saved.
from textSummarize import ExtractNewSentences
ExtractNewSentences().run() #by default the script runs for 2 hours in background with 75% summarization of text.
#To run for specific hour(s) say 1.5 hours
ExtractNewSentences().run(timer=1.5)
#To summarize into 50% of the text
ExtractNewSentences().run(reducepercent=0.5)
To stop script, simply close the screen or press CTRL+C
Steps to install nltk -
- Extract the zip content
- Open cmd
- Run the following commands -
cd "folderpath where zip is extracted"
python setup.py install
For nltk_data -
- Extract the folder and save it in your python directory.