• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Transformer for abstractive summarization on cnn/daily-mail and gigawords

TranSummar

Transformer for abstractive summarization

cnndm (with copy and coverage), epoch57:

---------------------------------------------
C ROUGE-1 Average_R: 0.41097 (95%-conf.int. 0.40861 - 0.41346)
C ROUGE-1 Average_P: 0.40874 (95%-conf.int. 0.40619 - 0.41141)
C ROUGE-1 Average_F: 0.39656 (95%-conf.int. 0.39451 - 0.39871)
---------------------------------------------
C ROUGE-2 Average_R: 0.17821 (95%-conf.int. 0.17590 - 0.18049)
C ROUGE-2 Average_P: 0.17781 (95%-conf.int. 0.17540 - 0.18037)
C ROUGE-2 Average_F: 0.17208 (95%-conf.int. 0.16990 - 0.17433)
---------------------------------------------
C ROUGE-3 Average_R: 0.09845 (95%-conf.int. 0.09640 - 0.10064)
C ROUGE-3 Average_P: 0.09844 (95%-conf.int. 0.09627 - 0.10069)
C ROUGE-3 Average_F: 0.09505 (95%-conf.int. 0.09307 - 0.09713)
---------------------------------------------
C ROUGE-4 Average_R: 0.06297 (95%-conf.int. 0.06109 - 0.06499)
C ROUGE-4 Average_P: 0.06329 (95%-conf.int. 0.06137 - 0.06537)
C ROUGE-4 Average_F: 0.06086 (95%-conf.int. 0.05908 - 0.06275)
---------------------------------------------
C ROUGE-L Average_R: 0.37912 (95%-conf.int. 0.37682 - 0.38160)
C ROUGE-L Average_P: 0.37726 (95%-conf.int. 0.37484 - 0.37987)
C ROUGE-L Average_F: 0.36593 (95%-conf.int. 0.36388 - 0.36810)
---------------------------------------------
C ROUGE-W-1.2 Average_R: 0.16602 (95%-conf.int. 0.16487 - 0.16715)
C ROUGE-W-1.2 Average_P: 0.27554 (95%-conf.int. 0.27362 - 0.27758)
C ROUGE-W-1.2 Average_F: 0.20031 (95%-conf.int. 0.19902 - 0.20156)
---------------------------------------------
C ROUGE-SU4 Average_R: 0.18191 (95%-conf.int. 0.17981 - 0.18403)
C ROUGE-SU4 Average_P: 0.18101 (95%-conf.int. 0.17890 - 0.18320)
C ROUGE-SU4 Average_F: 0.17496 (95%-conf.int. 0.17308 - 0.17693)

gigawords (no copy and no coverage), epoch18:

---------------------------------------------
C ROUGE-1 Average_R: 0.36144 (95%-conf.int. 0.34958 - 0.37330)
C ROUGE-1 Average_P: 0.37213 (95%-conf.int. 0.36018 - 0.38460)
C ROUGE-1 Average_F: 0.35586 (95%-conf.int. 0.34433 - 0.36747)
---------------------------------------------
C ROUGE-2 Average_R: 0.17568 (95%-conf.int. 0.16614 - 0.18606)
C ROUGE-2 Average_P: 0.18536 (95%-conf.int. 0.17463 - 0.19625)
C ROUGE-2 Average_F: 0.17467 (95%-conf.int. 0.16489 - 0.18467)
---------------------------------------------
C ROUGE-3 Average_R: 0.09628 (95%-conf.int. 0.08782 - 0.10555)
C ROUGE-3 Average_P: 0.10448 (95%-conf.int. 0.09482 - 0.11429)
C ROUGE-3 Average_F: 0.09643 (95%-conf.int. 0.08763 - 0.10558)
---------------------------------------------
C ROUGE-4 Average_R: 0.05583 (95%-conf.int. 0.04812 - 0.06380)
C ROUGE-4 Average_P: 0.06323 (95%-conf.int. 0.05447 - 0.07197)
C ROUGE-4 Average_F: 0.05653 (95%-conf.int. 0.04871 - 0.06425)
---------------------------------------------
C ROUGE-L Average_R: 0.33497 (95%-conf.int. 0.32382 - 0.34678)
C ROUGE-L Average_P: 0.34521 (95%-conf.int. 0.33414 - 0.35770)
C ROUGE-L Average_F: 0.33005 (95%-conf.int. 0.31905 - 0.34173)
---------------------------------------------
C ROUGE-W-1.2 Average_R: 0.20852 (95%-conf.int. 0.20134 - 0.21619)
C ROUGE-W-1.2 Average_P: 0.32259 (95%-conf.int. 0.31225 - 0.33452)
C ROUGE-W-1.2 Average_F: 0.24404 (95%-conf.int. 0.23594 - 0.25286)
---------------------------------------------
C ROUGE-SU4 Average_R: 0.20404 (95%-conf.int. 0.19456 - 0.21456)
C ROUGE-SU4 Average_P: 0.21410 (95%-conf.int. 0.20406 - 0.22493)
C ROUGE-SU4 Average_F: 0.19664 (95%-conf.int. 0.18736 - 0.20654)

How to run:

  • Python 3.7, Pytorch 0.4+
  • Download the processed dataset from: https://drive.google.com/file/d/1EUuEMBSlrlnf_J2jcAVl1v4owSvw_8ZF/view?usp=sharing , or you can download the original FINISHED_FILES from: https://github.com/JafferWilson/Process-Data-of-CNN-DailyMail , and process by yourself.
  • Modify the path in prepare_data.py then run it: python prepare_data.py
  • Training: python -u main.py | tee train.log
  • Tuning: modify main.py: is_predicting=true and model_selection=true, then run "bash tuning_deepmind.sh | tee tune.log"
  • Testing: modify main.py: is_predicting=true and model_selection=false, then run "python main.py you-best-model (say cnndm.s2s.gpu4.epoch7.1)", go to "./deepmind/result/" and run $ROUGE$ myROUGE_Config.xml C, you will get the results.
  • The Perl Rouge package is enough, I did not use pyrouge.

Reference:

More Repositories

1

App-DL

Deep Learning and applications in Startups, CV, NLP
801
star
2

AIStartups

Startups about artificial intelligence. (DM, ML, NLP, CV...)
595
star
3

SongNet

Code for ACL 2020 paper "Rigid Formats Controlled Text Generation":https://www.aclweb.org/anthology/2020.acl-main.68/
Python
226
star
4

neural-summ-cnndm-pytorch

Neural abstractive summarization (seq2seq + copy (or pointer network) + coverage) in pytorch on CNN/Daily Mail
Python
203
star
5

Guyu

Chinese GPT2: pre-training and fine-tuning framework for text generation
Python
188
star
6

JRNN

LSTM and GRU in JAVA
Java
114
star
7

PG_BOW_DEMO

Image Classification using Bag of Words and Spatial Pyramid BoW
C++
110
star
8

hierarchical-encoder-decoder

Hierarchical encoder-decoder framework for sequences of words, sentences, paragraphs and documents using LSTM and GRU in Theano
Python
109
star
9

TtT

code for ACL2021 paper "Tail-to-Tail Non-Autoregressive Sequence Prediction for Chinese Grammatical Error Correction"
Python
99
star
10

PG_Curve

Matlab code for computing and visualization: Confusion Matrix, Precision/Recall, ROC, Accuracy, F-Measure etc. for Classification.
Objective-C
91
star
11

PG_DEEP

demo of deep belief nets
C++
69
star
12

rnn-theano

RNN(LSTM, GRU) in Theano with mini-batch training; character-level language models in Theano
Python
69
star
13

variational-autoencoder-theano

Variational Autoencoders (VAEs) in Theano for Images and Text
Python
55
star
14

DRGD-LCSTS

code for "Deep Recurrent Generative Decoder for Abstractive Text Summarization"
Python
53
star
15

dialogue-hred-vhred

HRED VHRED VHCR for Multi-Turn Dialogue Systems
Python
44
star
16

lipiji.github.io

HTML
31
star
17

datasets

datasets for NLP research
24
star
18

HFT

code:Hidden factors and hidden topics: Understanding rating dimensions with review text.
Shell
23
star
19

uChecker

Code of the COLING22 paper "uChecker: Masked Pretrained Language Models as Unsupervised Chinese Spelling Checkers"
18
star
20

rnn-pytorch

study pytorch
Python
15
star
21

NRT-theano

Code for our SIGIR'2017 paper "Neural Rating Regression with Abstractive Tips Generation for Recommendation"
Python
14
star
22

data-summ-cnn_dailymail

non-anonymized cnn/dailymail dataset for text summarization
Python
12
star
23

JLBFGS

Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) in Java
Java
10
star
24

PG_PageRank

pagerank using mapreduce format
Shell
9
star
25

vae-salience

"Salience Estimation via Variational Auto-Encoders for Multi-Document Summarization"
HCL
9
star
26

PG_PLSA

plsa demo in python
Python
7
star
27

neural-dialogue-s2s-weibo-py3

Python
7
star
28

world2vec

Pre-trained word and phrase vectors
7
star
29

neural-topic-model

neural topic model based on VAE - theano
Python
6
star
30

stopwords

6
star
31

t5_summarization

Python
6
star
32

language_model_transformer

language model via transformer
Python
6
star
33

vae-salience-ramds

"Reader-Aware Multi-Document Summarization: An Enhanced Model and The First Dataset"
HCL
6
star
34

gan-bow-text

Generative Adversarial Network (GAN) for text modeling
Python
5
star
35

bert_zh_open200g_wordpiece

Python
5
star
36

jilp

Java ILP is a simplified java interface to (mixed) integer linear programming solvers like, e.g., lp_solve, Glpk, SAT4J (0-1 ILP), CPLEX, or Mosek.
Java
4
star
37

cws-seq2seq

Chinese Word Segment using Seq2Seq Framework.
4
star
38

SwarmRank

Particle Swarm Optimization for Classification and Recommender Systems
MATLAB
4
star
39

PG_ROC_PR_R

ROC and PR curve using R
R
4
star
40

collaborative-topic-regression

C++
4
star
41

textrank_keyword_summary

textrank based keywords extraction and summarization
Python
3
star
42

interpretability-methods

gradients based interpretability methods
Python
3
star
43

tokenizer_zh

Python
3
star
44

TextAdventure

3
star
45

pointer_generator_csc_lstm

Python
3
star
46

PG_LINEAR

L_p-Regularized logistic regression using Gradient Decent (batch)
Shell
3
star
47

TopCJ

Top Conference Timeline
3
star
48

PATG

Code for WWW2019 paper "Persona-Aware Tips Generation"
2
star
49

gan-intro-theano

Generative Adversarial Networks (GAN) example in Theano.
Python
2
star
50

water_level_prediction

Python
2
star
51

S5

2
star
52

adversarial-variational-autoencoders

Adversarial Variational Auto-Encoders (AVAEs) in Theano
Python
2
star
53

TextRefiner

Java
1
star
54

neural-fig2txt

Python
1
star
55

VecComp

Vector completion using sparse coding
Python
1
star
56

instruction_data

Python
1
star
57

corr

Python
1
star
58

pointer_generator_transformer

Python
1
star
59

WebHarvester

Web-Harvest is Open Source Web Data Extraction tool written in Java. This is an extension of the original version.
Java
1
star
60

Finetrain-BERT

Python
1
star
61

big_tpl_zh_10_base

Python
1
star
62

mlp-theano

MLP using Theano
Python
1
star
63

civrealm

CivRealm: A Learning and Reasoning Odyssey for Decision-Making Agents: https://civrealm.github.io/civrealm/
Python
1
star
64

RAG4DocReader

llamaindex testing
Python
1
star