# A Cloud-Native Web Application for Assisted Metadata Generation and Retrieval: THESPIAN-NER +
## 3 The Natural Language Processing Models
### Training Datasets  
Both models, CNN and transformer, have been trained with two different datasets:  
1. a set of Italian archaeological written documents, most of them publications in scientific journals; and
2. a set of Italian internal scientific reports, produced during the last 15 years at INFN-LABEC in Florence (Laboratorio di tecniche nucleari applicate all'Ambiente e ai BEni Culturali, or the Laboratory of Nuclear Techniques for Environment and Cultural Heritage) [23]. Both corpus were annotated by using the open-source program INCEpTION [24]. We will thus name ArcheoNER the model trained on the first dataset, and hsNER the model trained on the second. The ArcheoNER dataset consists of i) 92 Italian-written archaeological documents containing 5230 entities, ii) nine entity labels, chosen for their relevance in the archaeological sector and according to their compatibility with top-level classes of the CRMs ontology. The labels are name, three-letter label, and HEX code for HTML rendering. By using the open-source add-on library Display, it is possible to render the annotated text as HTML, where named entities are highlighted by using a hexadecimal (HEX) colour. Such a HEX colour is employed in the web application as a visual aid to users, in order to visually discriminate entities among NER labels. Figure 3: Visual schema for the spaCy models. From [19]. (**a**) spaCy CNN model pipeline. (**b**) spaCy transformer model pipeline. (**c**) Generic spaCy architecture. Artefect (ART, # 6196A1), Site (SIT, # DAE60), Person (PER, # BP98D0), Time span (TSP, # 61A6A1), Activity (ACT, # [12159), Organisation (ORG, # B869A1), Place (LOC, # EDE89B), Period (PRD, # ABEF0), Biological remains (BIO, # 89 CBCA) The hsNER dataset consists of 43 Italian-written scientific reports (provided by LABEC) containing 5676 entities. In this case, 14 labels have been chosen for relevance and their compatibility with the CRM's ontology, extending the previous as follows. Artefect (ART, # 6196A4), Person (PER, # BP98D0), Time span (TSP, # 61A6A1), Activity (ACT, # [12158], Organisation (ORG, # [8669A1], Place (LOC, # EDE89B), Natural object (BIO, # 89 CBCA), Sample (SAM, # 844A1), Analysis (ANL, # [09497]), Material (MAT, # FSC471), Method (MET, # A2 DPCE), Device (DEV, # FADBD8), Software (SOF, # [667E22], Result (RES, # [88D68D]) The scientific reports adopted for the present study refer to analysis carried out at the LABEC laboratory, the INFN-CHNet node based in Florence (Italy). The analysis reported are either X-ray fluorescence (XRF) imaging of pictorial artworks and radiocarbon dating of various samples, of either natural objects or artefacts. The labels defined for ArcheoNER and hsNER have been chosen by taking into account their relevance in respect to the topic addressed (either archaeological or heritage-scientific) and by considering their relationship with the THESPIAN-Mask JSON/XML entries and the relative CRM's ontology (classes, properties). From a certain perspective, hsNER extends ArcheoNER, by adding scientifically relevant entity labels, but it does not contain only archaeologically based labels, such as PRD and SIT (see Table 1). Due to the nature of the hsNER dataset, it could have been difficult to fine tune the training on those entities with it. For this reason, we are planning to increase the dataset by providing those labels too. One of the major issues faced in the creation of the training dataset, for both ArcheoNER and hsNER, is its construction with the right amount and quality of data. In this respect, the Italian-written documents have been chosen carefully by imposing a strong constraint on their nature. Because the service is used by researchers to (semi)automatically create queries and fill in metadata forms related to their research analysis reports, the training