# A Knowledge and Semantic Fusion Method for Automatic Geometry Problem Understanding
## 4 SGKO: Semantic-Enhanced Geometry Knowledge Ontology
### The Lower Semantic Knowledge Layer  
The lower layer's work involves defining semantic knowledge. Semantic knowledge is customized for each entity type and relationship type, enabling machines to recognize these concepts and identify their mentions. Semantic knowledge is defined as attributes within each concept. Figure 3: The upper layer knowledge system (with the purple parts representing semantic-enhanced adjustments). Semantic knowledge is closely related to the structured representation of an entity and a relationship, which are introduced below. The knowledge of an entity includes all its expressions and variants, which are represented using regular expression rules, as well as its demanded structured representation. **Definition 3** (Structured Representation of Entity). : _An entity is structured as an ordered pair \(e=(ename,et)\), where ename represents the entity's name, and et represents its type._  
Relationships are divided into \"Binary Relationships\" and \"Ternary Relationships\" based on their relationship types. **Definition 4** (Binary Relationship). : _A relationship is a binary relationship if its relationship type \(rt\in RT_{Binary}\)._  
A binary relationship is formally represented as an ordered triple  
\[r_{binary}=(e_{subject},rt,e_{object}),\]  
where \(e_{subject}\) and \(e_{object}\), respectively, represent the head and tail entities of \(r_{binary}\). There exists an \(rt\in RT_{Binary}\) relationship between them. This structure is consistent with the SPO triple structure, and the relationship is directed. **Definition 5** (Ternary Relationship). : _A relationship is a ternary relationship if its relationship type \(rt\in RT_{Ternary}\). A ternary relationship is regarded as consisting of two parts, a core part and an attached part, termed as a Core Relationship and Attached Relationship, respectively._  
A ternary relationship is formally represented as a pair of triples:  
\[r_{ternary}= \begin{cases}r_{core}=(e_{subject},rt_{core},e_{object}),\\ r_{attached}=(r_{core},rt_{attached},e_{additional}).\end{cases} \]  
In this structure, \(r_{core}\) represents the core part of \(r_{ternary}\), including the head entity \(e_{subject}\) and the tail entity \(e_{object}\), between which there exists an \(rt_{core}\in RT_{Ternary}\) relationship. \(r_{attached}\) is the attached part of \(r_{ternary}\), indicating that there is an \(rt_{attached}\) relationship with \(e_{additional}\), where \(rt_{attached}\in RT_{Dependent}\). Both structures represent directed relationships. There is a mutually inferable association between \(rt_{core}\) and \(rt_{attached}\). For example, \"AB\(\bot\)CD\" describes a binary relationship structured as \(r_{binary}=((^{*}AB\",Segment),perpendicular,(^{*}CD\",Segment))\), while \"AB\(\bot\)CD at point P\" describes a ternary relationship, structured as two triples:  
\[r_{core}=((^{*}AB\",Segment),perpendicular,(^{*}CD\",Segment))\]  
and  
\[r_{attached}=(r_{core},foot,(^{*}P\",Point)).\]  
Here, perpendicular and foot are mutually inferable. It is worth noting that there is an intersection between the concepts of \(r_{core}\) and \(r_{ternary}\)-\(r_{ternary}\) is used in a relatively macro context, such as when discussing or emphasizing the distinction between \(RT_{Binary}\) and \(RT_{Ternary}\), whereas \(r_{core}\) is used in a more micro context, specifically when discussing the core relationship type and attached relationship type of a ternary relationship. The same applies to \(rt_{core}\) and \(rt_{ternary}\). Semantic knowledge is generally divided into \"Textual Attribute\" and \"Domain Knowledge Attribute\". For entity type, defining semantic knowledge involves specifying their \"Textual Attribute\", which encompasses all possible descriptions for each entity type. For example, the textual feature of the Point is represented by a single uppercase letter, the Segment is typically represented by two consecutive uppercase letters, and the Degree Value is represented by a sequence of digits ending with \"\"\".