TriplesBad

TriplesArentAlwaysTheBestChoice

(this section to be moved to a new page named TriplesArentAlwaysTheBestChoice?)

http://dannyayers.com/2007/03/14/seal-300

Often you hear about RdfTriple?s being used to encode semantic data in the SemanticWeb. But triples are not the only way to go. There are [TriplesArentAlwaysTheBestChoiceExamples? many types of semantic knowledge that can more naturally be represented with other encodings]. ReasonersDontHaveToUseTriples?, and a reasoning or knowledgebase system can still ImportExportTriples? even if it doesn’t use triples itself.


(end section to be moved to TriplesArentAlwaysTheBestChoice?)


(this section to be moved to a new page named TriplesArentAlwaysTheBestChoiceExamples?)

Example: meta-statements

 (water in cup)-like-(people in sailingvessel)

One way to represent this in triples is called “reification”. Instead of just writing what you have to say, you describe the statements that you would have said:

 (subject statement1 water)
 (predicate statement1 inside)
 (object statement1 cup)
 (subject statement2 people)
 (predicate statement2 inside)
 (object statement2 sailingvessel)
 (subject statement3 statement1)
 (predicate statement3 similar)
 (object statement3 statement2)

As you can imagine, reasoning over that sort of data representation might be painful.

Example: context

“Yesterday on his homepage, Alex said that blueberries are blue”.

Alex made a statement. Let’s assume that we can represent the base statement as a triple:

 (color blueberries blue)

How do we tie in Alex, yesterday, and Alex’s homepage to this statement?

Again, we could use reification, and again, it’s painful:

 (subject statement1 blueberries)
 (predicate statement1 color)
 (object statement1 blue)
 (speaker statement1 Alex)
 (placeSpoken statement1 AlexsHomepage)
 (timeSpoken statement1 yesterday)

We don’t present a single natural way to encode this here, but clearly triples are not it. See also ContextProblem.

Example

Say I want to represent:

 "Alex Schroeder put 6 simple ideas on his page, and they are..."

Well, let’s have at it:

 "Alex Schroeder" wikihomepage AlexSchroeder;
 AlexSchroeder says (wikiway doesnt scale;
                     wikiway neednot scale;
                     design matters;
                     multilingualsites good;
                     multilingualpages bad;
                     complexdiagrams require explanation;
                     simplediagrams require memorable)

Now I can write nice queries like:

 ?who says (wikiway ?relation scale)

…which will tell me who had something to say about whether the wikiway scales or not, and how it scales or not, and so on.

 ?what good
 ?what bad
 ?who says (?what good)

…and so on, and so forth.

But, if I attempt to do that in pure triples, … Yikes!

 AlexSchroeder says wikiwaydoesntscale
 AlexSchroeder says wikiwayneednotscale
 wikiwaydoesntscale subject wikiway
 wikiwaydoesntscale predicate doesnt
 wikiwaydoesntscale object scale
 wikiwayneednotscale subject wikiway
 wikiwayneednotscale predicate neednot
 wikiwayneednotscale object scale

…and, great joy to the person who’s always writing queries to make reasoners that can reason conclusions over “what scales” and “what doesn’t scale” and whether AlexSchroeder said it or not.


(end section to be moved to TriplesArentAlwaysTheBestChoiceExamples?)


Reasoners don't have to work with triples

The Wikipedia:Rete_algorithm works just as well, whether you use triples or anything else.

In fact, you could read database table rows just fine, and reason straight out of them.

If you had a table:

 Name    Age  Profession            FavoriteColor
 Lion    29   Programmer            Yellow
 Kitty   30   Referrals Coordinator Red
 Sakura  5    Monster               Pink

…then you can just:

 (?name ?age monster ?color)
 => (monsteralert ?name)

…and get your monster alerts that way.


(end section to be moved to ReasonersDontHaveToUseTriples?)


Entities that don't use triples can still communicate with entities that do

As is suggested in the example above (when AlexSchroeder was saying stuff), we can encode arbitrary data structures in triples. If we build a reasoner or a knowledgebase that works in terms of other types of data representations, we can still import data from other sources encoded as triples, and export data encoded as triples. We just have to establish standard ways of encoding and decoding our internal data structures as triples.


(end section to be moved to ImportExportTriples?)


Pagan data representation is the idea of working with semantic data in an encoding that takes advantage of flexible, free-form geometry

Example:

 (water in cup)-like-(people in sailingvessel)

Example:

 "Alex Schroeder" wikihomepage AlexSchroeder;
 AlexSchroeder says (wikiway doesnt scale;
                     wikiway neednot scale;
                     design matters;
                     multilingualsites good;
                     multilingualpages bad;
                     complexdiagrams require explanation;
                     simplediagrams require memorable)

In both examples, we see hierarchical structure in the data representation. In the second example, we also see doubles mixed with triples.

See also RdfTriple?, TopicMap, SemanticWeb, ContextProblem.


I’ve been doing a lot of experimentation the past 2 weeks with triples & reasoners, as I experiment with SemanticNetworksForSearch.

One conclusion that I’ve come to is that the dogma of triples is bad.

I like to phrase this as:

 (triples bad)

…because I didn’t want to struggle with whether:

 (triples possibly bad)
 (triples couldbe bad)
 (triples are bad)
 (triples a bad)

…and so on, and so forth: all unnecessary distinctions, when all we want to do is say that the idea “triples” and the idea “bad” are simply connected.

Or:

  (event happened boo)

…when I’d rather just say:

  (boo)

I also didn’t want to struggle with:

 (lionsaidtriplesarebad speaker lion)
 (lionsaidtriplesarebad subject triples)
 (lionsaidtriplesarebad predicate are)
 (lionsaidtriplesarebad object bad)

…and then tell the reasoner:

 (?x speaker lion),
 (?x subject ?s),
 (?x predicate ?p),
 (?x object ?o)
 => (?s ?p ?o)

…and variants thereof, many times over.

I had an idea that I’m calling “data representation paganism,” whereby you can just make up any old geometry for data, and work with it.

 (water in cup)-like-(people in sailingvessel)

Is this different than an 8-tuple,

 (ratio, water, in, cup, like, people, in, sailingvessel)

..?

Yes, it is, because there are recognizable ?s-?p-?o’s inside, that reasoners could think about in terms of ?s-?p-?os.

Then again, you could also use a rule generator, to mash out your triples there, no? There are so many ways to do things!

And I asked myself: “Can Reasoners make use of things that are not triples?”

And because I wrote my own primitive reasoner, I realized, “Yes, of course you can.” And the Rete algorithm works just as well, whether you use triples or anything else. It simply does not matter.

In fact, you could read database table rows just fine, and reason straight out of them.

If you had a table:

 Name    Age  Profession            FavoriteColor
 Lion    29   Programmer            Yellow
 Kitty   30   Referrals Coordinator Red
 Sakura  5    Monster               Pink

…then you can just:

 (?name ?age monster ?color)
 => (monsteralert ?name)

…and get your monster alerts that way.

So, there appears to be nothing magical about triples.

I mean, sure, they’re really nice for describing stereotypical SemanticNetworks, but in my experience of representing my many ideas and so on, I found that they were regularly either 1-or-2 too long, or dramatically too short or mal-formed.

So far, we’ve talked about:

  • Triples can be too long, forcing you to invent “filler words.”
  • Triples can be too short, requiring splattering out your structure into 1 of many possible triplizations.
  • And once you splatter out your structure, then you need to stick to that splatter form, and explain it to everybody.
  • And once you splatter out your structure, you can’t reason over the parts, without adding lots of rules to reassemble the parts into the form required for your reasoning assembly.

Furthermore:

  • We have the illusion that reasoners only work with triples. But that’s flat out not true: They can work with just about anything.

So, we’re caught up to the present.

And, then there’s the worst, and most classically recognized problem, the “ContextProblem.”

Text that was here, moved to “ContextProblem.

Caveat

I’m still playing around with reasoners, and I’m only a couple weeks into this.

There are still questions and statements that I puzzle about how to represent well, and explain to reasoners, and so on.

But for the most part, I’ve found that adherence to triples is unnecessary and harmful.

triples is bad, but what about treeples?

Sorry, I just don’t get it. I require more handholding than is there.

it’s a sort of parsing .
imagine a wiki page . it has a name and some contents .
so (in c(++)) you make a knot A (struct) with two pointers .
the first (B) points to the name, the second (C) to the contents, which is structured in personal contributions .
so there are two pointers in C (D and E) . D points to the first contribution, E to the rest .
E again has two pointers (F and G) . F points to the second contribution, G to the rest .
and so on .
B has a backlink to A . so has C . D has a backlink to C . so has E .
and so on .
now look at C (first contribution) .
it has a name (the writer) and is structured in sentences .
so there are two pointers (CA and CB) . CA points to the writer while CB points to the sentences .
so CB has two pointers (CC and CD) . CC points to the first sentence, CD to the rest .
and so on and so forth . of course there are always backlinks .
now look at CC (the first sentence of the first contribution) . it is structured in phrases or in parts of that sentence, which are structured in words .
you see the way to go?

in addition each knot has a sign (character) which shows the kind of the connection (’ ’(default case) ’,’ ’;’ ’.’ ’:’ ’-’ (and what have you)) . so you can make all sorts of grammar .

i don’t know exactly, what you are referring to context problem . i think referring is context ;) .
if a knot A is part of the knots B, C and D, then B, C and D are the context of A .
and if B is part of E, then E is context of A too .

hope you have something to gripe about ;)

I think “data representation paganism” is an interesting idea. I don’t think it’s necessarily antagonistic with triples. Couldn’t this be interconverted with triples? Semantic web stuff (RDF-S and OWL, for example) provides ways to talk about vocabularies, which I’m told allows a degree of machine translation between RDF using different vocabularies. Surely a similar thing could be done with RDF triples vs. other data representation encodings?

That is, if within some context, you want to represent things as (triples bad), then you could specify a canonical mapping to and from triples (a mapping which would make (triples bad) in encoding ‘customRepresentation001’ correspond to the following in encoding triplesRepresentation001):

 (lionsaidtriplesarebad speaker lion)
 (lionsaidtriplesarebad subject triples)
 (lionsaidtriplesarebad predicate are)
 (lionsaidtriplesarebad object bad)

In more generality, for each “data representation encoding”, you could define a way to convert that encoding to and from triples.

You could name all your encodings and define the interconversion conventions in a machine-readable way, and then software could do it automatically. “triples” would be not one encoding but a whole class of encodings, which would differ in their ways of representing things that are unnatural in triples (such as speaker context).

The machine-readable language for specifying encodings could be extended to interpret any context-free grammar and so you could also express the syntax of HTML microformats such as MachineCodeBlocks, which would allow these to also be automatically translated to and from triples encodings. And TopicMaps.

So, triples need not be central to anything, rather it is just one of many possible encodings. If your neighbor likes to use triples internally, or even if they insist on communicating with you via triples, but you prefer quadruples or even a less constrained “pagan” set of encodings, that doesn’t matter as long as it’s easy to tell software how to interconvert.

So there is no need for anyone to convince everyone in the world to like triples, or topic maps, or whatever. We just need a vocabulary to describe how to interconvert these things.

Surely what I’m suggesting (basically, a standard language for expressing how to parse and interconvert encodings such as triples) has already been done and is a core part of the semantic web? This wouldn’t need to be a separate base-level language, but rather just a set of vocabulary terms which are understood to refer to concepts which can be used to tell you how to parse and interconvert encodings. What is this language called?

I wasn’t being antagonistic to triples; I was saying: the dogma of triples is bad. That the present day SemanticWeb uses only triples doesn’t mean I don’t think the SemanticWeb isn’t cool, or that it will fail, or anything like that. I do think it’ll need to be “fixed” in the future, though..!

As for: “you could define a way to convert that encoding to and from triples,” that’s exactly what I’m complaining about when I talk about “splattering” the data structure into triples, and then picking the pieces back up.

As far as I understand it, it is things like limited reasoners, specified by OWL and such, that describe how to automatically put the data from one triple form into a preferred triple form, which you would then use to reconstruct your final “pagan” data structure.

Pagan data format A → Triples Splatter A → (reasoner) → Triples Splatter B → Pagan data format B

I’d just rather have:

Pagan data format A → (reasoner) → Pagan data format B

The reason I wrote this page is to:

  • Demonstrate that there’s nothing essential about triples for the benefit of reasoners, save force of history.
  • Point out some problems that come along with using triples always.
    • filler words (too long)
    • or splattering (too short)
    • communication of splattered form (though you can use a reasoner / translator, expressible in OWL)
    • simple use of splattered data require those rules, in ways that unsplattered data does not!

So, is your point that it’s easier to write the reasoner (or the rules that the reasoner is applying for some particular application) if you reason over an encoding that is more natural for whatever you are trying to talk about than triples?

But if everything can be interconverted into and out of triples, and if you have some domain in which some other encoding is natural (for example, you are writing rules by hand to reason about things like “what does alex think is good?”, and you don’t want to have to make everything all twisted and complicated in order to deal with the triple encoding that you are using for the ContextProblem), then you can either have the user write the rules in Pagan Data Format A, and machine-convert them to rules about triples, or you can write your own reasoner that directly uses Pagan Data Format A. And in the latter case your reasoner will still be able to communicate with other entities that store knowledge in triples because it can interconvert Pagan Data Format A with triples.

So parts of the semantic web can use triples and parts can use other encodings, right? So it’s not a matter of fixing anything, it’s just a matter of keeping one’s mind open and remembering that it’s okay to make up Pagan Data Formats when appropriate.

At least, I think it’s that way. I don’t have much experience with this stuff (why am I even talking then? because I’m very interested in using it in the future). Am I making sense?

If what you mean to argue is equivalent to what I mean by “keep your mind open and remember that it’s okay to make up Pagan Data Formats when appropriate” — then yes, I agree wholeheartedly!

Quite elegantly put, Bayle. :)

This page should be renamed to PaganData?, or something like that. ;)

How about PaganSemanticEncodings?, PaganSemanticData?, PaganSemanticFormats??

I started a second draft of the page (on top). I noticed while I was doing that that I disagree with the example:

 (triples bad)

I don’t think you have to choose between:

 (triples possibly bad)
 (triples couldbe bad)
 (triples are bad)
 (triples a bad)

rather, there’s a more natural way to put it:

 (desirability triples bad)

and this is better than

 (triples bad)

because rather than simply assigning a boolean predicate (badness, which either is or is not present) to the noun “triples”, you are delineating a type of information (desirability), and then assign to “triples” one of many values (“bad”). This seems more explicit to me; rather than just creating a property “bad” and noting that “triples” has this property, you are saying something about that property; you are saying that badness is a quality of desirability.

Other examples I can think of work similarly, as long as you’re happy with using ISA as a predicate:

 (blueberries blue) --> (color blueberries blue)
 (horse animal) --> (isa horse animal)

I can’t think of an example where you couldn’t make a double into a triple in a natural way.

I can’t think of an example where you couldn’t make a double into a triple in a natural way.

There isn’t such an example. I just don’t like using systems that require that I do it.

I’d be quite happy to program into a system, …

 (red color)
 (blue color)
 ('x 'y) ('y color) -> ('x color blue)
 (blueberries blue)

Again, I’m trying to point out that there’s no intrinsic reason for triples to be the end-all be-all of things.


I just started sinking my head into the SemanticWeb pool, and I recalled this page about “triples”. I noticed right away that RDF looks at “statements” which contsist of “subject, predicate, object”.

This immediately reminded me PeircianSemiotics?, something that I’d come across while studying Complex Science.

see: http://www.cs.ucsd.edu/~goguen/courses/271/tutorial/peirce.php

Briefly, Semiotics assumes that “anything” can be a “sign”, and that a sign consists of:

http://www.cs.ucsd.edu/~goguen/courses/271/tutorial/images/semiosis.gif

Which are roughly translatable to

  • representamen=subject
  • object=object
  • Interpretant=predicate

Anyway, I think this is the reason why some people have worked with triples by default, because of the logic behind Peirce’s triadic reasoning. They are trying to teach machines about how people think, and I think that people who accept Peirce’s conclusions believe that all objects (signs, statements, “things” of any type) always have these three facets fundamentally (object, representamen, interpretant).

Of course, I am brand new to semantic standards, so I could be wrong.

Define external redirect: ImportExportTriples ReasonersDontHaveToUseTriples TriplesArentAlwaysTheBestChoice PeircianSemiotics PaganSemanticEncodings PaganSemanticFormats RdfTriple TriplesArentAlwaysTheBestChoiceExamples PaganData PaganSemanticData

Languages: