converting RDF to OWL - xml-serialization

I want to generate RDF code that follows the OWL format. I am able to generate an RDF file, but I need to convert it into OWL. Below is the RDF that I can generate.
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ns1="http://example.com/nodetypes/2012/04/24/vehicle/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
<rdf:Description rdf:about="http://example.com/nodetypes/2012/04/24/vehicle/2">
<ns1:nodetype_ptr_id>2</ns1:nodetype_ptr_id>
<ns1:slug>vehicle</ns1:slug>
<ns1:last_update>2012-04-24 23:49:36.633689</ns1:last_update>
<ns1:end_publication>2042-03-15 00:00:00</ns1:end_publication>
<ns1:tree_id>2</ns1:tree_id>
<ns1:featured>False</ns1:featured>
<ns1:parent_id>None</ns1:parent_id>
<ns1:content></ns1:content>
<ns1:rating_score>0</ns1:rating_score>
<ns1:rating_votes>0</ns1:rating_votes>
<ns1:start_publication>2012-04-24 23:49:15</ns1:start_publication>
<ns1:level>0</ns1:level>
<ns1:creation_date>2012-04-24 23:49:15</ns1:creation_date>
<ns1:status>2</ns1:status>
<ns1:template>gstudio/nodetype_detail.html</ns1:template>
<ns1:content_org>None</ns1:content_org>
<ns1:excerpt></ns1:excerpt>
<ns1:plural>vehicles</ns1:plural>
<ns1:comment_enabled>True</ns1:comment_enabled>
<ns1:password></ns1:password>
<ns1:title>vehicle</ns1:title>
<ns1:login_required>False</ns1:login_required>
<ns1:pingback_enabled>True</ns1:pingback_enabled>
<ns1:rurl></ns1:rurl>
</rdf:Description>
</rdf:RDF>

As cygri says, the job is done. However, there are now two additional normative syntaxes: OWL/XML and the Functional syntax which is used to specify what's an OWL ontology and to specify its direct semantics. In addition to these, there are non-normative syntaxes for OWL: The Manchester syntax and all the RDF serialisation syntaxes (Turtle, N-Triples, Notation3, JSON-LD, RDF/JSON, HDT, etc). The RDF Working Group is working at making Turtle a standard, as well as a JSON serialisation.
In order to switch format, you can use the converter at University of Manchester, which can output RDF/XML, Turtle, OWL/XML, Manchester syntax, Functional syntax and also LaTeX (for nice rendering in articles).
Edit: Since February 2014, Turtle, N-Triples, N-Quads, and Trig are normative syntaxes for RDF.

You're already done. What you have there is an RDF/XML file. The normative syntax for OWL is RDF/XML. So it is an OWL file too.

Related

What catalog format from webtranslateit.com to select for LinguiJS that will work with plurals?

I am trying to switch from i18next to LinguiJS due to big bundle size of i18next.
I use webtranslateit, which supports these formats.
I currently use i18next json v3 format on webtranslateit:
What format to select on webtranslateit that will work with multiple variations of plurals? (not just singular and single plural)
Thank you
Looking at the LinguiJS documentation they seem to work with Gettext PO files and JSON files. Both these formats are supported by the WebTranslateIt tool (Gettext PO and JSON) and they both support plural forms.

Neo4j import csv to database

I want to import Publications from csv to neo4j. And make Query which will select all authors which are authors of publication or at least one author.
I have csv file in format
Author,Publication
Sanjeev Saxena,Parallel Integer Sorting and Simulation Amongst CRCW Models.
Hans-Ulrich Simon,Pattern Matching in Trees and Nets.
Nathan Goodman,NP-complete Problems Simplified on Tree Schemas.
Oded Shmueli,NP-complete Problems Simplified on Tree Schemas.
Norbert Blum,On the Power of Chain Rules in Context Free Grammars.
Arnold Sch,rpern der Charakteristik 2.
nhage,rpern der Charakteristik 2.
Juha Honkala,A characterization of rational D0L power series.
Chua-Huang Huang,The Derivation of Systolic Implementations of Programs.
Christian Lengauer,The Derivation of Systolic Implementations of Programs.
I used this query:
USING PERIODIC COMMIT
LOAD CSV FROM 'file:/home/kanion/studia/bazy/clean.csv' AS line
CREATE (:Publikacja { author: line[1], title: line[2]})
and after import i have:
http://imgur.com/3lpWM3O
So i think that authors isn't imported? How to deal with that?
In most if not all programming languages, the first key of an array is 0 so it should be line[0] for the author and line[1] for the title
USING PERIODIC COMMIT
LOAD CSV FROM 'file:/home/kanion/studia/bazy/clean.csv' AS line
CREATE (:Publikacja { author: line[0], title: line[1]})

RDF document metadata

I have a software that generates an RDF representation of certain dataset. I want to add to the generated data also some metadata describing not specific data contained in the data set but the document itself - i.e., when the document was created, by which software, which version, etc. The schema.org properties provide the necessary relationships, but I can not figure out the proper place to attach it. Is there some standard way of saying "this is the metadata about the document itself" in RDF? I use Turtle serialization for RDF but generic answer working with any serialization would be preferable.
There is not a standard place to do this. A RDF graph is just a collection of triples; it's not identified by an IRI or anything like that. (However, in SPARQL datasets, you could post some metadata about a named graph by using the name of the graph as the subject in a triple. That would just be a convention, though. It's not "official" in any sense.)
In the RDF serializations of OWL ontologies, there can be an ontology element (i.e., a resource with the type owl:Ontology), and that can be used to associate some metadata with the ontology. You'd probably want to adopt an approach like that. That is, you'd establish a convention with something like
#prefix ex: <...>
[] a ex:DatasetRepresentation ;
ex:created "..." ;
ex:representationOf <...> .
#... rest of generated content ...
I am not that familiar with Schema.org, but both DCat and Doublin Core provide means to do so.
In Doublin Core there is the identifier Data property. An example:
PREFIX : <http://my.domain/meta-data#>
PREFIX dcterms: <http://purl.org/dc/terms/>
:1 a dcterms:BibliographicResource ;
dcterms:identifier <http://my.domain/my-document> .
A similar record but now using DCat and the landingPage data property:
PREFIX : <http://my.domain/meta-data#>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
:1 a dcat:Resource ;
dcat:landingPage <http://my.domain/my-document> .

Generate XML from XML schema xsd in 4GL Progess OpenEdge?

iam using 4GL in Progress OpenEdge 11.3 and i want to write a xml file from xsd schema file.
Can i generate a xml file from a XML Schema (xsd) with 4GL Progress OpenEdge?
thanks.
Well, you can use a method called READ-XMLSCHEMA (and it's counterpart WRITE-XMLSCHEMA).
These can be applied to both TEMP-TABLES and ProDataSets (depending of the complexity of the xml).
The ProDataSet documentation, found here, contains quite a lot information about this. There's also a book called Working with XML that can help you.
This is the basic syntax of READ-XMLSCHEMA (when working with datasets):
READ-XMLSCHEMA ( source-type, { file | memptr | handle | longchar },
override-default-mapping [, field-type-mapping [, verify-schema-mode ] ] ).
A basic example would be:
DATASET ds:READ-XMLSCHEMA("file", "c:\temp\file.xsd", FALSE).
However since you need to work with the actual XML you also will have to handle data. That data is handled in the TEMP-TABLES contained withing the Dataset. It might be easier to start with creating a static ProDataSet that corresponds to the schema and then handle it's data whatever way you want.

Text classification using Weka

I'm a beginner to Weka and I'm trying to use it for text classification. I have seen how to StringToWordVector filter for classification. My question is, is there any way to add more features to the text I'm classifying? For example, if I wanted to add POS tags and named entity tags to the text, how would I use these features in a classifier?
It depends of the format of your dataset and the preprocessing steps you perform. For instance, let us suppose that you have pre-POS-tagged your texts, looking like:
The_det dog_n barks_v ._p
So you can build an specific tokenizer (see weka.core.tokenizers) to generate two tokens per word, one would be "The" and the other one would be "The_det" so you keep the tag information.
If you want only tagged words, then you can just ensure that "_" is not a delimiter in the weka.core.tokenizers.WordTokenizer.
My advice is to have both the words and tagged words, so a simpler way would be to write an script that joins the texts and the tagged texts. From a file containing "The dog barks" and another one cointaining "The_det dog_n barks_v ._p", it would generate a file with "The The_det dog dog_n barks barks_v . ._p". You may even forget about the order unless you are going to make use of n-grams.