From: Markus <mak@ai...>  20060728 15:24:02

Just briefly now since I have not time for more details at the moment:=20 Your observations on templates are accurate, and those are core reasons why= we=20 decided not to use "semantic templates" as the atomic annotation formalism.= =20 In general, I believe that it will not be possible to ever hide all semanti= cs=20 within usual templates. But some of the issues you spotted could possibly b= e=20 addressed to some extent. But I won't promise a quick solution ... Best, Markus On Sunday 23 July 2006 12:30, MovGP0 wrote: > Hi, > let's talk a bit about Templates: > > =3D=3D Abstract =3D=3D > I'm currently working a lot at the german Wikipedia. Specially I'm forking > http://de.wikipedia.org/wiki/Vorlage:Formatvorlage_Einheit for use on eve= ry > of the thousands Unit described in the german Wikipedia. During my work > I've thought about using such templates for adding Semantics which is > common for every Article. Templates seems to be the easiest way, because = by > adopting templates for Semantics you can create hundreds of Semantic > Statements by changing just some very vew lines. > > But there are many Problems I've see here. Lets look as some examples > (translated to english): > > > =3D=3D Example 1  Working Syntax =3D=3D > The row "Name" is the easiest. Here I'm just using plain Text, so we can > change > >  >  Name  '''{{{Name}}}''' >  > > to: >  >  Name  '''[[has Name:=3D {{{Name}}} ]]''' >  > > This is all working fine. > > > =3D=3D Example 2  Multiple Links per Statement =3D=3D > > The first Line is more complex. Its written as: >  >  [[Norm]]  {{{Norm}}} >  > > Makes already troubles, because many units can get defined in more than o= ne > > norm and the norms are included as Links. So changing it to: >  >  [[Norm]]  [[has Norm:: {{{Norm}}} ]] >  > > and using it like: > Norm=3D [[American Unitsystem]], [[British Unitsystem]] > > would lead to: >  >  [[Norm]]  [[has Norm:: [[American Unitsystem]], [[British > > Unitsystem]] ]] > >  > > Which is meant to get read as: > > [[has Norm::American Unitsystem]] > [[has Norm::British Unitsystem]] > > But is not understood by the current implementation of SMW. The alternati= ve > > would be to hack it and write something like: > Norm=3D American Unitsystem]], [[has Norm::British Unitsystem > > which leads to: >  >  [[Norm]]  [[has Norm:: American Unitsystem]], [[has Norm::British > > Unitsystem ]] > >  > > which would be accectable when its used in rare cases only, but its > unhandy. > > > =3D=3D Example 3  TeX =3D=3D > Semantics doesn't work with Formulas. For my needs with this template this > > is a bad thing. Lets look at the UnitSign for an example: >  >  Unitsign  {{{Symbol}}} >  > > Now we change this Line to: >  >  Unitsign  [[has unitsign:=3D {{{Symbol}}} ]] >  > > Because a unitsign has to be written with romanserif front, we need to u= se > either TeX or a <div> Element for styling. Because the Template is for the > Physical Community we are using TeX. The following Statements are equal > > examples: > Unitsign=3D <math>\mathrm{A}</math> > Unitsign=3D <math>\rm{A}</math> > Unitsign=3D <math>{\rm A}</math> > Unitsign=3D <div style=3D"fontfamily: serif; fontstyle: normal">A</= div> > > In Semantics we don't need to think much about styling. But when we need = to > we do it within [[Attribute:has unitsign]]. Therefore we can ignore the > > <math> and <div> elements. But we need some syntax to make it working: > Unitsign=3D > > <nosemantic><math>\mathrm{A}</math></nosemantic><semanticonly>A</semantic= on >ly> > > which might work similar to the <noinclude> and <includeonly> Elements. I > recomment short forms like <nosem> and <semonly> too. Alternatively we > could > > use: > Unitsign=3D A  <math>\mathrm{A}</math> > > Which will get included very pretty as: > > [[has unitsign:=3D A  <math>\mathrm{A}</math> ]] > > But this needs further testcases, because this is incompatible with the > current Template engine. > > > =3D=3D Example 4  Multiple Includes =3D=3D > Lets have a Look at the Article > http://de.wikipedia.org/wiki/Kalorie#Definition (Definitions of Calorie). > Now think about wanting to describe multiple versions of Calorie in a > single > > Article. Be examine the Name: >  >  Name  '''[[has Name:=3D {{{Name}}} ]]''' >  > > I think the only way to do this is to use different Subconcepts: > > [[#Calorie (international) :: has Name :=3D Kalorie]] > [[#Calorie (thermochemical) :: has Name :=3D Kalorie]] > > Then we change the Template: > > {{{#if {{{Subconcept}}}  [[#{{{Subconcept}}}::has Name:=3D{{{Name}}= }]] > >  [[has Name:=3D{{{Name}}}]] > > And this for every used semantic Attribute. A [[Template:Subconcept]] can > simplify this task: > > [[{{Subconcept{{{Subconcept}}}}}has Name:=3D{{{Name}}}]] > > > =3D=3D Summary =3D=3D > Templates can lead to a rapid apply of Semantics, but there are lot of > potential Problems too when wanting to use complex syntax whch is not > uncommon. I've tried to cover the biggest problems within this mail. > Hopefully it can lead to pretty solutions. > > ys, MovGP0 > > >  > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys  and earn > cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Semediawikiuser mailing list > Semediawikiuser@... > https://lists.sourceforge.net/lists/listinfo/semediawikiuser =2D=20 Markus Kr=F6tzsch Institute AIFB, University of Karlsruhe, D76128 Karlsruhe mak@... phone +49 (0)721 608 7362 http://www.aifb.unikarlsruhe.de/WBS/ fax +49 (0)721 693 717 