# Conditional Knowledge Extraction Using Contextual Information Enhancement
## 1 Introduction  
Information extraction [1] using deep learning has been discussed in depth in both scientific research and industrial application across various domains. Information extraction enables the automatic extraction of entities, relations, events, and others from natural language text. It plays a pivotal role in domain knowledge constructions, which is crucial for knowledge-based intelligent applications. Among various information extraction tasks, relation extraction [2] is designed to extract the relations contained in the text between entities. A complete relation extraction consists of entity extraction and relation classification. The entity extraction sub-process, also known as named entity recognition, detects and classifies the entities in a sentence; the relation classification sub-process determines the semantic relation between two entities in a given sentence, which is a multi-category classification problem. Sometimes these two tasks can be integrated into a joint relation extraction framework [3]. In the industrial field, the knowledge contained in device-related documents is crucial for device manufacturing and maintenance. Therefore, analyzing the language structure of documents and extracting device knowledge can provide insight into related information. Within this device knowledge, conditional information plays a pivotal role. We conducted a statistical analysis of industrial documents, which shows that 6.25% of all sentences containconditional phrases, and the proportion reaches 16.5% among sentences with important relations. Relation extraction has been discussed in depth in different domains using different methods. However, most existing research treats extracted triplets as simple, static facts without considering the condition of the facts. We argue that facts are relative to the conditions they apply to. Without knowing the relevant conditions, facts can be incomplete, contradictory, or erroneous. These errors and this missing information will propagate to the downstream tasks and cause failures. For example, given the sentence \"fishing vessels should travel at speeds greater than 18 km/h under normal conditions and travel at speeds less than 22 km/h under emergencies,\" conventional relation extract will find two triplets: \"travel_at_speeds-greater_than-18 km/h\" and \"travel_at_speeds-less_than-22 km/h.\" However, the conditional phrases \"under_normal_conditions\" and \"under_emergency_conditions\" are not recognized, nor can they figure out which speed is allowed under which condition; decision-making without such information would be impossible. To address this issue, we propose to extract conditions together with relations by adding a condition recognition process on top of traditional entity relation extraction. More specifically, for the conditional phrase extraction problem, this paper first uses a hybrid approach of rule-based extraction and similarity-based matching to identify conditional phrases. After extracting conditional phrases, the correspondences between conditions and relational triples are constructed. In the example presented in Figure 1, \"under_normal conditions\" needs to correspond to the relation triplets generated from \"travel_at_speeds-greater_than-18 km/h,\" and \"under_emergencies\" needs to correspond to the relation triplets from \"travel_at_speeds-less_than-22 km/h.\"  
Figure 1: Sentence information matching results: “fishing vessels should travel at speeds greater than 18 km/h under normal conditions and travel at speeds less than 22 km/h under emergencies”. For the conditional-phrase and triplet-matching problem, this paper uses dependency parsing techniques to assign weights based on the existence of dependencies in the sentence and the semantic information of the sentence as the attention mechanism. Moreover, this paper fine-tuned the pre-training model to allow sentences to learn more conditional information. The main contributions of this paper to the enhancement effect compared to the baseline model are:  
1.