Code Monkey home page Code Monkey logo

research-summarization's Introduction

Summarization research code

This code accompanies the thesis on embedding-based extractive summarization from Blendle Research, written by Lucas de Haas. It can be used to exactly reproduce all experimental results. It thus contains implementations of various summarization algorithms that were previously not available.

How to run

Set the summarization function(s) in summarizer.py, and then run main.py to output results.

Some files are not included:

  • The Google word2vec model is not included in this repo, but can be downloaded here; it is expected to be in models/word2vec/google/, and is necessary to run main.py out-of-the-box.
  • The DUC-2002 and TAC-2008 dataset are not included as access can only be granted by NIST (click on the links for more information on obtaining access).
  • The Opinosis dataset is included, and main.py is configured to run on this dataset by default.

Requirements

  • python >= 3.5
  • pythonrouge
  • regex
  • scipy
  • networkx
  • gensim
  • xmltodict
  • numpy
  • pattern
  • nltk
  • beautifulsoup4
  • scikit_learn
  • torch
  • permute

research-summarization's People

Contributors

lmdehaas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

research-summarization's Issues

ROUGE issue

Hi
I have problem with Rouge file. I try to run your code in Pycharm but it says AttributeError: 'Pythonrouge' object has no attribute 'setting'.

Could you help me to fix?

many thanks

_pickle.UnpicklingError: invalid load key, 'v'.

Problem description:
I am running this project(research-summarization) in PyCharm with the following environment:
Windows-10
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)]
NumPy 1.14.2
SciPy 1.1.0
gensim 3.8.1
FAST_VERSION 1

I am running this project with the default configuration:
"The Opinosis dataset is included, and main.py is configured to run on this dataset by default."
But I got the following problems, I need some advice for debugging.
Thank you very much.

X:\python-workspace\research-summarization-master\venv\Scripts\python.exe X:/python-workspace/research-summarization-master/main.py
Traceback (most recent call last):
File "X:/python-workspace/research-summarization-master/main.py", line 103, in
dataset_name=dataset_name
File "X:\python-workspace\research-summarization-master\enrichers\pipeline.py", line 17, in init
self.enrichers[e] = enrich_class(*args, **kwargs)
File "X:\python-workspace\research-summarization-master\enrichers\summarizer.py", line 89, in init
model = Word2Vec.load(files.get(model_path, model_path)).wv
File "C:\Users\UNI\Anaconda3\envs\python35\lib\site-packages\gensim\models\word2vec.py", line 1330, in load
model = super(Word2Vec, cls).load(*args, **kwargs)
File "C:\Users\UNI\Anaconda3\envs\python35\lib\site-packages\gensim\models\base_any2vec.py", line 1244, in load
model = super(BaseWordEmbeddingsModel, cls).load(*args, **kwargs)
File "C:\Users\UNI\Anaconda3\envs\python35\lib\site-packages\gensim\models\base_any2vec.py", line 603, in load
return super(BaseAny2VecModel, cls).load(fname_or_handle, **kwargs)
File "C:\Users\UNI\Anaconda3\envs\python35\lib\site-packages\gensim\utils.py", line 426, in load
obj = unpickle(fname)
File "C:\Users\UNI\Anaconda3\envs\python35\lib\site-packages\gensim\utils.py", line 1384, in unpickle
return _pickle.load(f, encoding='latin1')
_pickle.UnpicklingError: invalid load key, 'v'.

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.