1 Introduction

The rapid growth of sources and data on the web has created two major challenges: (1) vast amounts of heterogeneous information distributed over the web and (2) users’ need for enhanced ability to have various queries answered. Considering the sheer volume of data stored on the web, in order to respond to user queries, the distributed data need to be semantically linked [54]. Ontologies are important tools for integrating heterogeneous semantic information [13, 34]. Nevertheless, if an ontology is merely used as a comprehensive encyclopedia, users’ need for answers to queries cannot be satisfied. A number of tools, including reasoners, created by the semantic web community enable processing and making inferences on the information stored in an ontology [16, 17, 22, 24, 48]. It should be noted that, in many domains such as medicine, economy, history, and business, it is impossible to examine data without considering the concept of time. However, description logic [12] lacks the necessary tools to create temporal relationships between objects [28].

Quite a number of papers, particularly [19], highlight the importance of time in the semantic web by fully expressing most temporal concepts [2, 6, 7, 17,18,19, 24, 25, 27, 29, 30, 32, 36, 37, 43,44,45]. In [6] aims to compare various temporal modeling methods, in particular TOQL and SQWRL as most frequently used temporal query languages in the semantic web.

As a result, the temporal models and links between temporal and non-temporal concepts have received considerable attention. Yet, most temporal models [1, 7, 8, 25, 53] fail to cover all temporal concepts, making it necessary to combine several models to answer all queries. Current query languages such as Sparql [47] are not fully capable of responding to temporal queries; thus, identifying an appropriate query language satisfying Allen’s Theorem [4, 26] is another important issue that needs to be addressed.

Despite the enumerated advantages of ontologies, the element of time, as a key factor in linking scientific events, has received relatively little attention. In order to incorporate the dimension of time into the history of science ontologies and answer temporal queries, a combination of temporal and description logic needs to be used. Studies at the University of Leeds in 2007 [15] are among the first attempts to do so. It should be noted that, at the time, description and temporal logic tools and reasoners lacked the necessary sophistication and were not sufficiently expressive or strong to fully implement queries on the history of science.

In this paper, Protégé is used to create an ontology of history of medical science comprising the two eras of Islamic medicine and the European medical revolution. Subsequent to an analysis of recently proposed temporal methods and ontology query languages, the temporal model of SWRL and N-array was chosen to establish a link between historical concepts and time. Furthermore, a database of questions regarding the medical history of scientists was created and recurrent queries were examined to propose a model for queries about historical researchers. Next, the high-level questions were translated into machine-understandable queries using SQWRL. Finally, the results were returned to the user. Our analyses revealed that the majority of the temporal queries are answered according to Allen’s Theorem.

2 Background and related work

For the purpose of storing records of event, concepts, and their relationships, ontologies are preferred to databases since they allow information to be searched semantically [53]. As a result, numerous ontologies in many areas of science have been created e.g. Galen [42], Latent Dirichlet Allocation(LDA) [50], GO [1], Engineering Design Ontologies [2], Science Ontology [3], Personal Computer-Do It Yourself (PC-DIY) [4] and Travel [5]. The concept of time is significant in that events occur during time. Essentially, events are defined in this dimension, giving rise to a number of theories aiming to explain how events are linked to each other with respect to time. Allen’s Theorem is arguably the most eminent of these attempts, which identifies 13 states for event, as shown in Fig. 1 [26].

Fig. 1
figure 1

Allen’s temporal interval relationships

In order to incorporate the dimension of time into an ontology two steps need to be taken: (1) identify time concepts according to OWL and RDF, and (2) specify an ontology query language. In OWL and RFD, relations are defined as pairs. Among others, recent attempts to include time in non-temporal concepts are Temporal Description Logics (TDL) [3, 14, 20, 35], OWL-Time [26], 4D-Fluents [8, 52], N-ary [39], Reification [19], Named Graphs [52], and SWRL Temporal Ontology [28, 43].

More recently, the critical nature of time, both independently and in relation to other concepts in ontologies, has prompted excellent works in this area such as CNTRO [50, 51], PROTON [46], History of Science Ontology [15], Economic Ontology [38] and Temporal Ontology [40]. For instance, the History of Science Ontology at Leeds University, which is based on Davidson’s theory [33], focuses on a portion of the history of science (i.e. the topic of Astronomical Revolution) and presents a framework for representing time and history of scientific events. At the time, as a result of its novelty, the work was not able to present a comprehensive model of time: only a few temporal queries were extracted from the ontology and were manually expressed in Prolog. This can be explained by the immaturity of reasoners and inference tools at the time, making the queries unable to satisfy Allen’s Theorem.

By design, many popular ontology query languages such as SOWL [9], C-SPARQL [10], T-SPARQL [23], tOWL [21], TOQL [11], and SQWRL [41] fail to take advantage of the aforementioned temporal models. In contrast, VPR and CNTRO [50, 51] are two examples of ontologies that store clinical patient information based on the temporal models; SQWRL can be used to create both temporal and non-temporal queries on these ontologies. Comparatively, SQWRL is a comprehensive query language as it is based on SWRL rules and includes libraries that cover Allen’s rules. In the meantime, another query language called TOQL was introduced which in [6], the advantages and disadvantages of its use and its difference with the SQWRL for expressing temporal queries are discussed. In recent years, there have also been some examples of the ontology for reasoning and querying of temporal and non-temporal data, which are proposed by the SQWRL to express queries [5]. The article [31] described ongoing attempts to use the Semantic Web Rule Language (SWRL) to model the morphological layer of a wide-coverage Italian lexical resource, Parole-Simple-Clips (PSC); in this case that subset of PSC dealing with Italian noun morphology. In this article, the OWL API and the SWRL Rule Engine API’sFootnote 1 were used to present queries; the same lexical knowledge was used based on looking at the time taken to respond to the SQWRL queries given above using the SQWRL API.Footnote 2

3 Proposed approach

In this paper, the proposed approach is composed of four main components: (1) query patterns, (2) the ontology comparing the history of medicine, (3) SQWRL queries, and (4) description logic and temporal logic reasoners.

In this paper, based on the patterns of questions proposed by previous scholars and the authors, these temporal and non-temporal queries are implemented in SQWRL. The queries are converted into machine-understandable language by the interpreter so that the description and temporal reasoners can make inferences. Once inferences on the data in the ontology are made, the results are shown to the user.

3.1 Proposed patterns for querying history of science

In order to find a pattern for queries, historical papers were surveyed to find ambiguous points and considerable questions by researcher throughout the history of medicine. The surveyed papers fall into two categories: (1) those that refer to and compare the two medical eras and (2) those that include questions in both eras.

Using researcher questions, in the proposed model, four categories of questions i.e. temporal (according to Allen’s Theorem), who, which, and what as well as their combinations are considered. Table 1 lists the questions in each category.

Table 1 Patterns of historical questions

3.2 Creating the history of science ontology

A collection of sources on the history of medicine were used to classify the data used to create the ontology. After reviewing a fraction of the data on the activities, fields of work, and books of physician and scientist from both eras, theories and opinions of physicians, were formed. Instances in the ontology are obtained through this procedure. For example, the following instances are defined in the ontology:

  • Avicenna rejected the Galen’s Blood circulation.

  • Leonardo da Vinci followed the Galen‘s Human Anatomy.

3.2.1 Dealing with concepts

In this subsection, concepts and entities are classified as either temporal or non-temporal.

  • Non-temporal concepts: include hierarchical concepts used to classify people and objects into different groups such as physician, scientist, philosopher, book, geographical area, and disease as well as into concepts such as activity, area of interest, medical branch, and the role defined for each person.

  • Temporal concepts: apart from the concepts used for defining temporal concepts in SWRL, the classes and hierarchical relationships in this area include events, historical eras, and theories.

The classes and concepts of the ontology are modeled in Fig. 2.

Fig. 2
figure 2

Classes of the ontology

3.3 The architecture of implementation

In this stage, the knowledge from the previous stages is consolidated into the ontology. In doing so, a number of steps are taken including creating the ontology and combining several ready-made temporal ontologies as well as expressing the categorized questions using the SQWRL ontology query language. The process is illustrated in Fig. 3.

Fig. 3
figure 3

Architectural model

3.4 Tools

Pellet [49] was chosen as the description logic reasoner in this paper. However, the tool is not capable of processing the data using the selected query language. Thus, having the SWRL tab activated in Protége is not enough. In order to use the SQWRL tab, Jess7.1 must be added to Protége library files. SWRLTab includes a number of ontology subsystems such as sqwrl,Footnote 3 swrla,Footnote 4 swrlb,Footnote 5 swrlm,Footnote 6 and swrlx.Footnote 7 Moreover, the built-in library in Protégé adds special features through the swrlb ontology.

3.5 Temporal querying

SQWRL is a logic language, which is capable of running a large number of queries since this method does not have any constraints in executing the queries. These queries are not merely based on temporal questions and cover a wider range of semantic queries.

In Table 2, some example questions are given in SQWRL. The questions are based on the proposed pattern in Sect. 3.1.

Table 2 Examples of queries answered by the reasoner

4 Evaluation

In this section, the inferred answers based on SQWRL queries are evaluated. In doing so, a total of 60 temporal and non-temporal queries were examined using description and temporal logic reasoners which 56 questions were answered correctly, one answer was incorrect, and three were without results. The results showed that the SQWRL and the suggested temporal model of SWRL can partly answer the temporal and non-temporal queries based on the Allen’s Theorem in the Protege environment. Figure 4 shows the distribution of the answers.

Fig. 4
figure 4

Distribution of answers

In Fig. 5, the distribution of questions satisfying Allen’s Theorem is shown. As demonstrated, the theorem can result in improved temporal queries on the history of science. In this paper, the following temporal relationships of the theorem were used more frequently.

Fig. 5
figure 5

Evaluation of temporal queries

4.1 Temporal questions

The only questions that were not answered in this section are questions about “scientists or physicians who worked together in the same era.” These questions were expressed by using temporal: meet and also by examining the time between temporal: before and temporal: after, but no results were obtained for these questions.

5 Conclusion

Since the vast amount of heterogeneous data distributed over the web as well as lost knowledge residing in books, the creation of ontology in the field of history of science can be a good strategy for creating a semantic encyclopedia for this history.

In this paper, historical records were surveyed to compile a list of questions regarding the history of medicine and propose a pattern of queries of two eras: Islamic medicine and the European revolution. The ontology was created based on concepts extracted from the books of medical history. After reviewing reasoners, ontology query languages, and temporal models, more appropriate tools, than other means provided in response to questions over recent years, were selected and high-level queries expressed in SQWRL were answered using Allen’s Theorem. In order to evaluate the proposed approach in Protégé, a total of sixty temporal and non-temporal queries were considered. According to the results, SQWRL and the proposed SWRL temporal model constitute appropriate tools for expressing queries on the history of science using description logic.

6 In the future

For future research, it is suggested that ontologies would also be created for other fields of science, and more importantly, it is suggested that a comprehensive software should be designed based on ontology query languages which can correctly respond to complex temporal and non-temporal queries of users.