Ontology Application Management (OAM) Framework User Tutorial Part 1: Database to Ontology Mapping & Semantic Search System Part 2: Recommender Application Management Part 3: Recommender Web API Management Last updated: Feb 4, 2016 © LST Lab, NECTEC, Thailand
About OAM Framework To simplify creation and adoption of a semantic web application. – Provides common application templates that can process the user's published RDF data. – User's programming skill is NOT REQUIRED in building a prototype application. – Supports both RDF data publishing from databases and building ontology-based applications Semantic search, Recommender system applications. 2
Software used by and bundled with OAM Framework user’s package Apache Jena ( D2RQ ( Hozo ontology editor ( Apache Tomcat ( 3 Note: OAM framework was originally developed as a companion application framework for OWL ontologies developed using Hozo ontology editor. It also works with OWL ontologies created using Protege 4.x Ontology Editor (although with some limitation).
OAM Tutorial: Part 1 - Database to Ontology Mapping & Semantic Search System Semantic KM Tools Workshop LST Lab, NECTEC
Required Software 1.Java Development Kit (JDK) 6 2.AppServ 3.Navicat for MySQL 4.Notepad++ or EditPlus 5.Mozilla Firefox or Google Chrome Web Browser 6.OpenOffice Calc or Microsoft Excel 5
5-Step Process 1.Preparing OWL Ontology File 2.Create a Database in MySQL 3.Database to Ontology Mapping Configuration 4.Search Application Configuration 5.Start Search Application 6
Step 1/5: Preparing OWL Ontology File
Export OWL Ontology from Hozo Ontology Editor 8
9
Step 2/5 - Create a Database in MySQL
Create database data using Microsoft Excel or Openoffice Calc player_sample.xls country_sample.xls club_sample.xls 11
Import database data to MySQL Database using Navicat 12
Create New Database 13
Import Data from Excel 14
15
16
Step 3/5: Database to Ontology Mapping Configuration
Set up Environment Variable 18
Set up internal database 19
Start Apache Tomcat 20
Start Mapping Web Interface Open Firefox or Chrome
DB and Ontology Configuration 22
Class - Table Mapping 23
List of Class – Table Mapping 24
Property – Column Mapping 25
Datatype Property Mapping 26
Object Property Mapping 27
List of Property Mapping 28
Vocabulary Mapping 29
List of Vocabulary Mapping 30
Vocabulary Mapping 31
Save Configuration 32
Create/ Update RDF Data 33
Step 4/5: Search Application Configuration
Application Config 35
Search Property Properties that are allowed in Search Condition 36
Display Property Properties that are allowed to display search results 37
Change Search/Display Property 38
Save Configurations 39
Step 5/5: Start Search Application
Start Semantic Search Web Interface Open URL: 41
Search Conditions and Results Class to search Search condition Display property Search property 42
OAM Tutorial: Part 2 - Recommender Application Management Semantic KM Tools Workshop LST Lab, NECTEC
6-Step Process 1.Prepare OWL ontology and update RDF data 2.Recommender Application Configuration 3.Create rules in Microsoft Excel 4.Mapping rules with ontology 5.Apply rules 6.Start search application to view results
Step 1/6: Prepare OWL ontology and update RDF data
Add recommendation class in ontology 1 2
Export OWL Ontology from Hozo Ontology Editor 47
48
Start Mapping Web Interface Open Firefox or Chrome
Update New Ontology File 50
Save Configuration 51
Update RDF Data 52 ** Please restart Tomcat after this step.**
Step 2/6: Recommender Application Configuration
Add a new class in Application Config Player_Recommendation
Define a Recommendation Class Click to define that this is a recommendation class
Save Configurations 56
Step 3/6: Create rules in Microsoft Excel
Using Excel to create rules Advantages – No need to learn new tools – Can create a large number of rules – User can use any vocabulary 58
3-Step process Create headers for criteria name Create headers for criteria range Create rules in table format 59
Create headers for criteria name 60 Criteria name for ‘Football Club’ สโมสรอยู่ในประเทศ (club country) Criteria name for ‘Player’ อายุ (player age) เล่นในประเทศ (player’s club country)
Create headers for criteria range 61 สโมสรอยู่ในประเทศ (club country) => ‘ เอเชีย ’ (Asia), ‘ ยุโรป ’ (Europe) อายุ (player age) => ‘ =23’ เล่นในประเทศ (player’s club country) => อเมริกาใต้ (South America), ยุโรป (Europe), เอเชีย (Asia)
Create rules in table format 62 Rules 1.IF (club’s country in Europe) THEN recommend (players who have ages >= 23 and have club country in Asia) to the club. 2.IF (club’s country is Asia) THEN recommend (players who have ages >= 23 and have club country in Europe) to the club.
Step 4/6: Mapping rules with ontology
Start Rule Management System Open Firefox or Chrome
2-step process Upload rules in Excel file Mapping rule criteria with ontology 65
Upload rules in Excel file 66
Mapping rule criteria with ontology 67 Mapping criteria name Mapping criteria values Object property Class names
Mapping rule criteria (2) 68 Operator + Value Datatype property Class names Object property
Finish Creating Rules 69
Step 5/6: Apply rules
Apply rules 71 ** Please restart Tomcat after this step.**
Step 6/6: Start search application to view results
Update Application Config 73
Add Display Property 74
Change Search/Display Property 75
Save Configurations 76
Search to view recommendation results 77 Search conditions Recommendation results
OAM Tutorial: Part 3 - Recommender Web API Management Semantic KM Tools Workshop LST Lab, NECTEC
Related Tools Recommender Web Service Recommender Web Service Configuration Tool 79
Recommender Web Service Example 80 Input Output
5-Step Process 1.Connect to Web API config database 2.Create config profile 3.Web API input parameter config 4.Web API Output config 5.Test Web API results
Step 1/5: Connect to Web API config database * copy “ws_adm” from “OAM_Tools\software\add-on” to “C:\AppServ\www”
Initialize configuration database Start Web Browser at URL: 83
Initialize configuration database 84
Step 2/5: Create config profile
Create new config profile 86
Initialize config profile 87 Database setting (the same database used in DB-ontology mapping) SKAF_HOME setting
Step 3/5: Web API input parameter config
Web API Input Parameter Config 89 Class name Table name
Web API Input Parameter Config (2) 90
Step 4/5: Web API Output config
Web API Output Config 92 XML tag name property linked to ‘Player’ class property of ‘Player’ class to show in result
Step 5/5: Test Web API results
Create test form 94 form_test.html URL:
View Web API result 95 Input Parameters Web API Outputs Class name Profile name
End of Tutorial 96