# Construction and Completion of the Knowledge Graph for Cow Estrus with the Association Rule Mining
## 3 Graph Construction
### Entity Extraction and Harmonization  
Entity recognition refers to identifying specific entities within a statement. The main function of entity recognition in the context of cow estrus is to identify each entity within the statement, such as recognizing the entities 'cow estrus','restless', and 'chirping' from a sentence like 'Cows in estrus often display restlessness and chirping behavior'. In this paper, entity extraction was primarily achieved through text cleaning, word segmentation, and the application of coding rules.  
First, the central entity in the knowledge graph was 'normal estrus', which was connected to three main categories of entities: behavioral changes, appearance changes, and physiological changes. The category of behavioral changes was further subdivided into locomotor behavior, vocal behavior, feeding behavior, and other behaviors, which reflect the behavior of the cow during estrus. The category of external changes included external features, uterine morphology, and vulvar changes, which relate to the physical posture and organ morphology of the cow during estrus. The physiological changes category covered changes in body temperature, hormonal changes, and other compounds, which are physiological processes occurring in the body of the cow during estrus.  
After completing this series of operations, we organized this information into a uniform format and stored it in CSV files, which are ideal for data storage and exchange because of their flexibility and ease of use. In a CSV file, each row represents a phrase or concept, while the columns contain related attribute information such as the source of the phrase, its type, and potential connections to other concepts.  
Inconsistent entities increase processing complexity because additional normalization steps are needed to handle these inconsistencies. Entity harmonization helps to improve the accuracy of entity recognition (NER). In named entity recognition, entity disambiguation and entity unification are key steps for improving the accuracy and reliability of NER. Entity disambiguation determines the exact meaning of an entity, while entity unification standardizes entity names to ensure that they match known entities, as shown in Table 3.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Serial Number** & **Original Name** & **Post-Normative Name** \\ \hline
1 & Loud chirping/howling/tweeting & Howling \\
2 & Vulvar flushing/deep redness of the vulva & Vulva flushing \\
3 & Vulvar mucus discharge & Vulva Swelling \\
4 & Follicles begin to develop/folliculogenesis & Follicular folds \\
5 & Anxiety/left and right/excitement & Excitement \\
6 & Tail lift/tail root lift & Tail often raised \\ \hline \hline \end{tabular}
\end{table}
Table 3: Names of entities before and after specification and harmonization.  
We conducted a thorough review of the primary literature, identifying key terms and their various forms of expression under the guidance of veterinary experts. We then developed a set of standardized rules to graph these terms onto a unified set of terms. For example, the expressions 'loud' and 'howling' were standardized as 'howling,' and the terms 'flushed vulva' and 'dark red vulva' were standardized to 'vulvar flushing'. In addition, for complex expressions such as 'anxiety', 'looking left and right', and 'excitement', we combined them into 'excitement and restlessness'. Through this normalization process, we successfully transformed the non-standardized expressions into structured terms, which greatly improved the consistency and comparability of the data. These structured data were then organized into CSV files, which provided a high-quality input for constructing the knowledge graph.