# A Semantic Model for Enhancing Data-Driven Open Banking Services
## 4 Reconciliation and Inference
### Semantic Reconciliation  
One of the most common operations in current banking, which usually requires strenuous expert efforts, consists of (manual) movement inspections to match partial payment statements concerning different concepts in invoices. A way to facilitate these processes is to filter those operations whose concepts and payments can be semantically matched in an automatic way. This approach can now be conducted by means of the semantic system implemented here, according to the OBO TBox (Terminological Box) (Following the Description Logic nomenclature, ontology classes and properties are called \"Tbox\", while ontology individuals are called \"Abox\" (Assertional box)) for concept disambiguation. \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Step** & **Package** & **Language** & **Description** & **Reference** \\ \hline OBO Ontology & Protégé & OWL & Define Ontology & [[https://protege.stanford.edu/](https://protege.stanford.edu/)]([https://protege.stanford.edu/](https://protege.stanford.edu/)) (accessed on 25 November 2022) \\ JSON Mapping & RDFLib & Python & Translate JSON files & [[https://rdflib.dev/](https://rdflib.dev/)]([https://rdflib.dev/](https://rdflib.dev/)) (accessed on 24 November 2022) \\ CSV Mapping & RDFLib & Python & Translate CSV files & [[https://rdflib.dev/](https://rdflib.dev/)]([https://rdflib.dev/](https://rdflib.dev/)) (accessed on 24 November 2022) \\ RDF Repository & Stardog & SPARQL & and create RDF data & 24 November 2022) \\ Fuzzy Similarity Search & RapidFuzz & Python & Store and query & [[https://www.stardog.com/](https://www.stardog.com/)]([https://www.stardog.com/](https://www.stardog.com/)) (accessed on 22 November 2022) \\ Genetic Algorithm & jMetalPy & Python & Calculate the subset & [[https://maxbachmann.github.io/RapidFuzz/](https://maxbachmann.github.io/RapidFuzz/)]([https://maxbachmann.github.io/RapidFuzz/](https://maxbachmann.github.io/RapidFuzz/)) (accessed on 26 November 2022) \\  & & & & \\ Genetic Algorithm & jMetalPy & Python & Calculate the subset & [[https://jmetalpy.readthedocs.io/](https://jmetalpy.readthedocs.io/)]([https://jmetalpy.readthedocs.io/](https://jmetalpy.readthedocs.io/)) (accessed on 21 November 2022) \\  & & & & \\ Inference & Pellet & Java & the elements and rules & [[https://www.stardog.com/](https://www.stardog.com/)]([https://www.stardog.com/](https://www.stardog.com/)) (accessed on 22 November 2022) \\  & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Methods and packages used at each step. Figure 2: General overview of the semantic model employed in this study, with regards to the OBO ontology. For validation, a number of 74,000 real-world invoices and 150 bank statements were used, the contents of which were stored in the RDF repository with the mapping functions explained in the previous section. In this regard, as shown in Figure 2, a series of SPARQL queries are applied to building two-word corpora. One for each item concept involves the invoice data that companies usually store in their corresponding ERPs (customer's business and fiscal name to whom the invoice was financed, etc. ), and another one for each _Statement_, with concepts of bank transactions (beneficiary, bank, etc.). Table 8 shows the SPARQL queries defined to construct these corpora, with two examples as results. Concretely, the first set of queries (first row) retrieves the properties _ItemsConcepts_, _ItemsBusinessName_, and _ItemsFiscalld_ to obtain the information in the _Items_ for two invoices, while queries (second row) are used to select properties _PSD2 Concepts_ and _PSD2 Beneficiary_ of two sample bank _Statements_. Once the two-word corpora are built, a fuzzy search RapidFuzz algorithm ([[https://maxbachmann.github.io/RapidFuzz/](https://maxbachmann.github.io/RapidFuzz/)]([https://maxbachmann.github.io/RapidFuzz/](https://maxbachmann.github.io/RapidFuzz/)) (accessed on 26 November 2022)) [24] for string similarity is applied to calculate semantic matching between invoices and bank statements.