# An Approach to Constructing a Knowledge Graph Based on Korean Open-Government Data
## 3 Metadata-based Open-Government Data Platform
### Modelling of Open-Government Data Graph  
This section describes an approach for modelling the OGD graph, which is used in the proposed platform. Figure 4 shows an OGD graph structure that consists of data nodes (i.e., vertices) and their relationships (i.e., edges). Vertices represent the collected relations (i.e., tables) in the proposed platform, and a set of terms refers to compound words as well as single words that extracted from the data names (i.e., relation names), attributes and categories. Specifically, the compound words and single words extracted from data names, attributes and categories are obtained by applying Korean natural language processing operations, such as tokenization, stop-words removal and stemming [24] by referencing the standard terminology dictionary. Figure 5 shows an example of natural language processing operations with \"locations of public parking lots\" extracted from a data name. In fact, the proposed open-data platform executes Korean natural language processing operations, but this paper provides an example of English natural language processing operations to enhance readers' understanding. First, a preposition \"of\" is removed by stop-words remover. Then, Tokenizer extracts single words and compound words (such as \"locations\", \"parking lots\" and \"public\") by referencing the standard terminology dictionary which contains standard terms and their synonyms. After stemming the extracted plural words, the singular words such as \"public\", \"parking lot\" and \"location\" are provided as the results of natural language processing operations. Finally, the derived words are exploited to model the OGD graph, which is shown in Equation (2). Figure 4: An Example of the OGD Graph and Detailed Relationship. An edge represents the many-to-many relationships derived from terms of two vertices. Thus, if there is an edge between two vertices, they are assumed to be semantically relevant in this paper. The thickness of an edge indicates the degree of similarity between two vertices, i.e., the thicker the edge, the higher similar between two vertices. **Definition 1**. : _Given an OGD graph \(G_{OGD}\) let \(V\) be a set of vertices, and \(\mid V\mid\) be the total number of vertices in \(G_{OGD}\)._  
\[\mathbf{V}=\{\mathbf{v}_{1},\mathbf{v}_{2},...,\mathbf{v}_{\mid V\mid}\} \tag{1}\]  
_where vertices are described by a set of index terms derived from the metadata such as the data names, attributes and categories. Assume that \(T_{iD}\), \(T_{iA}\) and \(T_{iC}\) represent sets of index terms extracted from the data name, attribute and category of vertex \(i\), the vertex \(i\) is formally defined as follows:_  
\[\mathbf{v}_{i}=\{T_{iD},\mathbf{T}_{iA},\mathbf{T}_{iC}\}=\{\mathbf{t}_{iD1},...,\mathbf{t}_{iD1}, \mathbf{t}_{iA1},...,\mathbf{t}_{i|Am|},\mathbf{t}_{iC1},...,\mathbf{t}_{i|Cn|}\} \tag{2}\]  
_where the \(x^{th}\), \(y^{th}\) and \(z^{th}\) index terms extracted from \(T_{iD}\), \(T_{iA}\) and \(T_{iC}\) of vertex \(i\) are represented by \(t_{iDx}\), \(t_{iAy}\) and \(t_{iCz}\), respectively._  
**Definition 2**. : _Given an OGD graph \(G_{OGD}\), let \(E\) be a set of edges which are unordered pairs of vertices._  
\[E\subseteq\{(\mathbf{v}_{i},\mathbf{v}_{j})|(\mathbf{v}_{i},\mathbf{v}_{j})\in\mathbf{V}^{2}\wedge \mathbf{v}_{i}\
eq\mathbf{v}_{j}\} \tag{3}\]  
_If two distinct vertices \(v_{i}\) and \(v_{j}\) have the same terms, the edge (\(v_{i}\), \(v_{j}\)) consisting of two vertices has a degree of similarity. Since vertices are modelled as term sets, the Jaccard similarity coefficient is used to measure the similarity between two distinct vertices._  
\[sim(\mathbf{v}_{i},\mathbf{v}_{j})=\alpha\times\frac{|\mathbf{T}_{iD}\cap\mathbf{T}_{jD}|}{| \mathbf{T}_{iD}\cup\mathbf{T}_{jD}|}+\beta\times\frac{|\mathbf{T}_{iA}\cap\mathbf{T}_{jA}|}{| \mathbf{T}_{iA}\cup\mathbf{T}_{jA}|}+\gamma\times\frac{|\mathbf{T}_{iC}\cap\mathbf{T}_{jC}|}{| \mathbf{T}_{iC}\cup\mathbf{T}_{jC}|} \tag{4}\]  
_where \(\alpha+\beta+\gamma=1\).