Summary. This paper describes how the Semantic Web and the JenaRules can work together in order to empower e-Learning platform Moodle with rich reports ...
1 Semantic Web and Rule Reasoning inside of E-Learning Systems Ion-Mircea Diaconescu, Sergey Lukichev and Adrian Giurca Department of Internet Technology Institute of Informatics Brandenburg Technical University at Cottbus, Germany {M.Diaconescu, lukichev, giurca}@tu-cottbus.de Summary. This paper describes how the Semantic Web and the JenaRules can work together in order to empower e-Learning platform Moodle with rich reports and flexible courses management. We discuss aspects of using Semantic Web technologies in e-learning in general and the JenaRules in particular. The main focus is towards using rules for reasoning on top of existing Moodle content.
Key words: e-Learning, Moodle, Semantic Web, Jena, RDF, RDFS, OWL, SPARQL.
1.1 Introduction Learning is an important aspect of our live. Online learning enables previously disqualified groups such as single parents and full time workers to learn outside the time constraints of conventional campus structures. Free software has delivered tools such as Moodle, Sakai, Atutor that fulfill this any time functionality with feature-rich sets and dynamically active group awareness. These online systems are also known as e-Learning Systems. Such systems provide an easy way for tutors to expose their courses, to interact with students, and to track student interest and activities over the presented domain. In addition, they have forums, where students and tutors can exchange opinions or receive answers to some questions. The use of Semantic Web technologies in e-Learning ([1]) may bring benefits to tutors and students. For example, a course tutor may want to know which students are active in a course or how many students use a recommended documentation for the course. A traditional solution to such problem is relational databases, but moving to RDF[2] is a shift to the open world with many distributed resources, identified by URIs as a mechanism for referring to global constants on which there exists some agreement among multiple data providers. Queries can be performed not only over a single database,
2
Ion-Mircea Diaconescu, Sergey Lukichev and Adrian Giurca
but over the content of several distributed educational systems, including resources, which are externally available on the Web. In addition, we may list the following advantages of using RDF and rules: • • •
Data can be shared using common vocabulary; New rules can be easily added or modified at any time without making changes in the system code; Modules can be easily adapted to new requests from tutors and students.
In our position statement [3] we define a project for empowering Moodle with rules and semantics. The project consists of the following steps: 1. RDF-izing existing Moodle content; 2. Automatic rules mining on top of RDF fact base, obtained in the previous step; 3. Extending automatically generated rules from the previous step manually. In this paper we focus on the use of the JenaRules for implementing rules, which are used for advanced reporting. The JenaRules is discussed and implementation of some rule examples is provided.
1.2 Rule Reasoners for the Semantic Web Moodle uses MySQL database to store logs. In order to get benefits of using Semantic Web technologies, this data should be structured in semantically meaningful way, i.e. RDF-ized. The Moodle information model for representing logs is discussed in [3]. Having an RDF fact base, we may start creating rules on top of it. These rules are further executed by a reasoning engine, which may run as an external service. There are several Semantic Web reasoners: •
•
• 1 2 3 4 5
Notation3, or N3 1 as it is more commonly known, is a shorthand nonXML serialization of RDF, designed with human-readability in mind. N3 has a reasoning engine, CWM2 , written in Python and part of SWAP, a Semantic Web Application Platform. It is open source under the W3C software license. Semantic Web Rule Language (SWRL)3 is a combination between the OWL DL and OWL Lite and the Unary/Binary Datalog RuleML4 sublanguages of the Rule Markup Language. Racer (Renamed ABox and Concept Expression Reasoner)5 is an OWL based reasoner. RacerPro (the commercial version) allows users to describe N3 Specification: http://www.w3.org/DesignIssues/Notation3 CWM, http://www.w3.org/2000/10/swap/doc/Processing http://www.w3.org/Submission/SWRL/ http://www.ruleml.org http://www.racer-systems.com/products/racerpro/index.phtml
1 Semantic Web and Rule Reasoning inside of E-Learning Systems
•
•
3
their data and benefit from powerful ontology-based query answering systems. It has been extended with support for applying SWRL rules to set of OWL facts or to RDF descriptions. JenaRules6 is an extension of the standard Jena reasoner7 . The system provides a rule language which is somehow similar with N3 notation. A Java API for JenaRules and SPARQL is provided. Mandarax8 is an open source java class library for deduction rules. It provides an infrastructure for defining, managing and querying rule bases. It is based on backward reasoning and is pure OO.
We consider that JenaRules is the best choice at this moment, because it is specially designed for the Semantic Web. There are several possibilities to RDF-izing Moodle content. The first option is a script, which periodically passes through the Moodle log and updates the RDF fact base with new data. The second option is an update of the RDF fact base at the same time when the log is updated. This solution requires some modifications into existing Moodle code. And the third solution is to use Jena RDF front-end to MySQL. We are in favor of this solution since it does not require too much work and is natural way of accessing databases without a need to duplicate existing log data. Another advantage of this approach is that current version of Jena implementation loads the full fact base from the RDF source, which is memory-consuming in case of real life Moodle system. Using the front-end to MySQL solves this problem.
1.3 Inside JenaRules Jena9 is a Java framework for building Semantic Web applications. It provides a programmatic environment for RDF10 , RDFS, OWL11 and SPARQL12 and includes a rule-based inference engine. Jena includes a reasoner to reason with rules. Rules can be created using a text file, or in applications using a String data type. 1.3.1 Jena Rules An informal description of the simplified text rule syntax can be found at : http://jena.sourceforge.net/inference/index.html#RULEsyntax. A sample file containing Jena rules is: 6 7 8 9 10 11 12
http://jena.sourceforge.net/inference http://jena.sourceforge.net http://mandarax.sourceforge.net/ Jena Semantic Web Framework: http://jena.sourceforge.net/ RDF specification and documentation: http://www.w3.org/RDF OWL specification and documentation: http://www.w3.org/2004/OWL SPARQL specification: http://www.w3.org/2001/sw/DataAccess
4
Ion-Mircea Diaconescu, Sergey Lukichev and Adrian Giurca // Prefixes definition @prefix moodle: http://www.moodle.org/# @prefix userdef: http://www.moodle.org/annotations# @prefix lecture: http://www.moodle.org/lectures# @prefix xs: http://www.w3.org/2001/XMLSchema# // We may include rules from another file. // @include http://www.example.org/rules/relations.rules // If a student has between 25 and 49 posts in a specific forum, // then the student rank is 2 for that forum. [forum_rank: (?student, userdef:rank ’2’^^xs:integer)