This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns nhl.analysis | |
(:use [seabass core] ) | |
(:use [incanter core stats charts] )) | |
(defn get-data[ n m] (map #(str "data/file-" % ".nt") (range n (+ 1 m)))) | |
(defn get-model [n m] (apply build (get-data n m))) | |
(def ont "files/ontology.ttl") | |
(def rules "files/nhl.rules") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns nhl.parse | |
(:require [clojure.string] | |
[clojure.contrib [json :as json]] )) | |
(defn nope? [x] (or (= "" x) (= nil x))) | |
(defn blank [id] (str "_:b" @id) ) | |
(defn node [namespace id] (if-not (or (nope? namespace) (nope? id)) (str "<" namespace id ">") )) | |
(defn str-lit [val] (if-not (nope? val) (str \" val \") )) | |
(defn int-lit [val] (if-not (nope? val) (str \" val \" "^^<http://www.w3.org/2001/XMLSchema#integer>") )) | |
(defn date-lit [val] (if-not (nope? val) (str \" val \" "^^<http://www.w3.org/2001/XMLSchema#date>") )) |