Permalink
Browse files

Algorithm skeleton

  • Loading branch information...
giuseppefutia committed Feb 15, 2017
1 parent 87dbcb2 commit 0b89d284e9aa3339f9b6255dc983788d07bb192e
Showing with 66 additions and 0 deletions.
  1. +66 −0 semantics/learning.js
View
@@ -0,0 +1,66 @@
// Set of domain ontologies
var ontologies = [];
// TODO Script for reading ontologies. Maybe an RDF parser?
// Set of known models (semantic mapping) between existing datasets and domain ontologies
var models = [];
// TODO Script for reading models. If SPARQL CONSTRUCT, maybe a SPARQL parser?
// Source data on which we want to automatically compute the semantic model
var source = {};
/**
*
* Extract semantic types
*
* @param {Object} source Source data
* @param {??????} trSet Training set of already known semantic types
*
* @return {??????} st Semantic types of the source data
*
*/
var identifySemanticTypes = function (source, trSet) {
var st = {};
// TODO Call the hypothesis function generated by the CRF algorithm
return st;
}
/**
*
* Construct the semantic graph
*
* @param {Object} st Semantic types of the source data
* @param {??????} models Set of known models
* @param {??????} ontologies Set of domain ontologies
*
* @return {??????} graph Graph for modelling source data
*
*/
var buildGraph = function (st, models, ontologies) {
var graph = {};
// Implementation to generate the graph
return graph;
}
/**
*
* Compute the candidate semantic models for the semantic types of source data
*
* @param {Object} st Semantic types of the source data
* @param {??????} graph Graph for modelling source data
*
* @return {??????} models Set of candidate models
*
*/
var computeCandidateModels = function (st, graph) {
var models = [];
// Implementation of the function to chose the candidates
return models;
}
var scoreCandidateModels = function () {
// It is not so clear how to generate the score for the candidate model
}

0 comments on commit 0b89d28

Please sign in to comment.