# A Text-Generated Method to Joint Extraction of Entities and Relations
## 1 Introduction
[PERSON]'s [9] work is similar to ours, which is based on a sequence-to-sequence learning framework, but it cannot extract multi-word entities because of the model design. To tackle this problem, we completely convert entity-relation extraction task into text generation task. We generate entity pairs and relational representation words according to source texts, without any additional feature engineering. The task of generating target texts from source texts, including text summarization [12; 13], machine translation [14; 15]. In the text summarization task, target texts are keywords or key sentences that are copied from source texts or generated from vocabulary through the semantic understanding of source text contents. For the relation extraction task, our target texts are the entity pairs contained in the source texts and their corresponding relations, i.e., relational triplets. In this paper, we adopt a sequence-to-sequence framework with the pointer, where using the encoder to obtain the semantic encoding vector and the decoder with pointer is used to generate entities or relations. Inspired by the text summarization paper [16], we also use a generation probability \(p_{gen}\) as a soft switch to select whether the current decoding time is more likely to copy words from the original input or to generate words from the vocabulary. According to the specific situation of the original input, one or more groups of relational triplets are generated, thereby implementing the joint extraction of entities and relations. Entities can be repeated in multiple triplets, which can solve the problem of overlapped multiple relational triplet extraction. The main contributions of our work are concluded as follows: \begin{table}
\begin{tabular}{c c c} \hline \hline
**Class** & **Sentence** & **Relation Triples** \\ \hline Normal & S1: Chicago is in the United States. & \textless{}The United States, **contains**, Chicago\textgreater{} \\ \hline \multirow{2}{*}{Entity Pair Overlap} & S2: News of the list’s existence unnerved & \textless{}Sudan, **contains**, Khartoum\textgreater{} \\  & officials in Khartoum, Sudan’s capital. & \textless{}Sudan, **capital**, Khartoum\textgreater{} \\ \hline \multirow{2}{*}{Single Entity Overlap} & S3: [PERSON], 23, who lives in Los Angeles, & \textless{}[PERSON], **placelived**, Los Angeles\textgreater{} \\  & California. & \textless{}California, **contains**, Los Angeles\textgreater{} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Examples of three classes: Normal, Entity Pair Overlap, and Single Entity Overlap. S1 belongs to Normal class because there are no overlaps in its triplets; S2 belongs to Entity Pair Overlap class since the entity pair (Sudan, Khartoum) are overlapped; S3 belongs to Single Entity Overlap class because the entity _Los Angeles_ is overlapped and its two triplets have no overlapped entity pairs. 1. We completely convert the entity-relation extraction to the text generation task, and use a unified decoding method to generate entities and relational expressions as target text to realize the joint extraction of entities and relations. 2. Based on the text generation framework, the model is designed to generate multiple groups of relational triplets. Entities can be repeated in multiple triplets to solve the problem of overlapped multiple relational tuples. 3. We conduct experiments on NYT10 and NYT11 public datasets, and the experimental results show that we proposed method outperforms state-of-the-art with 4.7% and 11.4% improvements in F1 score, respectively. The remainder of the paper is organized as follows: Section 2 reviews the related works. Section 3 describes the proposed method in detail. In Section 4, datasets and settings used in the experiment are presented and Section 5 shows the results. Section 6 discusses the performance comparison between our model and the baseline methods. Section 7 concludes the paper.