## 4 Implementation and Experiments
### Implementation  
#### 4.1.1 KRS Implementation  
The proposed method was evaluated over three topics from Wikipedia: (i) computer science, (ii) politics, and (iii) diabetes. The implementation of the KRS construction is divided into three steps: (i) corpus gathering, (ii) text processing, and (iii) mapping process. In the corpus gathering step, the documents for each topic from Wikipedia online encyclopedia are collected. However, it could be used any other source rather than Wikipedia pages--for example, a specific set of domain related documents or a specific corpus from repositories such as kaggle ([[https://www.kaggle.com/](https://www.kaggle.com/)]([https://www.kaggle.com/](https://www.kaggle.com/))) or the UCI repository ([[https://archive.ics.uci.edu/ml/index.php](https://archive.ics.uci.edu/ml/index.php)]([https://archive.ics.uci.edu/ml/index.php](https://archive.ics.uci.edu/ml/index.php))). The Wikipedia encyclopedia is an open collaboration project, and it is the general reference work on the World Wide Web [37; 38; 39]. It tends to have better structured, well-formed, grammatical and meaningful, natural languages' sentences compared to raw web data [40]. Table 2 shows the number of pages extracted for each topic, the depth of the extraction system, and the restriction set. The depth extraction refers to the number of subtopics extracted for each topic and the restriction is the filtering rule to select the Wikipedia pages. After building the corpus for each topic, the next step is to generate the corresponding KRS. Text Processing  
Figure 5 shows the KRS generation. Each document is analyzed to extract enriched nouns through NLP and SW technologies. The Stanford core NLP tool splits a document's content into sentences and extracts information like PoS Tags, lemmas, indexes, and NEs. Additionally, each sentence is analyzed with DBpedia spotlight to look for entities linked to the DBpedia KB, retrieving the corresponding URL. The tasks involved in this process are:  
* Sentence splitting: The content of a document is divided into sentences, applying splitting rules and pattern recognition to identify the end of a sentence. * Lemmatization: The root of each word is identified, e.g., the lemma of the verb _producing_ is _produce_. * PoS Tagging: A label is assigned to each token in a sentence, indicating their part of speech in the sentence, e.g., NN (noun), advj (adjective), PRP (personal pronoun), etc. PoS Tag are labels from the Penn treebank (a popular set of part of speech tags used in the literature). * NER: NEs identification. The result is a single-token tagged with the corresponding NE (person, location, organization, etc.). * NEL: Entities are defined in an SW KB. From a set of candidates' words, each word is a query against the target KB to retrieve a list of possible matching entities. After a ranking process, the most relevant entity is selected and their URL is returned and associated with the corresponding word. According with Figure 5, the first task identifies and extracts enriched nouns from the corpus and store them in the NOSQL DB MongoDB. Then, the relevance of an enriched noun is computed based on the statistical measure IDF. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Category** & **URLs** & **Depth** & **Restriction** \\ \hline Computer science & 1151 & 1 & Pages describing \\ Diabetes & 202 & 1 & persons are \\ Politics & 1717 & 1 & not considered \\ \hline Total & 3070 & & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The number of web pages extracted for the three different categories. Mapping Process  
The KRS is produced from MongoDB, where enriched nouns are mapped to the KRS as RDF triples and stored in a KB. The KB provided the basic functionality of querying over RDF triples. It is set up in a SPARQL endpoint to query their content and retrieve the data needed to compute the similarity between a web page content and the KB.