Apple and Pear Scab Expert System

. Plant disease, such as apple and pear scab, control is a crucial issue of fruit-growing. Apple and pear are among the most widely grown (approximately 43% of all fruit tree area) and economically important fruit crops worldwide and in Latvia. Research projects have produced research data covering various aspects of plant-pathogen interactions, but there is no internal linkage analysis, as well as implementation of other types of data (such as environmental and meteorological data, etc.). Establishing such a data integration system would allow the identification of new regularities in plant-pathogen interactions, and provide mechanisms for disease control decisions. In this study an expert system was developed aimed to help professional fruit-growers evaluate the possible impact of apple and pear scab to the plant health and yield quality. The expert system is based on a previously developed apple and pear scab ontology and consists of a web based front-end and triplestore back-end.


Introduction
In Europe, more than 500,000 ha are occupied by apples and pears, as they are among the most demanded fresh fruits (WEB, a).According to Food and Agriculture Organization of the United Nations and World Apple and Pear Association, there are so many good reasons to eat apples and pears, not only are they good for the health but they are also incredibly versatile, convenient and excellent value for money (WEB, b).However, agriculture is an industry that is significantly affected by climatic conditions, diseases, insect infestation, resulting in reduced productivity and also farmers' income.According to the World Apple and Pear Association, the Europe apple stocks in 2022 increased by 17.7% compared to 2021 and reached 1,542,655 tons, while pear stocks increased only by 2.4% to 155,401 tons.The increase is more related to the low productivity of apples and pears compared to 2021.(WEB, c).
One of the biggest threats to apple and pear growing is scab diseases -distributed worldwide but more common in temperate regions with cool and humid springs and summers.Apple and pear scab is caused by hemibiotrophic fungi Venturia inaequalis and V. pyrina, respectively (Belete et al., 2017;Sokolova et al., 2014).Pathogens cause fruit and leaf deformities and premature fall, further affecting the tree's overall health and decreasing its resistance to unfavorable environmental factors (Jha et al., 2018).Reducing the negative effects caused by the disease requires a detailed understanding of the plant-pathogen interaction to improve growing technologies and breeding resistant cultivars.A variety of data sets have been accumulated globally through various apple and pear field resistance studies (Höfer et al., 2021;Papp et al., 2020), identification of resistance genes (Zelmene et al., 2022), inheritance of resistance (Zelmene at al., 2022) and pathogen characterization studies (Sokolova and Moročko-Bičevska, 2021).Unfortunately, most of these studies were carried out unrelatedly.The data sets are not mutually compatible and cannot be analyzed in an integrated manner.A similar situation can also be observed in the Institute of Horticulture, Latvia (LatHort) research activities on apple and pear scab, which were carried out in different periods and within the framework of various projects.As a separate data set, environmental (mainly meteorological) data are collected regularly and is very important in the study of disease impact but is not usually integrated into a common system with other data sets that describe plant resistance or pathogen characteristics.This significantly limits the identification and deeper study of the general mechanisms of plant-pathogen interaction, as all the factors involved are equally important.
An expert system is a software application that simulates human expertise and experience to offer advice and provide help in the decision-making process usually in a specific domain of knowledge.Expert systems play an important role in providing expertise in entomology, pathology, horticulture and agricultural meteorology etc.There are a number of expert systems in the field.The authors of the (Deepthi and Sreekantha, 2017) have carried out a review on applications of the expert system for Disease Diagnoses of Crops around the world.Haider et. al. suggest the application of an expert system in the field of horticulture (Haider et. al., 2014).A comprehensive review on the application of diagnostic expert systems in the field of agriculture lists 43 expert systems (Saleem et. al., 2021).
Summarizing the above, the following goal of this study was set up: to develop the Apple and Pear Scab Expert System based on LatHort data and expert knowledge in the field of horticulture, which would improve the understanding of plant-pathogen interaction, and support end users in their decision-making process.

The development of the expert system
The development of the Apple and Pear Scab Expert System was carried out to provide insight into data accumulated by LatHort throughout the years on apple and pear scab and environmental data recorded during that time period.The target demographic of the expert system are researchers and professional fruit growers who would benefit from the ability to access research data via a user-friendly web interface by medium of questions and answers.The system was developed from scratch to accommodate the exact use case presented in this paper.The development was performed in several phases described in this chapter.

The Apple and pear scab ontology
In our prior work (Zarembo et al. 2021) Apple and Pear Scab Ontology was developed for the purpose of creating this expert system.Knowledge for development of the ontology was acquired through interviews with experts of horticulture domain in order to capture all the relevant terms related to this field (concepts, properties, relations, etc.).Then LatHort research data was analyzed informally to extract relevant information.The research data consisted of apple and pear cultivar scab severity data, appearance of resistance genes (e.g., Rvi5 and Rvi6 genes), cultivar location in Latvia or in particular research orchard, weather data, data characterizing the pathogen (morphological traits, molecular markers, isolate identification data), and long-term orchard data from cultivar and pathogen interaction.The ontology was built using existing LatHort data sets.

The Dataset
Data provided by LatHort in general was in the form of several separate, non-linked Excel spreadsheets with different data structures.The data included the following datasets analyzed separately before: 1) scab field severity assessment in the collection of apple and pear genetic resources, performed according to the internationally accepted Vinquest methodology (WEB, d); 2) results of resistance-specific gene identification in apple (according to the methodology of Zelmene et al., 2022); 3) pear genetic resources genotyping (Lacis et al., 2021;Lacis et al., 2022); 4) apple and pear scab-causing pathogen V. inaequalis and V. pyrina characteristicsmorphological, pathogenicity and genetic (in accordance with generally accepted methodology for the study of fungal pathogens of plants, e.g.(Sokolova and Moročko-Bičevska, 2021)), and 5) meteorological data for the period from 2012 to 2017, collected by a "Lufft" meteorological station located at the LatHort experimental orchard.
Combining data in a single spreadsheet was not possible as the structure of the spreadsheets was not compatible.Excel spreadsheets were not suitable to analyze correlation between all data and to be able to make inquiries.For that purpose, spreadsheet data was transformed into Web Ontology Language (OWL) semantic ontology.By using semantic analysis, it was possible to make connections between all data from Excel spreadsheet files.After analyzing all data provided, several key data classes were selected that were the same across tables, such as, genus name, location or sample number.Using common data classes from one table, connection to another table was made.After all analysis was finished, all data was classified to the ontology model that was developed in the previous research (Zarembo et al. 2021).

The Expert system
The developed expert system is based on the question-and-answer principle and consists of questions that were defined by domain experts from LatHort, answers are based on data that was provided by them.The main task of the expert system is to make correlations of data provided and answer questions using all collected data.Ontology model is supported by the Apache Jena Fuseki server allowing users to make querybased requests and get comprehensive data, from what in the beginning was several separate Excel spreadsheets.Query making was simplified by adding a web application serving as a user interface for interactions with data.
The first step in ontology development was to analyze the existing data.That is, study each Excel spreadsheet and determine what column of the table is equivalent to the class in the ontology that was created using WebProtege tool (see Fig. 1).The ontology was published to the Web using Wizard for DOCumenting Ontologies (WIDOCO) (Garijo, 2017) tool.The next step was transforming Excel spreadsheet data into OWL supported XML data structure.To achieve this, an open-source tool, OpenRefine (WEB, e), was used.OpenRefine allows cleaning and transformation of data with different structure.In this case it was cleaning duplicate data from several Excel spreadsheets, collecting all data into one starting structure and transforming all plain text and numerical data into XML structure for creation of OWL data file.To achieve that, RDF-Extension was added to OpenRefine tool, as it supported creation of OWL file structure.After all data was extracted from spreadsheets, classification based on the previous ontology model was necessary.Then the new file was uploaded to WebProtege.After uploading a model, WebProtege provides an option to visualize data from the model (see Fig. 2).
After creating a model and setting it up on Apache Jena Fuseki server, allowing users to make queries and receive information, next step was creating web applications with the following functionality: • Ability to host ontology documentation using WIDOCO; • Ability to hold data about apple and pear scab; • Ability to host the expert system.WIDOCO documentation's purpose is to show structure of ontology model in human readable form, as a hosted OWL file holds the same data, but is created to be computer readable.It holds information about all classes, properties of said classes and connection to other classes in text form and in vector graphs form (see Fig. 3).

Figure 3. Visual representation of ontology classes and connection between them
The web application is used to inform visitors about apple and pear scab, its life cycle as well as how to treat already affected trees.Part of this web application is the expert system.It consists of 13 predefined questions.Questions were defined by LatHort experts.The questions are: 1. What isolate of Venturia inaequalis was found in an apple variety {apple cultivare}?
2. What isolate of Venturia pyrina was found in a pear variety {pear cultivare}? 3. Which Venturia inaequalis resistance genes have been found in an apple variety {apple cultivare}?
4. Which Venturia pyrina resistance genes have been found in the pear variety {pear cultivare}? 5. Which apple cultivars have both field evaluation and resistance gene data available?
6. Which pear cultivars have both field evaluation and genotyping data available?7. What resistance genes have been identified in apple varieties with a field rating from {0 -9} to {0 -9}?
9. What isolates of Venturia inaequalis have been identified in apple varieties with a field rating from {0 -9} to {0 -9}?
11.What are the average meteorological data values in the time period from {date} to {date}?
12. What are the average meteorological data values in the time period from {date} to {date} corresponding to the assessment of apple fields with Venturia inaequalis rating from {0 -9} to {0 -9}?
13.What are the average meteorological data values in the time period from {date} to {date} corresponding to the assessment of pear fields with Venturia pyrina rating from {0 -9} to {0 -9}?
As questions were predefined, a SPARQL query was made for each of the questions.And those queries were executed on Apache Fuseki Jena server to inquire information.After queries were created and implemented into the web application, full Excel data transformation into a functional expert system supported by back-end server was created (see Fig. 4).

Results
The original Apple and Pear Scab ontology was expanded with individuals from heterogeneous data sources, imported into Fuseki Jena for further applications in SPARQL queries and made available on the Web using WIDOCO tool.A Web based expert system was then constructed to provide an interface for querying data based on 13 questions defined by a group of domain experts.Questions expressed in natural language provide a more accessible way for industry professionals and experts to examine large underlying dataset without needing to go into details of the data structure.

Conclusions
One of the challenges in agriculture is transferring research data to end users in a way that makes this information actionable.A readily available web-based expert system is one of the tools that can facilitate that.The development of such an expert system allows gathering information in different formats into a single data set for the discovery of general regularities in apple/pear and scab pathosystems.
Agricultural production is one of the types of business, where productivity largely depends on external environmental conditions.The proposed expert system is a tool that enables apple and pear growers to facilitate the decision-making process, giving indications of possible solutions that will ensure a reduction of the negative impact of the external environment and, accordingly, an increase in productivity in the long term.Taking into account that the questions defined in the system development process and the answers provided are based on research and the expertise of specialists in the relevant industry, it is an opportunity for apple and pear growers to receive the advice of a professional to whom this system is comparable.The development of such systems contributes to the digitization of the production process, which currently corresponds to one of the priorities of the European Commission "Europe ready for the digital age" (WEB, f).By introducing digitization in agriculture, it is an opportunity to promote production productivity, which would give an opportunity to promote the export of apples and pears.

Figure 1 .
Figure 1.Example of ontology model structure

Figure 4 .
Figure 4. Full path from Excel spreadsheet to expert system

Figure 5 .
Figure 5. Screenshot of the expert system user interface