## 5 Implementation and Evaluation Tests
### Ontology Evaluation  
The ontology evaluation module takes the simplified ontology XML file as input and generates the following output items:  
* attribute set;
* context for CL construction
* metric values. The module was implemented in XQuery language. The algorithm of the evaluation module is summarized in Table 5.  
After obtaining the specialization graph, the engine performs both the attribute specialization and attribute generalization processes. The specialization process uses the following inference rule:  
\[a(c),c^{\prime}\prec c\Rightarrow a(c^{\prime})\]  
The reverse process, generalization, uses the following rule:  
\[\forall c^{\prime}:c^{\prime}\prec c:a(c)^{\prime}\Rightarrow a(c)\]  
During the generalization process, we introduce a new attribute \((p,*)\) to denote that the class has a property \(p\) with an arbitrary value. The resulting description for the input data introduced in the example (Section 5.1) is presented in the next example (Section 5.2). The objects for the FCA context are provided in the classes subtree, with the corresponding attributes listed in the <attr> element. The metric values are shown under the <metrics> element. <result>  <classes>  <Class IRI=''/pizza.owl#Capriccioosa'' type=''c'';id=''l'' depth=''l''>  <attr><a mn=''Inv_/pizza.owl#hasTopping:''>!/a></attr>  <parent/><children/></Class>  <Class IRI=''/pizza.owl#AnchoviotesTopping'';type=''c'';id=''2'';depth=''l''>  <attr/><parent/><children/></Class>  <Class IRI=''/pizza.owl#CaperTopping'';type=''c'';id=''3'' depth=''l''>  <attr/><parent/><children/></Class>  <Class IRI=''#Teenager'' type=''c'';id=''4'' depth=''2''>  <attr><a mn=''#hasAge:dt_l''3/a></attr>  <parent><c>!/c><c>!/c></parent><children/></Class>  <Class IRI=''#Person'' type=''c'';id=''5'';depth=''l''>  <attr><a m=''u'';nn=''#hasAge:dt_l''3</a></attr>  <parent/><children><c>4</c></children></Class>  <Class IRI=''#Human'' type=''c'';id=''6'' depth=''l''>  <attr><a m=''u'';nn=''#hasAge:dt_l''></a></attr>  <parent/><children><c>!/c></children></Class>  <Class IRI=''i'';type=''c'';id=''7'' depth=''l''>  <attr/><parent/><children/></Class>  </classes>  <attributes>  <Attrib id=''l''>Inv_/pizza.owl#hasTopping:!/Attrib>  <Attrib id=''2'';Inv_/pizza.owl#hasTopping:*</Attrib>  <Attrib id=''3''>#hasAge:dt_l''/Attrib>  <Attrib id=''4'';>#hasAge:*</Attrib>  </attributes>  <metrics>  <m_a>0.285714285714285714</m_a> \begin{table}
\begin{tabular}{l l} \hline \hline
**Element** & **Processing** \\ \hline Class & Preserved as class \\ \hline NamedIndividual & Converted into Class \\ \hline ObjectProperty, DataProperty & Preserved as property \\ \hline ObjectSomeValuesFrom, DataSomeValuesFrom, ObjectPropertyAssertion & The (property, value) pair is converted into an attribute. Next, the corresponding attribute is assigned to the reference class \\ \hline SubClassOf, ClassAssertion & construction of specialization graph \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Transformation rules used in the evaluation process. <m_em>0.714285714285714286</m_em> <m_eq>0.428571428571428571428571</m_eq> <m_l>0.571428571428571428571429</m_l> <m_c>0</m_c> </metrics> </result>  
In the experimental phase, we test a number of freely available online ontology sources for metric comparison. The test results are summarized in Figure 4 and Table 6.  
Based on the test results, the evaluation of the tested ontology models can be summarized as follows:  
1. Regarding the \(m_{A}\) parameter, the best value is for the UML schema example, the standard ontology examples contain too few properties. 2. In the case of parameter \(m_{e}\), all models contain concepts with empty property sets; the best value is calculated for the UML model. 3. Considering \(m_{=}\), both UML model and SHOE ontology have optimal values. 4. Regarding the parameter \(m_{l}\), all three models have very similar values, which are relatively low values. 5. For the measure \(m_{c}\), while there are no great differences, there is a relatively large distance between the declared and inferred concepts.