Sunday, September 1, 2013

Defining Transreption ... or maybe not

When I send in the text of my book, the editor - Simon St. Laurent - was quite interested in a new term it introduced to him, transreption.

Transreption (short for transrepresentation, the verb is to transrept) is the isomorphic loss-less transformation of one physical resource-representation to another.

This is a known concept in the linked (and other) data world. You can represent exactly the same information in JSON-LD, Turtle, N3, RDF+XML, ... Often you can even represent exactly the same information visually quite differently in the same format. The reason you can't just use the term conversion or the term transformation lies of course in the exactly. No change in the information is allowed.

I like the term (not invented by me, but by 1060 Research), there's no competing alternative, so I thought ... lets have it in Wikipedia or ... since that seems to be exclusively for bigger elements of information, in Wiktionary. That way everybody can learn about it.

Well, it's not quite that easy. Unless the body of information supporting the term is already quite big, it is not getting in. A book, some product documentation and a couple of odd references are not enough to qualify.

Not to worry. If they have strict rules, more kudos to them. There's more than one way to skin an Ouphe. And anyone can say anything about anything, right ? So if I want to define a new term, then I can. Right ? Right !

Several hours later, having looked through how Wiktionary does it on DBPedia and having looked at practically everything in here, I'm ready to throw in the towel. So I hope what follows is correct, but while I am saying something, I have no clue that it is what I want to say.

Naked Triples :
<http://netkernelbook.org/resource/word-transreption> <http://www.w3.org/2006/03/wn/wn20/schema/lexicalForm> "transreption"@en .
<http://netkernelbook.org/resource/word-transreption> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2006/03/wn/wn20/schema/Word> .
<http://netkernelbook.org/resource/wordsense-transreption-noun-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2006/03/wn/wn20/schema/NounWordSense> .
<http://netkernelbook.org/resource/wordsense-transreption-noun-1> <http://www.w3.org/2000/01/rdf-schema#label> "transreption"@en .
<http://netkernelbook.org/resource/wordsense-transreption-noun-1> <http://www.w3.org/2006/03/wn/wn20/schema/word> <http://netkernelbook.org/resource/word-transreption> .
<http://netkernelbook.org/resource/synset-transreption-noun-1> <http://www.w3.org/2000/01/rdf-schema#label> "transreption"@en .
<http://netkernelbook.org/resource/synset-transreption-noun-1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2006/03/wn/wn20/schema/NounSynset> .
<http://netkernelbook.org/resource/synset-transreption-noun-1> <http://www.w3.org/2006/03/wn/wn20/schema/containsWordSense> <http://netkernelbook.org/resource/wordsense-transreption-noun-1> .
<http://netkernelbook.org/resource/synset-transreption-noun-1> <http://www.w3.org/2006/03/wn/wn20/schema/gloss> "the isomorphic loss-less transformation of one physical resource-representation to another"@en .


RDF+XML
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:schema="http://www.w3.org/2006/03/wn/wn20/schema/"
    xmlns:rdfschema="http://www.w3.org/2000/01/rdf-schema#">

    <schema:NounSynset rdf:about="http://netkernelbook.org/resource/synset-transreption-noun-1">
        <rdfschema:label xml:lang="en">transreption</rdfschema:label>
        <schema:containsWordSense>
            <schema:NounWordSense rdf:about="http://netkernelbook.org/resource/wordsense-transreption-noun-1">
                <rdfschema:label xml:lang="en">transreption</rdfschema:label>
                <schema:word>
                    <schema:Word rdf:about="http://netkernelbook.org/resource/word-transreption">
                        <schema:lexicalForm xml:lang="en">transreption</schema:lexicalForm>
                    </schema:Word>
                </schema:word>
            </schema:NounWordSense>
        </schema:containsWordSense>
        <schema:gloss xml:lang="en">is the isomorphic loss-less transformation of one physical resource-representation to another</schema:gloss>
    </schema:NounSynset>
</rdf:RDF>



 

Wednesday, August 14, 2013

Quantities, Units, Dimensions and Data Types

When I was in Hyderabad, India in 2007 my then boss and mentor Edwin Kolen gave me some priceless advise. After I had ranted against him on some or other thing that frustrated me (and since we were setting up an IT offshore office from scratch, there was plenty of frustration), he took the official Indian police officer baton he had in his office and gave me - in a calm but stern voice - the following lecture :
Young man, you've spoiled a perfectly sunny morning for me now and although these are plenty in India, I never want you to do that again ! When you have an issue, you can do one of two things. Either you accept the situation or you take action and do something about it. But never complain to me again, do you hear me ?
Yes indeed Sir, I do. And heeding his advice, here's a small example on the use of QUDT (combining it with a likely candidate such as Good Relations).

Naked triples :
<http://example.com/product/id/8968411#PoS_8968411> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/goodrelations/v1#ProductOrService>.
<http://example.com/product/id/8968411#PoS_8968411> <http://purl.org/goodrelations/v1#hasStockKeepingUnit> "896841"^^<http://www.w3.org/2001/XMLSchema#string>.
<http://example.com/product/id/8968411#PoS_8968411> <http://qudt.org/schema/qudt#quantityValue> <http://example.com/product/id/8968411#depth>.
<http://example.com/product/id/8968411#PoS_8968411> <http://qudt.org/schema/qudt#quantityValue> <http://example.com/product/id/8968411#height>.
<http://example.com/product/id/8968411#PoS_8968411> <http://qudt.org/schema/qudt#quantityValue> <http://example.com/product/id/8968411#weight>.
<http://example.com/product/id/8968411#PoS_8968411> <http://qudt.org/schema/qudt#quantityValue> <http://example.com/product/id/8968411#width>.
<http://example.com/product/id/8968411#depth> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://qudt.org/schema/qudt#QuantityValue>.
<http://example.com/product/id/8968411#depth> <http://qudt.org/schema/qudt#numericValue> "9.9"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.com/product/id/8968411#depth> <http://qudt.org/schema/qudt#unit> <http://qudt.org/vocab/unit#Inch>.
<http://example.com/product/id/8968411#height> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://qudt.org/schema/qudt#QuantityValue>.
<http://example.com/product/id/8968411#height> <http://qudt.org/schema/qudt#numericValue> "1.2"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.com/product/id/8968411#height> <http://qudt.org/schema/qudt#unit> <http://qudt.org/vocab/unit#Inch>.
<http://example.com/product/id/8968411#weight> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://qudt.org/schema/qudt#QuantityValue>.
<http://example.com/product/id/8968411#weight> <http://qudt.org/schema/qudt#numericValue> "5.3"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.com/product/id/8968411#weight> <http://qudt.org/schema/qudt#unit> <http://qudt.org/vocab/unit#PoundMass>.
<http://example.com/product/id/8968411#width> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://qudt.org/schema/qudt#QuantityValue>.
<http://example.com/product/id/8968411#width> <http://qudt.org/schema/qudt#numericValue> "15.2"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.com/product/id/8968411#width> <http://qudt.org/schema/qudt#unit> <http://qudt.org/vocab/unit#Inch>.


In rdf+xml form that looks like this :
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:gr="http://purl.org/goodrelations/v1#"
    xmlns:qudt="http://qudt.org/schema/qudt#"
    xml:base="http://example.com/product/id/8968411">

    <gr:ProductOrService rdf:ID="PoS_8968411">
        <gr:hasStockKeepingUnit rdf:datatype="http://www.w3.org/2001/XMLSchema#string">896841</gr:hasStockKeepingUnit>
        <qudt:quantityValue rdf:resource="#depth"/>
        <qudt:quantityValue rdf:resource="#height"/>
        <qudt:quantityValue rdf:resource="#weight"/>
        <qudt:quantityValue rdf:resource="#width"/>
    </gr:ProductOrService>

    <qudt:QuantityValue rdf:about="#depth">
        <qudt:numericValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">9.9</qudt:numericValue>
        <qudt:unit rdf:resource="http://qudt.org/vocab/unit#Inch"/>
    </qudt:QuantityValue>

    <qudt:QuantityValue rdf:about="#height">
        <qudt:numericValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1.2</qudt:numericValue>
        <qudt:unit rdf:resource="http://qudt.org/vocab/unit#Inch"/>
    </qudt:QuantityValue>

    <qudt:QuantityValue rdf:about="#weight">
        <qudt:numericValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">5.3</qudt:numericValue>
        <qudt:unit rdf:resource="http://qudt.org/vocab/unit#PoundMass"/>
    </qudt:QuantityValue>

    <qudt:QuantityValue rdf:about="#width">
        <qudt:numericValue rdf:datatype="http://www.w3.org/2001/XMLSchema#double">15.2</qudt:numericValue>
        <qudt:unit rdf:resource="http://qudt.org/vocab/unit#Inch"/>
    </qudt:QuantityValue>
</rdf:RDF>


In turtle syntax that becomes :
@prefix gr: <http://purl.org/goodrelations/v1#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix qudt: <http://qudt.org/schema/qudt#>.
<http://example.com/product/id/8968411#depth> qudt:numericValue 9.9;
    qudt:unit <http://qudt.org/vocab/unit#Inch>;
    a qudt:QuantityValue.
<http://example.com/product/id/8968411#height> qudt:numericValue 1.2;
    qudt:unit <http://qudt.org/vocab/unit#Inch>;
    a qudt:QuantityValue.
<http://example.com/product/id/8968411#PoS_8968411> gr:hasStockKeepingUnit "896841"^^<http://www.w3.org/2001/XMLSchema#string>;
    qudt:quantityValue <http://example.com/product/id/8968411#depth>,
        <http://example.com/product/id/8968411#height>,
        <http://example.com/product/id/8968411#weight>,
        <http://example.com/product/id/8968411#width>;
    a gr:ProductOrService.
<http://example.com/product/id/8968411#weight> qudt:numericValue 5.3;
    qudt:unit <http://qudt.org/vocab/unit#PoundMass>;
    a qudt:QuantityValue.
<http://example.com/product/id/8968411#width> qudt:numericValue 15.2;
    qudt:unit <http://qudt.org/vocab/unit#Inch>;
    a qudt:QuantityValue.

 

And last but not least, as a graph :

Enjoy (and thanks again Edwin) !