# Wikidata Support in the Creation of Rich Semantic Metadata for Historical Archives
## 3 Mapping from the Wikidata Semantic Model to HERO
### Mappings between Properties and Mappings Between Complex Patterns
\begin{table}
\begin{tabular}{c c c} \hline
**Mapping \#** & **Wikidata Pattern** & **HERO Pattern** \\ \hline
1 & \textless{}?X instance of(P31) \(\gamma\)Y \textgreater{} & \textless{}?X rdf:type Map-c(\(\gamma\)Y)\textgreater{} \\ \hline
2 & \textless{}?X place of birth(P19) \(\gamma\)Y\textgreater{} & \textless{}?X hasBirthPlace?Y\textgreater{} \\ \hline
3 & \textless{}?X employer(P 108) \(\gamma\)Y\textgreater{} & \textless{}?X isAffiliatedTo?Y\textgreater{} \\  & + quals: & \textless{}?H1 rdf:type Profession\textgreater{} \\  & [\textless{}start time(P580) \(\gamma\)T1\textgreater{}, & \textless{}?X isClassifiedBy?H1\textgreater{} \\  & \textless{}end time(P 582) \(\gamma\)T2\textgreater{}, & \textless{}?X institutionalizes?H1\textgreater{} \\  & \textless{}position held(P39) \(\gamma\)Z\textgreater{}] & [\textless{}?H1 subRoleOf Map-c (\(\gamma\)Z)\textgreater{}] conds:[Map-c(\(\gamma\)Z) a Role] \\  & & \textless{}?H2 rdf:type \\  & & TemporaryAffiliationToOrganization\textgreater{} \\  & & \textless{}?H2 \\  & & hasAffiliationToOrganizationEntityElement?X\textgreater{} \\  & & \textless{}?H2 hasAffiliationToOrganizationOrganizationEntiElement?Y\textgreater{} \\  & & \textless{}?H2 hasTermporalParameterElement?H3\textgreater{} \\  & & \textless{}?H4 rdf:type TemporaryClassification\textgreater{} \\  & & \textless{}?H4 hasClassificationClassifiedEntityElement \\  & & \textgreater{}?X\textgreater{} \\  & & \textless{}?H4 \\  & & hasClassificationClassifyingConceptElement \\  & & \textgreater{}H1\textgreater{} \\  & & \textless{}?H4 hasTemporalParameterElement?H3\textgreater{} \\  & & \textless{}?H3 rdf:type TimeInterval\textgreater{} \\  & & \textless{}?H3 intBeginsIn?T1\textgreater{} \\  & & \textless{}?H3 intEndsIn?T2\textgreater{} \\ \hline
4 & \textless{}?X killed by(P157) \(\gamma\)Y\textgreater{} & \textless{}?H1 rdf:type Homicide\textgreater{} \\  & & \textless{}?H1 hasPatient?X\textgreater{} \\  & & \textless{}?H1 hasAgent?Y \textgreater{} \\  & & \textless{}?H2 rdf:type PersonDeath\textgreater{} \\  & & \textless{}?H2 hasPatient?X \textgreater{} \\  & & \textless{}?H1 isCausalFactorOf?H2\textgreater{} \\ \hline \end{tabular}
\end{table} 
Table 3: Four sample mappings from Wikidata description patterns to HERO ones. Variables are prefixed with the question mark (e.g.,?_X_). Variables occurring in Wikidata patterns are intended as universally quantified, while those occurring only in HERO patterns are intended as existentially quantified. For the sake of readability, the latter are named _?H1,...?H4. Map-c(\(\gamma\)Y)_ is the result of the mapping of the Wikidata category?Y to a HERO category; in mapping 3, _quals_ indicates Wikidata qualifiers, and _contds_ expresses conditions for the associated optional triple to be created. C wdt:P31?c. ]} union {  select?c where {  C wdt:P279?c.  } } }  
Consider, as an example, the Wikidata statement _<[PERSON], instance of (P31), human (Q5)>_. According to mapping 1 in Table 3, this triple is translated in HERO as _<[PERSON], rdftype, Map-c(human (Q5))>_. Since no direct correspondence (in the sense specified in Section 3.1) is defined for _human_ (Q5), _Map-c_ enqueues all its parents, namely: the Wikidata categories _person_ (Q215627), _organisms known by a particular common name_ (Q55983715), _natural person_ (Q154954), and _omniove_ (Q164509), as shown in Figure 6. _Map-c_ now considers _person_ (Q215627), for which a mapping is defined to the _PhysicalPerson_ HERO class. So, _Map-c_ returns _PhysicalPerson_; i.e., _Map-c(human (Q5)) = PhysicalPerson_. For the analysis of the Wikidata properties other than _instance of_ (P31), we used the _Wikidata-Taxonomy_ tool (www.npmjs.com/package/wikidata-taxonomy, accessed on 10 May 2021) to retrieve all the subcategories of the category _Wikidata Property_ (Q18616576). We analyzed the extracted taxonomy and we considered the property categories that are more relevant for the PRiSMHA domain, i.e., those related to people's life, history of organizations, social roles, participation in events, etc.