discopy: A Neural System for Shallow Discourse Parsing
Summary
Shallow discourse parsing (SDP) finds discourse relations in text. Each relation has two arguments and a sense, and it is either explicit (signalled by a connective) or non-explicit. The paper presents discopy, an open-source Python framework for building end-to-end SDP pipelines. Each component follows a shared interface (fit, parse, eval) and adds its predictions to the document as it moves through the pipeline, so parts can be swapped easily. The demonstration pipeline is fully neural and uses no hand-crafted linguistic features. Its components cover connective detection with sense classification, explicit argument extraction, and implicit/EntRel/NoRel classification. All of them share one set of precomputed contextualized embeddings from BERT-family models. Evaluation follows the CoNLL 2016 Shared Task setup on PDTB Section 23 and the Wikipedia blind test. Compared with the top 2016 systems (ecnucs, oslopots), the parser is better on most explicit-relation measures but clearly weaker on implicit argument spans. A FastAPI/VueJS web front end lets users inspect parser output. This gives SDP a reusable, modern toolkit with released pretrained models.
Key points
- Code, documentation and pretrained models are available at github.com/rknaebel/discopy. Embeddings are built with Hugging Face transformers by concatenating the last four hidden layers for each token's first sub-token.
- Six encoders were tested: bert-base/large, roberta-base/large and albert-base/large. Base models generally beat large ones, and albert-base did well despite having the fewest parameters.
- Explicit connective F1 (strict, WSJ) reached up to 96.87 with albert-base, against 93.96 for ecnucs and 94.43 for oslopots. bert-base reached an explicit Arg1+Arg2 F1 of 51.79, against 44.31 for ecnucs.
- Explicit Arg1 identification stays slightly behind the baselines. Implicit argument extraction uses a simple adjacent-sentence heuristic and scores much lower (about 39–40 strict Arg1+Arg2 F1 on WSJ vs. 50.83–53.47 for the baselines).
- Results are reported under strict (exact match) and partial (≥70% overlap) evaluation. The web interface highlights arguments and connectives and can connect to a parser via REST API.
Cited by
- Investigating Explicitation of Discourse Connectives in Translation using Automatic Annotations
- eRST: A Signaled Graph Theory of Discourse Relations and Organization
Cite
@inproceedings{knaebel2021discopy,
title = {{discopy: A Neural System for Shallow Discourse Parsing}},
author = {Knaebel, René},
booktitle = {Proceedings of the 2nd Workshop on Computational Approaches to Discourse},
year = {2021},
doi = {10.18653/v1/2021.codi-main.12},
url = {https://doi.org/10.18653/v1/2021.codi-main.12}
}References
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. ↗
- Shima Gerani, Yashar Mehdad, Giuseppe Carenini, Raymond T. Ng, and Bita Nejat. 2014. Abstractive summarization of product reviews using discourse structure. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1602–1613, Doha, Qatar. Association for Computational Linguistics. find
- Freya Hewett, Roshan Prakash Rane, Nina Harlacher, and Manfred Stede. 2019. The utility of discourse parsing features for predicting argumentation structure. In Proceedings of the 6th Workshop on Argument Mining, pages 98–103, Florence, Italy. Association for Computational Linguistics. find our card
- René Knaebel and Manfred Stede. 2020. Contextualized embeddings for connective disambiguation in shallow discourse parsing. In Proceedings of the First Workshop on Computational Approaches to Discourse, pages 65–75, Online. Association for Computational Linguistics. find our card
- René Knaebel, Manfred Stede, and Sebastian Stober. 2019. Window-based neural tagging for shallow discourse argument labeling. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 768–777, Hong Kong, China. Association for Computational Linguistics. find
- Li Liang, Zheng Zhao, and Bonnie Webber. 2020. Extending implicit discourse relation recognition to the PDTB-3. In Proceedings of the First Workshop on Computational Approaches to Discourse, pages 135– 147, Online. Association for Computational Linguistics. ↗ our card
- Ziheng Lin, Hwee Tou Ng, and Min-Yen Kan. 2014. A pdtb-styled end-to-end discourse parser. Natural Language Engineering, 20:151–184. find
- Stephan Oepen, Jonathon Read, Tatjana Scheffler, Uladzimir Sidarenka, Manfred Stede, Erik Velldal, and Lilja Øvrelid. 2016. OPT: Oslo–Potsdam– Teesside. pipelining rules, rankers, and classifier ensembles for shallow discourse parsing. In Proceedings of the CoNLL-16 shared task, pages 20– 26, Berlin, Germany. Association for Computational Linguistics. find our card
- Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. GloVe: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532–1543, Doha, Qatar. Association for Computational Linguistics. ↗
- Emily Pitler and Ani Nenkova. 2009. Using syntax to disambiguate explicit discourse connectives in text. In Proceedings of the ACL-IJCNLP 2009 Conference Short Papers, pages 13–16, Suntec, Singapore. Association for Computational Linguistics. find our card
- Rashmi Prasad, Nikhil Dinesh, Alan Lee, Eleni Milt-sakaki, Livio Robaldo, Aravind Joshi, and Bonnie Webber. 2008. The penn discourse treebank 2.0. In In Proceedings of LREC. find our card
- Lianhui Qin, Zhisong Zhang, and Hai Zhao. 2016. Shallow discourse parsing using convolutional neural network. In Proceedings of the CoNLL-16 shared task, pages 70–77, Berlin, Germany. Association for Computational Linguistics. find our card
- Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. 2018. On the convergence of adam and beyond. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. Open-Review.net. ↗
- Nianwen Xue, Hwee Tou Ng, Sameer Pradhan, Attapol Rutherford, Bonnie Webber, Chuan Wang, and Hongmin Wang. 2016. CoNLL 2016 shared task on multilingual shallow discourse parsing. In Proceedings of the CoNLL-16 shared task, pages 1– 19, Berlin, Germany. Association for Computational Linguistics. ↗ our card
- Yang Zhong, Chao Jiang, Wei Xu, and Junyi Jessy Li. 2020. Discourse level factors for sentence deletion in text simplification. In AAAI. find
- Attapol Rutherford, Vera Demberg, and Nianwen Xue. 2017. A systematic study of neural discourse models for implicit discourse relation. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 281–291, Valencia, Spain. Association for Computational Linguistics. ↗ our card
- Niko Schenk, Christian Chiarcos, Kathrin Donandt, Samuel Rönnqvist, Evgeny Stepanov, and Giuseppe Riccardi. 2016. Do we really need all those rich linguistic features? a neural network-based approach to implicit sense labeling. In Proceedings of the CoNLL-16 shared task, pages 41–49, Berlin, Germany. Association for Computational Linguistics. find
- Evgeny Stepanov and Giuseppe Riccardi. 2016. UniTN end-to-end discourse parser for CoNLL 2016 shared task. In Proceedings of the CoNLL-16 shared task, pages 85–91, Berlin, Germany. Association for Computational Linguistics. find our card
- Jianxiang Wang and Man Lan. 2016. Two end-to-end shallow discourse parsers for English and Chinese in CoNLL-2016 shared task. In Proceedings of the CoNLL-16 shared task, pages 33–40, Berlin, Germany. Association for Computational Linguistics. find our card
- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier-ric Cistac, Tim Rault, Remi Louf, Morgan Funtow-icz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 2020. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online. Association for Computational Linguistics. ↗ our card
- Nianwen Xue, Hwee Tou Ng, Sameer Pradhan, Rashmi Prasad, Christopher Bryant, and Attapol Rutherford. 2015. The CoNLL-2015 shared task on shallow discourse parsing. In Proceedings of the Nineteenth Conference on Computational Natural Language Learning - Shared Task, pages 1–16, Beijing, China. Association for Computational Linguistics. find our card
This page in Markdown → https://md.research.elamur.ai/free/papers/knaebel-2021-discopy-neural-system-shallow-discourse/