<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Valerio Cocchi on Medium]]></title>
        <description><![CDATA[Stories by Valerio Cocchi on Medium]]></description>
        <link>https://medium.com/@valerio.cocchi.p?source=rss-a4fddadff397------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MgQ_VHfdqiM2Xn5hiQWZhQ.jpeg</url>
            <title>Stories by Valerio Cocchi on Medium</title>
            <link>https://medium.com/@valerio.cocchi.p?source=rss-a4fddadff397------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:11:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@valerio.cocchi.p/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RDFox’s improved OWL implementation]]></title>
            <link>https://medium.com/oxford-semantic-technologies/rdfoxs-improved-owl-implementation-b0666e453c21?source=rss-a4fddadff397------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0666e453c21</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[advice]]></category>
            <dc:creator><![CDATA[Valerio Cocchi]]></dc:creator>
            <pubDate>Thu, 15 Apr 2021 14:33:00 GMT</pubDate>
            <atom:updated>2021-04-16T12:03:22.568Z</atom:updated>
            <content:encoded><![CDATA[<h4>RDFox V5: A short tutorial</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5eMaGEpRtST2rUaXK12nRw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@bee_balogun?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Bee Balogun</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In RDFox v5.0.0, we have changed the way the implementation of OWL works, as well as a bunch of other things (see <a href="https://docs.oxfordsemantic.tech/release-notes.html#releases">here</a>).</p><p>In this article, we will outline the difference between the two approaches, and why the new one is better. If you’d like to follow along, you can find the data and ontologies in <a href="https://github.com/OxfordSemantic/OWL-RDFox">this</a> GitHub repository.</p><h4>OWL in Turtle vs Functional Style</h4><p>In both RDFox v4 and v5, OWL is supported in 2 syntaxes:<br>Axioms can be imported in functional-style syntax (<strong>fss</strong>):</p><pre>#ontology.fss#</pre><pre>Prefix(:=&lt;http://www.example.com/ontology1#&gt;)</pre><pre>Ontology( &lt;http://www.example.com/ontology1&gt;<br>     SubClassOf( :Cat :Mammal )<br>     SubClassOf( :Mammal :Animal))</pre><p>And in Turtle (<strong>ttl</strong>):</p><pre>#ontology.ttl#</pre><pre>@prefix : &lt;http://www.example.com/ontology1#&gt; .<br>@prefix owl: &lt;http://www.w3.org/2002/07/owl#&gt; .<br>@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .<br>@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .</pre><pre>&lt;http://www.example.com/ontology1&gt; a owl:Ontology .</pre><pre>:Cat rdfs:subClassOf :Mammal .<br>:Mammal rdfs:subClassOf :Animal .</pre><p>Now, Turtle has the advantage that one is able to ‘<em>query the ontology</em>’ directly. However, it also means that the ontology and data are mixed, which we may wish to avoid.</p><h4><em>Importing fss ontologies</em></h4><p>When working with <strong>fss</strong> ontologies, there is no change between version 4 and 5. These are imported with:</p><pre>import ontology.fss</pre><p>An ontology can also be applied to a particular named graph with:</p><pre>import &gt; :data ontology.fss</pre><p>Furthermore, in v5 we can specify what named graph an ontology should be applied to directly in the ontology file:</p><pre>#ontology_all_graphs.fss#</pre><pre>Prefix(:=&lt;http://www.example.com/ontology1#&gt;)<br>Ontology( &lt;http://www.example.com/ontology1&gt;<br>     Annotation(rdfox:NamedGraph :data)<br>     SubClassOf( :Child :Person )<br>     SubClassOf( :Person ObjectUnionOf(:Child :Adult) )<br>)</pre><p>This means that we can have a single file with multiple ontologies, each of which is applied to a particular named graph, and we can import it with just one command:</p><pre>import ontology_all_graphs.fss</pre><p>Note that in this case we only have one ontology with one named graph.</p><h4>Importing Turtle ontologies</h4><p>However, when it comes to ontologies in Turtle,<strong> there is a difference</strong> between v4 and v5. In <strong>v4</strong>, Turtle ontologies can be enabled at datastore creation with the following flag:</p><pre>owl-in-rdf-support off | relaxed | strict</pre><p>However, ontologies cannot be parsed if they are in a named graph, nor can they be applied to data that is in a named graph. In v5 however, we address this issue.</p><h4>Example</h4><p>Let us go through an example of the new OWL implementation in the shell:</p><pre>dstore create default</pre><pre>prefix : &lt;http://www.example.com/ontology1#&gt;</pre><pre>set output out</pre><pre>import &gt; :data data.ttl<br>import &gt; :ontology ontology.ttl</pre><p>Now, this has not parsed the triples of the ontology as actual axioms yet, as evidenced by the fact that no triples were inferred, as you can see by running:</p><pre>select ?type from :data where { ?cat a :Cat , ?type . FILTER(?type != :Cat)}</pre><p>Note above that our cats are not inferred to also be member of other classes, i.e. mammals and animals.</p><p>You can see what axioms apply to the data graph with this command:</p><pre>info axioms :data</pre><p>which returns an empty list, meaning that no axioms apply (yet).</p><p>We will instead parse the axioms asynchronously with:</p><pre>importaxioms :ontology &gt; :data</pre><p>See the docs <a href="https://docs.oxfordsemantic.tech/command-line-reference.html#importaxioms">here</a> for the specifics of the command.</p><p>Now we can see that <strong>inferences</strong> <strong>have</strong> <strong>happened</strong>:</p><pre>select ?type from :data where {?cat a :Cat , ?type FILTER(?type != :Cat)}</pre><pre>info axioms :data</pre><p>We can also export the axioms to a file:</p><pre>export myAxioms.fss text/owl-functional</pre><pre>#or in the datalog conversion<br>export myAxioms.dlog application/x.datalog rule-domain axioms</pre><p>Now, it is generally advisable to have the ontology and data kept in separate named graphs, but there is nothing stopping us from putting both into the default graph and parsing axioms like this:</p><pre>dstore create default</pre><pre>import data.ttl #import into default graph<br>import ontology.ttl</pre><pre>importaxioms rdfox:DefaultTriples &gt; rdfox:DefaultTriples </pre><p>Note that rdfox:DefaultTriples is the name of the default graph in RDFox.</p><h4>Reasoning</h4><p>What we have described so far was ‘data reasoning’, i.e. given a dataset and an ontology, we apply the ontology’s axioms to the dataset to draw inferences.<br>This is what OWL 2 RL (the fragment supported by RDFox) was designed to achieve.</p><p>However, some ‘schema’ reasoning can also be achieved with RDFox. To do this, RDFox can load a <strong>predefined set of 15 rules </strong>into a named graph containing OWL axioms in Turtle format and derive new such axioms (see more <a href="https://docs.oxfordsemantic.tech/reasoning.html?highlight=rdfox%20tboxreasoning#subsumption-reasoning">here</a>).</p><p>The following command:</p><pre>answer ! LOAD &lt;rdfox:TBoxReasoning&gt; INTO GRAPH :ontology</pre><p>will then <em>materialise</em> the fact that :Cat is a direct subclass of :Animal in the :ontology<strong> </strong>graph.</p><p>The rule that derives this fact is:</p><pre>[?X, rdfs:subClassOf,?Z] :-<br>     rdfs:subClassOf[?X,?Y],<br>     rdfs:subClassOf[?Y,?Z],<br>     FILTER(isIRI(?Z)) .</pre><p>Here, ?X is<em> bound </em>to :Cat, ?Y to :Mammal, ?Z to :Animal.<br>There are 14 other rules that derive similar results.</p><p>This contrasts with the data reasoning approach. In data reasoning a specific cat, say :sylvester, is inferred to be a mammal with the <em>first</em> axiom.<br>Then, given that :sylvester is now also a mammal he is further inferred to be an animal, this time with the <em>second</em> axiom.</p><h3>What about migration from v4 to v5?</h3><p>For devs using RDFox persistence:<br>Between versions 4 and 5 the persistence format has changed, to improve usability and add SHACL support. However, because OWL support is now <strong>more</strong> <strong>straightforward</strong> than before, this is not an issue. We can migrate from v4’s persistence by using the usual <strong>transcribe</strong> command in the v4 shell (see instructions <a href="https://docs.oxfordsemantic.tech/command-line-reference.html#transcribe">here</a>).</p><p>In short, this command will produce a script (stable across versions) that we can use to recreate the persisted data in v5 because the old database would have had both axioms and triples in it.</p><p>If you wish for the axioms to be parsed, you then need to run:</p><pre>importaxioms rdfox:DefaultTriples &gt; rdfox:DefaultTriples</pre><p>If you further wish to add schema reasoning (as was automatically added in v4), then just run:</p><pre>answer ! LOAD &lt;rdfox:TBoxReasoning&gt;</pre><p>We hope this short tutorial has guided you through the latest updates to our OWL implementation. If you haven’t given this a go for yourself yet, you can find the repository <a href="https://github.com/OxfordSemantic/OWL-RDFox">here</a>. You can try through this example both in the shell and in REST (with cURL).</p><p>If you’d like to try out Version 5, you can request a 30 day <a href="https://www.oxfordsemantic.tech/tryrdfoxforfree">free trial</a> or a <a href="http://www.oxfordsemantic.tech/contact">demonstration</a>. For more information on RDFox check out our <a href="http://www.oxfordsemantic.tech/">website</a> and <a href="https://medium.com/oxford-semantic-technologies">medium publication</a>.</p><h3>Team and Resources</h3><p>The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Innovation (OSI) and Oxford University’s investment arm (OUI). The author is proud to be a member of this team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0666e453c21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oxford-semantic-technologies/rdfoxs-improved-owl-implementation-b0666e453c21">RDFox’s improved OWL implementation</a> was originally published in <a href="https://medium.com/oxford-semantic-technologies">Oxford Semantic Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pro tips for writing scripts]]></title>
            <link>https://medium.com/oxford-semantic-technologies/pro-tips-for-writing-scripts-441783bb271e?source=rss-a4fddadff397------2</link>
            <guid isPermaLink="false">https://medium.com/p/441783bb271e</guid>
            <category><![CDATA[efficient-working]]></category>
            <category><![CDATA[rdfox]]></category>
            <category><![CDATA[semantic-reasoning]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Valerio Cocchi]]></dc:creator>
            <pubDate>Thu, 16 Jul 2020 09:28:11 GMT</pubDate>
            <atom:updated>2021-03-27T10:06:01.933Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using scripts with RDFox</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uOdJTLaKAUkEzGSmomN5xg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@carlevarino?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Cesar Carlevarino Aragon</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Scripts can help you save time and avoid duplication of code for setting up data stores, and executing your rules and queries. This article will explain what a script is, how to write scripts, when to use scripts, how to use scripts with persistence, how to structure your workspace, and finally how use scripts within scripts, to set up your data source.</p><p>This article uses RDFox, a high-performance knowledge graph and semantic reasoning engine, that was designed from the ground up with reasoning and performance in mind. The powerful reasoning engine is unmatched in efficiency and reasoning capabilities, and by using rules it can provide flexible, incremental addition and retraction of data, as well as, fast parallel materialisation of new facts.</p><p>So why not combine the efficiency of scripts with the power of RDFox in your production environment? Click <a href="https://www.oxfordsemantic.tech/request-eval">here</a> to request an RDFox license.</p><h3>What is a script?</h3><p>A script is a text file which contains the instructions you would enter through the command line. Rather than entering each command manually, the script is run at import time and executes all the commands at once.</p><p>For example, the following script includes all the commands from the <a href="https://medium.com/oxford-semantic-technologies/getting-started-with-rdfox-79adbbfa86b1?source=friends_link&amp;sk=c823cd9dc39c3ead0bd78c3e91d46bab">getting started guide</a>, which were entered sequentially in the command line. By putting the commands into a script, which can be run when you first start RDFox, you can save a considerable amount of time:</p><p>On Mac/Linux: ./RDFox sandbox . start.script</p><p>On Windows: RDFox.exe sandbox . start.script</p><pre>dstore create family par-complex-nn</pre><pre>active family import data.ttl</pre><pre>set output out</pre><pre>prefix : &lt;https://oxfordsemantic.tech/RDFox/getting-started/&gt;</pre><pre>select ?s ?p ?o where { ?s ?p ?o }</pre><pre>select ?p ?n where { ?p rdf:type :person . ?p :forename ?n }</pre><pre>insert { ?x :married_to ?y } where { ?y :married_to ?x }</pre><pre>import ! [?p, :has_child, ?c] :- [?c, :has_parent, ?p] .</pre><pre>select ?p ?c where { ?p :has_child ?c }</pre><pre>delete { :stewie :has_parent :lois } where { :stewie :has_parent :lois }</pre><pre>endpoint start</pre><h3>Best practices for writing a script</h3><p>In order to get the most out of your scripts, the team at Oxford Semantic Technologies have developed and refined the following tips.</p><h4>Structuring your workspace</h4><p>OST recommend creating multiple scripts, for example, for commands and prefixes, and structuring your workspace to help improve clarity and maintainability. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cYXbFO2rgrTVvdZU_AyDwg.png" /><figcaption>An example workspace</figcaption></figure><p>The OST team suggest storing the queries, rules, data sources, and other scripts (see below) separately within the workspace and having one main script to control the others, i.e. the startup script.</p><h4>Structuring the start-up script</h4><p>The scripts including an explanation for each step, following the hashtags..</p><p>The first part of the script initialises the datastore settings:</p><pre>#Template startup script </pre><pre>#name your datastore and initialise it<br>#---------------</pre><pre>active myDs</pre><pre>dstore create myDs par-complex-nn   <br></pre><pre>#This will let us see query answers on the terminal<br>#---------------</pre><pre>set output out <br></pre><pre>#This will specify where we can find data, rules, and queries.<br>#Other options are available too.<br>#This helps keep a tidy working directory.<br>#---------------</pre><pre>set dir.facts &quot;$(dir.root)Data/&quot;</pre><pre>set dir.dlog &quot;$(dir.root)Rules/&quot;</pre><pre>set dir.queries &quot;$(dir.root)Queries/&quot;</pre><pre>set dir.scripts &quot;$(dir.root)Scripts/&quot;</pre><p>In the scripts folder, we find it useful to store the prefixes in a dedicated script, for example prefixes.script would look like:</p><pre>#Defining different namespaces can be useful.<br>#---------------</pre><pre>prefix tt: &lt;http://data.example.org/tupletables/&gt;</pre><pre>prefix type: &lt;http://data.example.org/ontology/classes/&gt;</pre><pre>prefix prop: &lt;http://data.example.org/ontology/properties/&gt;</pre><pre>prefix : &lt;http://data.example.org/entities/&gt;</pre><p>We can use scripts to import the prefixes, add and attach live datasources to RDFox, along with the rules which map the datasources to triples. Additionally, we can set the number of threads, which allows for parallelisation.</p><pre>#This is for defining prefixes, taking the prefix script from a file.<br># — — — — — — — -</pre><pre>prefixes.script <br></pre><pre>#This adds and attaches live datasource to RDFox.<br>#In this case, we attach a csv, but one can also connect to PostgreSQL natively.<br>#One can also connect to other SQL databases via ODBC.<br># — — — — — — — -</pre><pre>dsource.script <br></pre><pre>#Then we import rules mapping the attached datasources to triples.<br># — — — — — — — -</pre><pre>import mapRule.dlog <br></pre><pre>#We can set threads as well, in order to parallelise<br># — — — — — — — -</pre><pre>threads 3 <br></pre><p>Next we can import the triples and rules in parallel, and materialise the rules within the datastore.</p><pre>#Here we import data with out first transaction.<br># — — — — — — — -<br>begin</pre><pre><br>#Importing data (triples) in parallel.<br># — — — — — — — -</pre><pre>import triples1.ttl triples2.trig triples3.ttl<br></pre><pre>#Import other rules, also in parallel.<br># — — — — — — — -</pre><pre>import rule1.dlog rule2.dlog rule3.dlog rule4.dlog <br></pre><pre>#We can materialise the rules within a transaction with mat.<br>#Alternatively, the rules will be materialised automatically when the transaction is committed<br># — — — — — — — -</pre><pre>mat</pre><pre>commit</pre><p>To see the information about our datastore we can include the ‘info’ command. Additionally, we can expose an endpoint and access RDFox’s console. As well as querying or managing your knowledge graph using an IDE of your choice, such as Emacs or Visual Studio Code, you can type SPARQL queries into the RDFox console.</p><pre>#This will print information about our datastore.<br># — — — — — — — -<br>info </pre><pre>#We set a port for our endpoint, with 12110 being the default.<br>#Security can also be configured, see docs.<br>#We can also start querying from the console, which will be at <a href="http://localhost:8080/console/myDs">http://localhost:8080/console/myDs</a><br># — — — — — — — -</pre><pre>set endpoint.port 8080</pre><pre>endpoint start</pre><p>You can find more information on initiating the console in our <a href="https://docs.oxfordsemantic.tech/">docs.</a></p><p>As well as data and rules being imported in parallel, queries can also be answered in parallel. This is done using the following commands within the script:</p><pre>#Queries too can be answered in parallel.<br># — — — — — — — -</pre><pre>answer q1.sparql q2.sparql q3.sparql q4.sparql <br></pre><pre>#Or they can be answered on after the other, using echo to space the results out.<br># — — — — — — — -<br>answer q1.sparql</pre><pre>echo “\n\n=====”</pre><pre>answer q2.sparql</pre><p>RDFox can provide multiple formats for the query results, including printing the results to a file. You can include how the query output format in the script.</p><pre>#The output can also be printed to a file.<br>#Furthermore, there are multiple answer formats available.<br># — — — — — — — -<br>set output myOutput.txt</pre><pre>set query.answer-format “text/csv”</pre><pre>answer q3.sparql</pre><p>You can find this script on <a href="https://github.com/OxfordSemantic/RDFoxScripts">github.</a></p><h4>Structuring the rule scripts</h4><p>We recommend keeping your rules in separate files so that you can reuse the rule templates.</p><p>For example, a rule folder could contain the main rule-patterns as defined in our <a href="https://www.oxfordsemantic.tech/rule-guide">Rule Guide</a> which would then be called upon when you need them.</p><p>Rule files can also be tailored to the use case you are solving. For example, a <em>mapping rule</em> can turn tabular data into triples that looks like this:</p><pre>[?id, rdfs:label, ?name],<br>[?id, prop:dateOfBirth, ?dob],<br>[?id, prop:registrationDateTime, ?registrationDT],<br>[?id, a, type:Person]<br>:-<br>tt:people(?id,?name,?dob,?registrationDT) .</pre><h3>When to use scripts?</h3><p>Scripts are useful in the development phase of your projects since they can be reused and allow you to pick up where you left things. Tailoring rules to your problem often involves deleting and restarting datastores which means that a script can be useful for quickly iterating until you reach a solution.</p><p>Scripts are also useful for setting up RDFox instances in a production environment.On cloud (Linux in this case), it could be done like by having a .service file where you specify the script to run:</p><pre>[Unit]</pre><pre>Description=RDFox</pre><pre>After=network.target</pre><pre>StartLimitIntervalSec=0</pre><pre>[Service]</pre><pre>Type=simple</pre><pre>Restart=always</pre><pre>RestartSec=5</pre><pre>User=ubuntu</pre><pre>ExecStart=/home/ubuntu/RDFox/3.0.1/RDFox daemon &lt;working_directory&gt; start.script</pre><pre>[Install]</pre><pre>WantedBy=multi-user.target</pre><p>Copy this into /etc/systemd/system using sudo:</p><pre>sudo cp rdfox.service /etc/systemd/system</pre><p>Enable the service when the machine boots:</p><pre>sudo systemctl enable rdfox</pre><p>Start the service manually:</p><pre>sudo service rdfox start</pre><h3>Persistence?</h3><p>Since RDFox can be persisted, one might ask why scripts are needed if RDFox can simply start from its persisted state.</p><h4>The answer here has two parts:</h4><p>1) Only the database itself is persisted at this stage, but not the shell variables, such as the active datastore, prefixes, working directories, endpoint ports, etc. Endpoints also need to be restarted every time one quits the RDFox process.</p><p>OST advises that a script is run to set these up for a better user experience.</p><p>This could be achieved with a restart.script which would look like this:</p><pre>#We need to specify which datastore we want to work on.<br># — — — — — — — -</pre><pre>active myDs</pre><pre>#Set output to be shown on the shell<br># — — — — — — — -</pre><pre>set output out<br></pre><pre>#Set our directories for a tidier workspace<br># — — — — — — — -</pre><pre>set dir.facts “(dir.root)Data/”</pre><pre>set dir.dlog “(dir.root)Rules/”</pre><pre>set dir.queries “(dir.root)Queries/”</pre><pre>set dir.scripts “(dir.root)Scripts/” <br></pre><pre>#Specify your prefixes<br># — — — — — — — -</pre><pre>prefixes.script<br></pre><pre>#Set the threads in order to parallelise<br># — — — — — — — -</pre><pre>threads 4<br></pre><pre>#Configure the endpoint and start it</pre><pre># — — — — — — — -</pre><pre>set endpoint.port 8080</pre><pre>set endpoint.access-control-allow-origin *</pre><pre>endpoint start</pre><p>Notice that there was no need to import triples or rules in this script, as they will have been persisted and reloaded into RDFox.</p><p>2) RDFox in-memory only (i.e. persistence switched off) may be faster, and will load more quickly when starting from scratch than from a persisted state, so if you’re just in an exploratory phase, it may be helpful to work in-memory and from a script.</p><p>Note that you can always save your datastore from the shell and then reload it like this:</p><pre>save myDs.rdfox <br>quit <br> <br>restart.script <br>load myDs.rdfox</pre><h3>Set up your data sources without clogging up your starting script</h3><p>You can use a script to set up data sources without clogging up the start script. You can call it dsource1.script</p><pre>dsource add delimitedFile People \ </pre><pre>        file “./Data/people.csv” \ </pre><pre>        quote ‘“‘ \ </pre><pre>        header true \ </pre><pre>        delimiter “,” </pre><pre>dsource attach tt:people People \ </pre><pre>        columns 4 \ </pre><pre>        “1” “data.example.org/entities/person_{id}” \ </pre><pre>        “1.datatype” “iri” \ </pre><pre>        \</pre><pre>        “2” “{name}” \ </pre><pre>        “2.datatype “string” \ </pre><pre>        \</pre><pre>        “3” “{dob}” \ </pre><pre>        “3.datatype” “xsd:date” \ </pre><pre>        “3.if-empty” “absent” \ </pre><pre>        \ </pre><pre>        “4” “{registration_date}T{registration_time}” \ </pre><pre>        “4.datatype” “xsd:dateTime” \ </pre><pre>        “4.default” “2000–01–01T00:00:00”</pre><p>Once the script is ready, we will be able to execute it from the starting script. A script within a script!</p><h3>Looking for script inspiration?</h3><p>You can find this article’s template workspace and scripts <a href="https://github.com/OxfordSemantic/RDFoxScripts">here</a>. Alternatively, you can also book a script consultation with an OST Knowledge Engineer by emailing info@oxfordsemantic.tech.</p><p>To learn more about RDFox go to our <a href="http://www.oxfordsemantic.tech/">website</a> or <a href="https://medium.com/oxford-semantic-technologies">medium publication</a>. To request an evaluation license click <a href="http://www.oxfordsemantic.tech/tryrdfoxforfree">here</a>. Academic licenses are available for free.</p><h3>Team and Resources</h3><p>The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Innovation (OSI) and Oxford University’s investment arm (OUI). The author is proud to be a member of this team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=441783bb271e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oxford-semantic-technologies/pro-tips-for-writing-scripts-441783bb271e">Pro tips for writing scripts</a> was originally published in <a href="https://medium.com/oxford-semantic-technologies">Oxford Semantic Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>