GithubHelp home page GithubHelp logo

panyang / summarize.py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vgel/summarize.py

0.0 1.0 0.0 222 KB

A python script for summarizing articles using nltk

License: BSD 3-Clause "New" or "Revised" License

summarize.py's Introduction

summarize.py

A python script for summarizing articles using nltk.

Requires:

  • python2.7 / python 3
  • nltk (if using Python 3, see note below)
  • bs4 (only for opening urls)
  • requests (only for opening urls)

Usage:

git clone https://github.com/Rotten194/summarize.py.git
cd summarize.py/summarize
./summarize.py http://www.washingtonpost.com/blogs/the-switch/wp/2013/08/01/how-vermont-could-save-the-nation-from-patent-trolls/

Usage from code:

# sudo python setup.py install
# then
import summarize
summarize.summarize_text(large_text)

Python 3 Support Notes:

To use NLTK with Python 3 currently, you must install the NLTK 3.0 alpha packages available at nltk.org. All other libraries required by summarize.py have Python 3 versions.

Example:

$ python3 summarize.py "http://www.theverge.com/2013/8/1/4580718/fbi-can-remotely-activate-android-and-laptop-microphones-reports-wsj"
FBI can remotely activate Android and laptop microphones, reports WSJ | The Verge - http://www.theverge.com/2013/8/1/4580718/fbi-can-remotely-activate-android-and-laptop-microphones-reports-wsj

Remotely activated cell phone bugs predate iOS and Android
What's new, according to several former anonymous officials, is a dedicated FBI group which regularly hacks into computers, using both custom and off-the-shelf surveillance software which it buys from private companies.
While that source also claims the FBI takes care to make sure that only "relevant data" gets collected, it's still a little troubling to know that such a thing is easily possible and regularly done.

summarize.py's People

Contributors

vgel avatar dominicrodger avatar h4ck3rm1k3 avatar fusion avatar

Watchers

AINLP avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.