Copy that! Editing Sequences by Copying Spans

06/08/2020
by   Sheena Panthaplackel, et al.
0

Neural sequence-to-sequence models are finding increasing use in editing of documents, for example in correcting a text document or repairing source code. In this paper, we argue that common seq2seq models (with a facility to copy single tokens) are not a natural fit for such tasks, as they have to explicitly copy each unchanged token. We present an extension of seq2seq models capable of copying entire spans of the input to the output in one step, greatly reducing the number of decisions required during inference. This extension means that there are now many ways of generating the same output, which we handle by deriving a new objective for training and a variation of beam search for inference that explicitly handle this problem. In our experiments on a range of editing tasks of natural language and source code, we show that our new model consistently outperforms simpler baselines.

READ FULL TEXT
research
03/24/2020

Felix: Flexible Text Editing Through Tagging and Insertion

We present Felix — a flexible text-editing approach for generation, desi...
research
08/10/2022

CoditT5: Pretraining for Source Code and Natural Language Editing

Pretrained language models have been shown to be effective in many softw...
research
10/28/2020

CopyNext: Explicit Span Copying and Alignment in Sequence to Sequence Models

Copy mechanisms are employed in sequence to sequence models (seq2seq) to...
research
09/26/2021

BioCopy: A Plug-And-Play Span Copy Mechanism in Seq2Seq Models

Copy mechanisms explicitly obtain unchanged tokens from the source (inpu...
research
09/02/2020

Tree Automata for Extracting Consensus from Partial Replicas of a Structured Document

In an asynchronous cooperative editing workflow of a structured document...
research
12/04/2018

A Retrieve-and-Edit Framework for Predicting Structured Outputs

For the task of generating complex outputs such as source code, editing ...
research
11/09/2019

Learning to Copy for Automatic Post-Editing

Automatic post-editing (APE), which aims to correct errors in the output...

Please sign up or login with your details

Forgot password? Click here to reset