GithubHelp home page GithubHelp logo

coref_dial_summ's Introduction

Introduction

One implementation of the paper "Coreference-Aware Dialogue Summarization" in SIGDIAL 2021 (Best Paper Award).

Package Requirements

  1. pytorch==1.7.1
  2. transformers==4.8.2
  3. click==7.1.2
  4. sentencepiece==0.1.92
  5. allennlp==2.6.0
  6. allennlp-models==2.6.0

Dialogue Coreference Resolution

  1. Download the off-the-shelf model from AllenNLP:
    allennlp-public-models/coref-spanbert-large-2021.03.10
  2. You can obtain the coreference resolution from the model with the script:
    ./dialogue_coreference/dialogue_coreference.py
  3. For dialogue coreference resolution post-processing, you can call the function in the file:
    ./dialogue_coreference/reading_and_writing_as_input_keep_SPAN.py
  4. For end-to-end conversation samples construction with coreference information, please run or refer to the script:
    ./dialogue_coreference/end2end_build_data.py
  5. Noted that the processed samples will be tokenized via the RoBERTa/BART sub-word tokenization.

Coref-Aware Summarization

  1. The data after dialogue coreference resolution can be used to train the coref-aware summarizer.
  2. You can read the samples in text format, then read the tokenized id/coreference information from each row.
    For instance, each row in the file train.source contains information as below:
    Text Tokens after BART tokenization ##### Token IDs after BART tokenization ##### Start Token ID of One Coreference-Linked Span ##### Target Token ID of One Coreference-Linked Span ##### Token Number after BART tokenization
  3. For our implementation, you will need to replace the original generation_utils.py and modeling_bart.py in the Transformers library, with the corresponding files in this repo.
  4. You can search the keyword 'coref' in our updated generation_utils.py and modeling_bart.py to see the implementation details.
  5. See running configurations in the global_config.py file.
  6. We provide the self-attention-layer and Transformer head manipulation methods to incorporate coreference information, which are computationally efficient.

Generated Summaries for SAMSum Corpus

See the predictions from the coreference-aware summarization model of SAMSum test set in ./model_outputs/

Citation

@inproceedings{liu-etal-2021-coreference,
    title = "Coreference-Aware Dialogue Summarization",
    author = "Liu, Zhengyuan and Shi, Ke and Chen, Nancy",
    booktitle = "Proceedings of the 22nd Annual Meeting of the Special Interest Group on Discourse and Dialogue",
    month = jul,
    year = "2021",
    address = "Singapore and Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2021.sigdial-1.53",
    pages = "509--519",
}

coref_dial_summ's People

Contributors

seq-to-mind avatar

Stargazers

Sweta Agrawal avatar  avatar Hwq avatar wangsl avatar Suyu Liu avatar William Horton avatar  avatar Yongxin Zhou avatar ZhipengLiu avatar Farley Knight avatar  avatar  avatar  avatar Bin Wang avatar  avatar Xiaohan Yang avatar  avatar Eunhwan Park avatar Aiah avatar

Watchers

 avatar

coref_dial_summ's Issues

How to get the result of Coreference Resolution?

I've run dialogue_coreference.py and end2end_build_data.py.
However I get the result like this:
_# ĠHannah : ĠHey , Ġdo Ġyou Ġhave ĠBetty 's Ġnumber ? Ġ# ĠAmanda : ĠLem me Ġcheck Ġ# ĠHannah : Ġ< file _ gif > Ġ# ĠAmanda : ĠSorry , Ġcan 't Ġfind Ġit . Ġ# ĠAmanda : ĠAsk ĠLarry Ġ# ĠAmanda : ĠHe Ġcalled Ġher Ġlast Ġtime Ġwe Ġwere Ġat Ġthe Ġpark Ġtogether Ġ# ĠHannah : ĠI Ġdon 't Ġknow Ġhim Ġwell Ġ# ĠHannah : Ġ< file _ gif > Ġ# ĠAmanda : ĠDon 't Ġbe Ġshy , Ġhe 's Ġvery Ġnice Ġ# ĠHannah : ĠIf Ġyou Ġsay Ġso .. Ġ# ĠHannah : ĠI 'd Ġrather Ġyou Ġtexted Ġhim Ġ# ĠAmanda : ĠJust Ġtext Ġhim Ġ# ĠHannah : ĠUr gh .. ĠAlright Ġ# ĠHannah : ĠBye Ġ# ĠAmanda : ĠBye Ġbye ##### [10431, 11029, 35, 11468, 6, 109, 47, 33, 16666, 18, 346, 116, 849, 10641, 35, 13956, 1794, 1649, 849, 11029, 35, 28696, 21710, 1215, 47324, 15698, 849, 10641, 35, 19719, 6, 64, 75, 465, 24, 4, 849, 10641, 35, 12738, 6045, 849, 10641, 35, 91, 373, 69, 94, 86, 52, 58, 23, 5, 2221, 561, 849, 11029, 35, 38, 218, 75, 216, 123, 157, 849, 11029, 35, 28696, 21710, 1215, 47324, 15698, 849, 10641, 35, 1599, 75, 28, 9152, 6, 37, 18, 182, 2579, 849, 11029, 35, 318, 47, 224, 98, 7586, 849, 11029, 35, 38, 1017, 1195, 47, 25199, 123, 849, 10641, 35, 1801, 2788, 123, 849, 11029, 35, 9163, 4147, 7586, 41881, 849, 11029, 35, 36255, 849, 10641, 35, 36255, 15687] ##### [13, 19, 27, 34, 37, 42, 46, 56, 58, 62, 65, 73, 80, 85, 88, 93, 95, 98, 100, 102, 106, 108, 115, 119] ##### [6, 1, 13, 10, 27, 37, 8, 19, 56, 44, 58, 42, 62, 65, 73, 85, 93, 88, 80, 98, 100, 95, 108, 102] ##### 123

where is the result of Coreference Resolution?

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.