me RDF sestidi

From Lojban
Revision as of 04:57, 18 February 2015 by Ramcinfo (talk | contribs)
Jump to navigation Jump to search

This proposal is now in a very rough draft state.

This is a proposal for encoding Lojban texts as a set of RDF triples (possibly quads). The primal intent behind this is to allow precise decomposition of Lojban structures into simple predicates. Other uses could arise in future.

This document presumes on reader working knowledge of following semantic web topics: RDF and Turle. (It is possible what named graphs and notations to represent them, e.g. Notation 3 and/or TriG, will be needed later). It should be noted that this conversion is not yet intended to be sematic web technology, though it is possible in future.

The examples of conversion will be given in two forms: Turtle (in this version) and simplified representation of RDF triples, with prefixes substituded for full URIs.

Example of conversion:

{mi djica lo nu tavla}

Turtle:

@prefix : <http://mw.lojban.org/index.php?title=me_RDF_sestidi&oldid=111997/#ralju:> .
@prefix g: <http://mw.lojban.org/index.php?title=me_RDF_sestidi&oldid=111997/#gismu:> .
@prefix c: <http://mw.lojban.org/index.php?title=me_RDF_sestidi&oldid=111997/#cmavo:> .
@prefix cc: <http://mw.lojban.org/index.php?title=me_RDF_sestidi&oldid=111997/#cmavo-ckaji:> .
@prefix x: <http://mw.lojban.org/index.php?title=me_RDF_sestidi&oldid=111997/#xulta:> .
[                             # main bridi; du'u abstraction
# a :bridi ;
 :sesumti-fa c:mi ;
 :bridi g:djica ;
 :sesumti-fe [                # zo'e of lo
#  a :sumti ;
   a c:zohe ;
   :sumti-fa [                # bridi of lo
     :bridi [                 # abstraction
#      a :selbri ;
       a c:nu ;
       cc:sucta [             # embedded bridi
#        a :bridi ;
         :bridi g:tavla ]]]] ;
 x:cuscu [
#  a :bridi ;
   :sesumti-fa <http://example.com/person1> ;
   :sesumti-fi <http://example.com/person2> ;
   :sesumti-fo <http://example.com/group/lojban/post/1> ]] .

RDF triples:

_:b1 :sesumti-fa c:mi .
_:b1 :bridi g:djica .
_:b1 :sesumti-fe _:z1 .
_:z1 rdf:type c:zohe .
_:z1 :sumti-fa _:b2 .
_:b2 :bridi _:n1 .
_:n1 rdf:type c:nu .
_:n1 cc:sucta _:b3 .
_:b3 :bridi g:tavla .
_:b1 x:cuscu _:x1 .
_:x1 :sesumti-fa <http://example.com/person1> .
_:x1 :sesumti-fi <http://example.com/person2> .
_:x1 :sesumti-fo <http://example.com/group/lojban/post/1>

Bridi

As lojban selbri have variable varity, bridi based on them are to be splitted into multiple RDF triples. I choose http://www.w3.org/TR/swbp-n-aryRelations/#useCase3 for this, so for

{mi broda do ma'a da'ai}

corresponding RDF graph will be:

_:b1 :bridi g:broda ;
     :sesumti-fa c:mi ;
     :sesumti-fe c:do ;
     :sesumti-fi c:maha ;
     :sesumti-fo c:dahai .

Gadri

Gadri constructions are first expanded according to http://mw.lojban.org/papri/BPFK_Section:_gadri#Formal_definitions . For now, {noi} is treated just as introducing additional predicates; difference between {poi} and {noi} should be properly encoded later. Examples:

# {lo broda}
_:s1 :sumti-fa [:bridi g:broda] .
# {le broda}
_:s2 :sumti-fe [
     :bridi g:skicu ;
     :sesumti-fa c:mi ;
     :sesumti-fi c:do ;
     :sesumti-fo [
       a c:ka ;
       cc:sucta [
         :sesumt-fa c:cehu ;
         :bridi g:broda ]]] .

Scope operators

Scope operators for now are understood as working on a bridi abstraction:

 #{na ze'e mi tavla}
 _:b3 :bridi c:na ; # = g:jitfa
      :sesumti-fa [
        :bridi c:zehe ;
        :sesumti-fa [
          :sesumti-fa c:mi ;
          :bridi g:tavla ]] .

Abstractions

Abstractions for now are encoded in form [a c:KA ; cc:sucta BRIDI], KA being the type of abstraction and BRIDI, abstracted proposition.

Next actions:

  1. . Explain the example step by step.
  2. . How RDF semantics interact with Lojban logic? E.g. it seems that [] is more like {da} than {zo'e}
  3. . Possibly use http://www.w3.org/2004/03/trix/swp-1/ for x:cuscu (rename it x:xusra?).
  4. . Define resources in lojban (e.g. :bridi is {bridi fi zi'o} and :sesumti-FA is {se sumti be fi FA.bu}).
  5. . Named grapsh could be used for abstactions e.g. cc:sucta {[:bridi g:tavla ]}, but are superfluous now. May be they will be needed for when multiple statements will be introduced?
  6. . Do RDFSchema (types are commented out in the example above)