# Supporting the Management of Rolling Stock Maintenance with an Ontology-Based Virtual Depot
## 5 Acquisition of Fleet- and Depot-Specific Maintenance Knowledge
### Populating RailMain-KG Schema  
RailMain-KG refers to the railway maintenance knowledge graph, which is the result of populating the RailMain-KG Schema with industrial data. For the case study presented in this paper, RailMain-KG is populated with data extracted from 246 Vehicle Maintenance Instructions (VMIs) provided by a collaborating Rolling Stock manufacturer. These documents are formatted as HyperText Markup Language (HTML) pages that describe a maintenance task applied on a component, subassembly or vehicle system. Context-wise, VMIs contain information that covers the following topics. Figure 3: RailMain-KG schema. **General information**: a high-level textual description of a maintenance task including its name, the component it has been applied on, and its applicability in terms of vehicle types and priority. The latter refers to enumerated labels that highlight the potential risk associated with the operation of a train when the specified task is not performed. **Resource requirements**: tabular data detailing the materials and tools, along with the respective descriptions and quantities, that are essential for the task being documented. **Procedure**: text formatted as an enumerated list of instructions (steps) that describe how to carry out the task in question; occasionally supplementary material is provided to encompass safety warnings and other miscellaneous notes. Although HTML tags introduce a primitive structure over VMIs contents, the main information components are encoded as free-form text. Organising this information into rigid structures is addressed by employing a multi-step knowledge acquisition procedure (Figure 4), where relevant information from VMIs is extracted using RailMain-KG schema as a guide. As a first step of the Information extraction, various Extensible Stylesheet Language Transformations (XSLT) are employed that use pattern-matching templates to organise the HTML-based content of each VMI into thematic sections. Six sections are introduced that include title, priority, vehicle eligibility, required resources (including both materials and tools), safety warnings, and procedure. Subsequently, a series of natural language processing tasks applied to the text of each section identify and link textual elements with the key concepts of the RailMain-KG schema (Section 5.1). In particular, each thematic section is decomposed as described below. The **Title** of a VMI provides an overview of the maintenance activity, for example \"Engine--Coolant Filter\". Further application of regular expressions and phrase matching on the title extracts the following information about the maintenance task: (a) descriptive name of the task, (b) type of the activity (e.g., change), and (c) component it is applied on (e.g., engine). In terms of **eligible vehicles, safety warnings**, and **procedures**, regular expressions are employed to break down each section into indivisible elements and link them to the corresponding concepts within RailMain-KG. Text about procedures is converted from enumerated steps into an actual list of individual texts that represent individual steps of the procedure. In terms of the extracted elements within text about safety warnings, vehicle categories and priority, they are considered instances of namesake entities within the schema. The extraction phase is concluded with the identification of the required resources of the VMI in question, along with their respective quantities. The diverse industrial terminology found within VMIs renders this step challenging, and thus, it is approached as an entity-linking task. The process involves mappings textual references of resources to concepts within the RailMain-KG schema using elastic search across an extensive list of industrial vocabularies that are provided by the collaborating manufacturer. These  
Figure 4: Overview of the knowledge acquisition pipeline. vocalularies are comprehensive compilations of industrial terms covering a broad range of materials and tools commonly associated with railway maintenance tasks.