Coder Social home page Coder Social logo

saadali1996 / pytextrank Goto Github PK

View Code? Open in Web Editor NEW

This project forked from derwenai/pytextrank

0.0 0.0 0.0 519 KB

Python implementation of TextRank for text document NLP parsing and summarization

License: Apache License 2.0

Jupyter Notebook 75.93% Python 23.83% Shell 0.24%

pytextrank's Introduction

Python impl for TextRank

Python implementation of TextRank, based on the Mihalcea 2004 paper.

Modifications to the original algorithm by Rada Mihalcea, et al. include:

  • fixed bug; see Java impl, 2008
  • use of lemmatization instead of stemming
  • verbs included in the graph (but not in the resulting keyphrases)
  • named entity recognition
  • normalized keyphrase ranks used in summarization

The results produced by this implementation are intended more for use as feature vectors in machine learning, not as academic paper summaries.

Inspired by Williams 2016 talk on text summarization.

Example Usage

See PyTextRank wiki

Dependencies and Installation

This code has dependencies on several other Python projects:

To install from PyPi:

pip install pytextrank

To install from this Git repo:

pip install -r requirements.txt

After installation you need to download a language model:

python -m spacy download en

Also, the runtime depends on a local file called stop.txt which contains a list of stopwords. You can override this in the normalize_key_phrases() call.

License

PyTextRank has an Apache 2.0 license, so you can use it for commercial applications. Please let us know if you find this useful, and tell us about use cases, what else you'd like to see integrated, etc.

Here's a Bibtex entry if you ever need to cite PyTextRank in a research paper:

@Misc{PyTextRank,
author =   {Nathan, Paco},
title =    {PyTextRank, a Python implementation of TextRank for text document NLP parsing and summarization},
howpublished = {\url{https://github.com/ceteri/pytextrank/}},
year = {2016}
}

Kudos

@htmartin @williamsmj @eugenep @mattkohl @vanita5 @HarshGrandeur @mnowotka @kjam @dvsrepo

pytextrank's People

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.