# An Embedding-Based Approach to Repairing OWL Ontologies
## 2 Background Knowledge
### Word Embedding  
In the field of natural language processing, vectorizing a text is a key step to convert the text into numbers such that the text can be processed by machine learning models ([PERSON] et al., 2016). The smallest semantic unit in a text is a word, so the vectorization task of a text can be changed into the vectorization of words. When representing the semantics of phrases, sentences or paragraphs, sentence embedding is used to compute embeddings of their word sequences ([PERSON] et al., 2016). Word embedding is to represent words with a continuous vector space, which is a low-dimensional dense vector and can represent the semantics of words. Such a representation method becomes unprecedentedly popular since the work in ([PERSON] et al., 2016) was published in 2013. This work extends the original Skip-gram model to improve the quality of vectors and the efficiency of the model. It also provides a tool called Word2 Vec to facilitate the usage of the extended model.  
To represent words or sentences with vectors, a pre-trained model is welcomed due to its high-dimensional space and semantic representation. Such models have been widely accepted by both academic and industrial researchers in the past ten years ([PERSON] et al., 2016; [PERSON] et al., 2016; [PERSON] et al., 2016). They are pre-trained on an original task with a large corpus and used on a target task by tuning the corresponding parameters according to the characteristics of the target task. Namely, people can directly use a pre-trained model to compute vectors on their tasks without performing a training process by themselves. The popular models Word2 Vec ([PERSON] et al., 2016), BERT ([PERSON] et al., 2016), Sentence-BERT ([PERSON] et al., 2016) and CoSENT ([[https://kexue.fm/archives/8847](https://kexue.fm/archives/8847)]([https://kexue.fm/archives/8847](https://kexue.fm/archives/8847)), accessed on 15 November 2022) belong to pre-trained language models.  
To represent the semantics of classes or individuals in an ontology, the work in ([PERSON] et al., 2016) provides a tool called NaturalOWL ([[http://www.aueb.gr/users/ion/publications.html](http://www.aueb.gr/users/ion/publications.html)]([http://www.aueb.gr/users/ion/publications.html](http://www.aueb.gr/users/ion/publications.html)), accessed on 15 November 2022). This tool translates those OWL statements that are relevant to a class or individual into natural language sentences. Example 1 shows an example to generate sentences for a given class. From the description of the class IceCream we can see that the relationship of DisjointClasses and SubClassOf are translated to \"isn't a kind of\" and \"is a kind of\" separately. The existential restriction (i.e., ObjectSomeValuesFrom) is converted to \"at least one\".  
**Example 1**.: _Take the class IceCream in the widely used ontology pizza ([[https://protege.stanford.edu/ontologies/pizza/pizza.owl](https://protege.stanford.edu/ontologies/pizza/pizza.owl)]([https://protege.stanford.edu/ontologies/pizza/pizza.owl](https://protege.stanford.edu/ontologies/pizza/pizza.owl)) accessed on 15 November 2022) as an example. There are three axioms (We use the syntax adopted by OWL API to represent the axioms in an ontology, and ignore all namespaces for clarity) that are relevant to the class IceCream (see below):_  
\(Sub\)_ClassOf(IceCream Food)_  
_DisjointClasses(IceCream Pizza PizzaBase PizzaTopping)_  
\(Sub\)_ClassOf(IceCream ObjectSomeValuesFrom(hasTopping FruitTopping))_  
_By using NaturalOWL API, the description of IceCream is obtained:_  
IceCream isn't a kind of PizzaBase, Pizza and PizzaTopping, and IceCream is a kind of Food. IceCream has topping at least one FruitTopping._