Giter VIP home page Giter VIP logo

abtextsumm's Introduction

AbTextSumm

Abstractive Summarization: Code of the ILP-based algorithm similar to the IJCAI paper: Multi-document Abstractive Summarization using ilp based multi-sentence compression. Some differences exist as pointed below:

Please note that this code only tackles the summarization component and not the clustering part. Also, the code for the original paper (mentioned below) was written in JAVA and this is Python. I tried to reconstruct most of the technique, but there might be subtle differences in the evaluation results if you use this version.

The code takes a list of sentences, or a paragraph and produces an extractive or abstractive summary driven by the parameter "mode". This code was also used for a part of the work of this paper:

K. Rudra, S. Banerjee, N. Ganguly, P. Goyal, M. Imran, and P. Mitra, “Summarizing situational tweets in crisis scenario,” in Proceedings of the 27th ACM Conference on Hypertext and Social Media. ACM, 2016, pp. 137–147.

For language model (only required for abstractive summarization): Needs kenlm: https://kheafield.com/code/kenlm/ [See how to install] Use any available ARPA format language model and convert to kenlm format as binary. KENLM is really fast.

Other several packages required: PuLP for optimization, sklearn, nltk, cpattern, igraph Best option is to use Anaconda package. All the above mentioned packages can be installed using pip. To install dependencies, use:

pip install - r requirements.txt

in the root folder of the project.

A major part of the word graph generation code has been taken from https://github.com/boudinfl/takahe.

The main program is in txtsumm/Example.py. Given a passage, it can generate a summary using the following code:

  list_Sentences=segmentize(passage)
  generateSummaries(list_Sentences, mode="Extractive")

Changing the mode = "Extractive" to:

mode="Abstractive"

will run Abstractive summarization with TextRank as the default ranking parameter. However, it requires a language model described earlier. By default, this code runs extractive summarization. You can also use the length parameter (in words) to control length of the output summary. For example:

generateSummaries(list_Sentences, mode="Extractive", length=50)

Note: The code here does not contain the clustering step (mentioned in the paper), which should be pretty straightforward to implement. This is research quality code, but if you find major bugs, please let me know.

If you use the code here, please cite the paper:

Siddhartha Banerjee, Prasenjit Mitra, and Kazunari Sugiyama. "Multi-Document Abstractive Summarization Using ILP based Multi-Sentence Compression." Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI 2015), Buenos Aires, Argentina. 2015.

abtextsumm's People

Contributors

siddbanpsu avatar

Watchers

 avatar

Forkers

hayasam smigad

abtextsumm's Issues

More on KenLM

Could you explain a little bit more on the LM that you have used in the experiment? Is there a way to download the "lm-3g.klm" that you have used in the Example code?

Missing lm-3g.klm file

Hello, first of all, thanks for your project.
I am testing some alternatives in order to perform abstractive summaries and I wanted to run your Example.py to do so.

As I have seen, it is required in your code (Line 107 in Example.py) the file resources/lm-3g.klm:
lm = kenlm.LanguageModel(RESOURCES_DIR+'/lm-3g.klm')

It gives a an Exception because the file it is not included in the project.

Where could I find it?

I have searched on the internet with no luck :(

Implementation - Abstractive Summarization

Hi
I have a linux PC with with Ubuntu 14.01 installed. I m unable to install and run your code. Can you please provide the step by step commands for installing and running the Example.py file. Also where can i find the detailed report of your approach. I could not find the paper.
Regards
Shiju

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.