Yes, I agree. I wasn't completely satisfied with the solution that got integrated into 1.0
I wonder if there is better implementation of n-ary relations in the plans?

             Sergey


On Tue, Mar 18, 2008 at 8:49 PM, Mov GP 0 <movgp0@gmail.com> wrote:
Hello,
it turns out that there is a bit of misconception about n-ary
relations. The current implementation is a complex "structure" with
static layout. It is currently NOT POSSIBLE to express n-ary
expressions directly.

A real n-ary syntax might look like

  [[has cast::
     [[actor::actor_name]]
     [[role::role_name]]
  ]]

The difference is that a N-ary syntax allows you to do queries. Ie.
you can ask which roles a specific actor has played using something
like

  SELECT ?role
  WHERE {
     ?x <Relation:actor> <actor_name>
     ?x <Relation:role> ?role
  }

This is not possible with the current syntax.

On the opposite you can simulate the current syntax with n-ary syntax
and templates with ease:

  {{cast| actor_name | role_name }}

using a template "cast" looking like

  [[has cast::
     [[actor::{{1}}]]
     [[role::{{2}}]]
  ]]

The real importance for the current "complex types" are compound datatypes:

  [[temperature := 37; Degree Celsius]]

Note that this are not two values, but just one!

However, you could write that specific example even better n-ary:

  [[temperature :=
     [[value := 37]]
     [[unit :: Degree Celsiu]]
  ]]

For now, the correct implementation of the actor-example would be to
define a stub article (within a separate namespace) manually

( Article:<film_name> , Relation:has_cast , Virtual:46785464892 )
( Virtual:46785464892 , Relation:actor , Article:<actor_name> )
( Virtual:46785464892 , Relation:role , Article:<role_name> )

The drawback of this correct method is that it efforts much work and
time in creating virtual articles.


ys, MovGP0


On Mon, Mar 17, 2008 at 1:51 PM,  <zehetner@molgen.mpg.de> wrote:
> N-ary properties?
>
>   [[has cast::actor_name, role_name]]
>
>  http://ontoworld.org/wiki/N-ary
>  http://semantic-mediawiki.org/wiki/N-ary_relations
>
>  Cheers,
>  Gu
>
>
>
>  Quoting Robert Murphy <mrandmrsmurphy@gmail.com>:
>
>  > Hey Gang,
>  >
>  > What if there were something like a "sub-property" that somehow
>  > extended the *way* in which a property was used.  For example, if you
>  > had movie wiki with a page [[Batman Begins]] and the property [[Has
>  > cast::Christian Bale]], but you wanted to have the "sub-property"
>  > [[Has cast in role::Bruce Wayne]] but somehow link the two properties,
>  > what would you do?  The way exists in my mind a kind of two-step
>  > property relationship
>  >
>  >     Has cast member::in the role of::Bruce Wayne::Christian Bale
>  >
>  > Has anybody tried anything like this?  Is there a way to do with SMW
>  > or am I making a feature request?
>  >
>  > Let me tell you my real-wiki example.  I run a Biblical linguistics
>  > wiki and any given verse of the Bible uses some Greek words, each of
>  > which has a page in the Greek Namespace.  Each of these words is used
>  > in a certain ways, and each way has a page in the Greek Namespace.
>  > Therefore, each verse uses the word in question, *in the way in
>  > question*.  What I've done is have the property [[Uses Greek]] point
>  > to each word *and* each parsing/conjugation.  *Then*, there are
>  > thousands of sub-properties of the form [[Uses Greek/GREEK_WORD]].  Is
>  > there a better way to do this?
>  >
>  > http://www.reformedword.org/John_1:1
>  >
>  > Any and all advice would be welcome.
>  >
>  > Robert Murphy.
>  >
>  > PS I have factboxes *off* on my wiki as a default, though I've put on
>  > it the page [[John 1:1]].  You can see other pages' factboxes by
>  > previewing any page in edit mode.
>  >
>  > -------------------------------------------------------------------------
>  > This SF.net email is sponsored by: Microsoft
>  > Defy all challenges. Microsoft(R) Visual Studio 2008.
>  > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  > _______________________________________________
>  > Semediawiki-user mailing list
>  > Semediawiki-user@lists.sourceforge.net
>  > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>  >
>
>
>
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  Semediawiki-user mailing list
>  Semediawiki-user@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user



--
Sergey Chernyshev
http://www.sergeychernyshev.com/