## 3 Methodology
### Similarity Measure  
The proposed SFWC compares web page's content against the KRS. The goal is to determine if a web page is closely related with a target domain considering the input corpus. The system takes into  
Figure 4: Overview of the proposed SFWC.  
account the enriched nouns from a source to compare their content against the KRS. Our proposed approach uses the IDF and the statistics measures of arithmetic mean and standard deviation to calculate the similarity between the web page content and the KRS.  
Some SFWC proposals [32; 34; 35] are based on the use of TF-IDF as similarity measure. TF is a statistical measure to define the weight or importance of each word from a document. IDF is a statistical measure to define the importance of each word with respect to the corpus. The combination of these measures define the weight of each word with respect to the document and the corpus.  
The main issue with TF-IDF is that a noun can be weighted with different TF-IDF value in accordance with their corresponding document, i.e., a noun from different documents will have different TF-IDF values. To create a unique value per word, a method [34] was proposed to calculate the average of the TF-IDF value for each word; however, this value must be updated if the corpus increases their number. The proposed similarity measure is based on IDF (Equation (1)) since it defines a unique value for each noun with respect to a corpus, and it is easily updated if the number of documents increases:  
\[IDF(t,C)=log(N/n) \tag{1}\]  
where \(t\) is a term (word) in a document, \(C\) is a corpus, \(N\) is the number of documents in the corpus, and \(n\) is the number of documents containing the target word. The IDF metric tends to be high for uncommon words and low for very common words. However, there is no specification about the ideal IDF value to determine the relevance of a word in the corpus. Equations (2)-(4) define respectively the arithmetic mean, standard deviation, and the similarity measure used in this work:  
\[\mu_{C}=\sum IDF(t_{i},C) \tag{2}\]  
where \(t_{i}\) is an enriched noun whose URI value is not empty. The arithmetic mean is calculated over enriched nouns whose description is linked to a KB of the SW, e.g., Wikidata, DBpedia, etc.  
\[\sigma=\sqrt{\frac{\sum\left(idf(t_{i})-\mu\right)^{2}}{N}} \tag{3}\]  
\[sim_{doc}=\mu_{doc}:\mu_{C}-\sigma\leq\mu_{doc}\leq\mu_{C}+\sigma \tag{4}\]  
\(\mu\) is the arithmetic mean of IDF values in the corpus (\(\mu_{C}\)) or in a document (\(\mu_{doc}\)), and \(\sigma\) represents the standard deviation calculated from IDF values. In this work, \(\mu\) and \(\sigma\) define the threshold used to determine the similarity between a web page and the KB. This threshold is calculated as: \(\mu(IDF)\pm\sigma\).  
The similarity measure was inspired in normal distribution where the threshold tries to represent frequent words and uncommon words, that is, we suppose that relevant words are in the range of \(\mu\pm\sigma\), i.e., the similarity measure selects the most representative words described in the KRS. The calculated threshold is used as a reference to determine whether the content of a web page is related to the KRS or not.