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 http://lst.nectec.or.th/oam/ © LST Lab, NECTEC, Thailand Last updated: Dec 22, 2016
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.
Software used by and bundled with OAM Framework user’s package Apache Jena (http://jena.apache.org/) D2RQ (http://d2rq.org/) Hozo ontology editor (http://www.hozo.jp/) Apache Tomcat (http://tomcat.apache.org/) 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).
Semantic KM Tools Workshop LST Lab, NECTEC OAM Tutorial: Part 1 - Database to Ontology Mapping & Semantic Search System Semantic KM Tools Workshop LST Lab, NECTEC
Required Software Java Development Kit (JDK) 6 AppServ Navicat for MySQL Notepad++ or EditPlus Mozilla Firefox or Google Chrome Web Browser OpenOffice Calc or Microsoft Excel
5-Step Process Preparing OWL Ontology File Create a Database in MySQL Database to Ontology Mapping Configuration Search Application Configuration Start Search Application
Step 1/5: Preparing OWL Ontology File
Export OWL Ontology from Hozo Ontology Editor
Step 2/5 - Create a Database in MySQL
Create database data using Microsoft Excel or Openoffice Calc player_sample.xls club_sample.xls country_sample.xls
Import database data to MySQL Database using Navicat
Create New Database
Import Data from Excel
Step 3/5: Database to Ontology Mapping Configuration
Set up Environment Variable
Set up internal database
Start Apache Tomcat
Start Mapping Web Interface Open Firefox or Chrome http://localhost:8080/config/
DB and Ontology Configuration
Class - Table Mapping
List of Class – Table Mapping
Property – Column Mapping
Datatype Property Mapping
Object Property Mapping
List of Property Mapping
Vocabulary Mapping
List of Vocabulary Mapping
Vocabulary Mapping
Save Configuration
Create/ Update RDF Data
Step 4/5: Search Application Configuration
Application Config
Search Property Properties that are allowed in Search Condition
Display Property Properties that are allowed to display search results
Change Search/Display Property
Save Configurations
Step 5/5: Start Search Application
Start Semantic Search Web Interface Open URL: http://localhost:8080/search/
Search Conditions and Results Class to search Search property Search condition Display property
Using New Search Interface Open URL: http://localhost:8080/searching/ 2 4 1 3 5
New functions RESTFul Web API Keyword search over datatype properties Search property displayed as labels or property names Menu language switch (English or Thai) CSV or JSON export
Using Web API http://localhost:8080/searching/api/dataset/query?dsname=&path=Player &property=has_country&operator=ISA&value=&valueRelation=europea n&property=&value=&limit=100&offset=0 Request URL Result in JSON format
OAM Tutorial: Part 2 - Recommender Application Management Semantic KM Tools Workshop LST Lab, NECTEC
6-Step Process Prepare OWL ontology and update RDF data Recommender Application Configuration Create rules in Microsoft Excel Mapping rules with ontology Apply rules Start search application to view results
Step 1/6: Prepare OWL ontology and update RDF data
Add recommendation class in ontology 2 1
Export OWL Ontology from Hozo Ontology Editor
Start Mapping Web Interface Open Firefox or Chrome http://localhost:8080/config/
Update New Ontology File
Save Configuration
** Please restart Tomcat after this step.** Update RDF Data ** 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
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
3-Step process Create headers for criteria name Create headers for criteria range Create rules in table format
Create headers for criteria name Criteria name for ‘Football Club’ สโมสรอยู่ในประเทศ (club country) Criteria name for ‘Player’ อายุ (player age) เล่นในประเทศ (player’s club country)
Create headers for criteria range สโมสรอยู่ในประเทศ (club country) => ‘เอเชีย’ (Asia), ‘ยุโรป’ (Europe) อายุ (player age) => ‘<23’, ‘>=23’ เล่นในประเทศ (player’s club country) => อเมริกาใต้ (South America), ยุโรป (Europe), เอเชีย (Asia)
Create rules in table format IF (club’s country in Europe) THEN recommend (players who have ages >= 23 and have club country in Asia) to the club. 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 http://localhost:8080/rule/
2-step process Upload rules in Excel file Mapping rule criteria with ontology
Upload rules in Excel file
Mapping rule criteria with ontology Mapping criteria name Object property Mapping criteria values Class names
Mapping rule criteria (2) Datatype property Operator + Value Object property Class names
Finish Creating Rules
Step 5/6: Apply rules
** Please restart Tomcat after this step.** Apply rules http://localhost:8080/config/ ** Please restart Tomcat after this step.**
Step 6/6: Start search application to view results
Update Application Config
Add Display Property
Change Search/Display Property
Save Configurations
Search to view recommendation results http://localhost:8080/search/ 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
Recommender Web Service Example Input Output
5-Step Process Connect to Web API config database Create config profile Web API input parameter config Web API Output config 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: http://localhost/ws_adm/
Initialize configuration database
Step 2/5: Create config profile
Create new config profile
Initialize config profile 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 Class name Table name
Web API Input Parameter Config (2)
Step 4/5: Web API Output config
Web API Output Config 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 form_test.html URL: http://localhost:8080/rec_api/WS/state/reccommend/football/Football_club form_test.html
View Web API result Input Parameters Class name Profile name Web API Outputs
End of Tutorial http://lst.nectec.or.th/oam/