<commit_before>/**
 * Created by Spadon on 19/08/2015.
 */

var should = require('should');
var fs = require('fs');
var path = require('path');
var mime = require('mime-types');

var Logics = require('../hylar/core/Logics/Logics');
var OWL2RL = require('../hylar/core/OWL2RL');
var emitter = require('../hylar/core/Emitter');

var H = require('../hylar/hylar');
var owl, ontology, Hylar = new H();

var reasoningMethod = process.env.rm;
var triples = fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_14.nt')).toString();
var baseOntoTxt = fs.readFileSync(path.resolve(__dirname + '/ontologies/univ-bench-base-onto.ttl')).toString();

var univ1 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_0.ttl')).toString();
var univ2 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_5.ttl')).toString();
var univ3 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_14.ttl')).toString();

/*var univ1 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-5k.ttl')).toString();
var univ2 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-20k.ttl')).toString();
var univ3 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-50k.ttl')).toString();*/

//univ1=univ3;
//univ1 += univ2 + univ3; //20k 

Hylar.setRules(OWL2RL.equality.concat(OWL2RL.transitivityInverse, OWL2RL.equivalence, OWL2RL.subsumption));
//Hylar.setRules(OWL2RL.equivalence);
//Hylar.setRules(OWL2RL.equality);
//Hylar.setRules(OWL2RL.subsumption);
//Hylar.setRules(OWL2RL.transitivityInverse);

var date = new Date().getTime();
var firedRules;

emitter.on('rule-fired', function(rulename) {
    if (!firedRules[rulename]) {
        firedRules[rulename] = 0;
    }           
    firedRules[rulename]++;
});

function initFiredRules() {
    firedRules = {};    
}<commit_msg>Stashing<commit_after>/**
 * Created by Spadon on 19/08/2015.
 */

var should = require('should');
var fs = require('fs');
var path = require('path');
var mime = require('mime-types');

var Logics = require('../hylar/core/Logics/Logics');
var OWL2RL = require('../hylar/core/OWL2RL');
var emitter = require('../hylar/core/Emitter');

var H = require('../hylar/hylar');
var owl, ontology, Hylar = new H();

var reasoningMethod = process.env.rm;
var triples = fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_14.nt')).toString();
var baseOntoTxt = fs.readFileSync(path.resolve(__dirname + '/ontologies/univ-bench-base-onto.ttl')).toString();

var univ1 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_0.ttl')).toString();
var univ2 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_5.ttl')).toString();
var univ3 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University0_14.ttl')).toString();

/*var univ1 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-5k.ttl')).toString();
var univ2 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-20k.ttl')).toString();
var univ3 = baseOntoTxt + fs.readFileSync(path.resolve(__dirname + '/ontologies/University20-50k.ttl')).toString();*/

//univ1=univ3;
//univ1 += univ2 + univ3; //20k

Hylar.setRules(OWL2RL.equality.concat(OWL2RL.transitivityInverse, OWL2RL.equivalence, OWL2RL.subsumption));
//Hylar.setRules(OWL2RL.equivalence);
//Hylar.setRules(OWL2RL.equality);
//Hylar.setRules(OWL2RL.subsumption);
//Hylar.setRules(OWL2RL.transitivityInverse);

var date = new Date().getTime();
var firedRules;

emitter.on('rule-fired', function(rulename) {
    if (!firedRules[rulename]) {
        firedRules[rulename] = 0;
    }           
    firedRules[rulename]++;
});

function initFiredRules() {
    firedRules = {};    
}
{'fraction_non_alphanumeric': 0.17571059431524547, 'fraction_numerical': 0.02739018087855297, 'mean_word_length': 5.086477987421383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6239392', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1416, 'n_words': 210}