me RDF sestidi

From Lojban
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 definition of Lojban structures by decomposition into simple predicates. It will also allow to validate lojban text in respect to types[1] and query it for described facts. 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}


@prefix : <> .
@prefix g: <> .
@prefix c: <> .
@prefix cc: <> .
@prefix x: <> .
[                             # 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 <> ;
   :sesumti-fi <> ;
   :sesumti-fo <> ]] .

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 <> .
_:x1 :sesumti-fi <> .
_:x1 :sesumti-fo <>

Converting individual elements


As lojban selbri vary in arity, bridi based on them are to be splitted into multiple RDF triples. I choose 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 constructions are first expanded according to . 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. Tense tags are treated as selbri.

 #{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 ]] .

As BAI are uncertain in respect of scope, there is alternate form for they are not create scope abstraction:

 #{mi tavla do bau la lojban}
 _:b4 :bridi :g:tavla ;
      :sesumti-fa c:mi ;
      :sesumti-bau [
        a c:zohe ;
        :sumti-fe [
          :bridi g:cmene ;
          :sumti-fa "lojban" ;
          :sumti-fi c:mi ]] .

This form is experimental and very likely will change in future to accomodate {fi'o .. fe'u}.





Only outer quantifiers create scope.

#{re prenu cu jukpa}
   a c:du
   provisional:quantifier 2
   provisional:variable _:a
   provisional:abstraction [
     :sesumti-fa _:a           # and now I run into a limitation of Turtle - how to describe what _:a is prenu?
     :bridi :jukpa


Sumti connectives create scopes as universal and existential quantifiers.

#{mi e do tavla}
  a c:du
  provisional:quantifier provisional:all
  provisional:variable _:a
  provisional:abstraction [
    :sesumti-fa _:a           # which are {mi je'u do}
    :bridi :tavla



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

#{du'u mi tavla}
[a c:KA ; cc:sucta [:bridi g:tavla ; :sesumti-fa c:mi ]] .

For {lo du'u} abstraction term, instead bridi itself could be used. Ditto for {lo ka} abstractions and selbri.

#{lo du'u mi tavla}
[:sumti-fa [a c:KA ; cc:sucta [:bridi g:tavla ; :sesumti-fa c:mi ]]]
# or just
[:bridi g:tavla ; :sesumti-fa c:mi ]



Next actions

  1. Explain the example step by step.
  2. How RDF semantics interact with Lojban logic[2]? E.g. it seems that [] is more like {da} than {zo'e}
  3. Possibly use 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 graphs 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 OWL ontology for basic types (types are commented out in the example above). Could be [:bridi ...] used in place of [a :bridi ; :bridi ...] ?