"Has allowed value set" is just an example property name - it's not a pre-defined property; you could use any name. Sorry for the confusion.

And my strong guess is that, for this specific data need, of a specific mathematical formula and pre-set values, you would have to have a custom extension.


On Thu, Jan 28, 2010 at 3:04 PM, Zeev Pekar <z.pekar@gmail.com> wrote:

> First, when you use "Square" in your examples, I'm pretty sure you
> actually mean "Area".
you are right, I meant "Area" - its good to look up terms before using

>  Second - I think the idea of custom code for handling functions/rules
> in SMW is a non-starter - too difficult to implement for too little
> value. The Semantic Rules extension mentioned earlier might be able to
> handle this - I haven't seen it in action, but given its name it seems
> promising.
> However, it seems to me that the easiest way to implement this would
> be, instead of storing the formula for the area, to store the sets of
> allowed values directly. This is n-ary data, so you would have two
> options - either use multi-value properties, so you could have
> something like:
yes it would also be good

> [[Has allowed value set::1;4;2]]
> [[Has allowed value set::2;5;5]]
> ...etc.
could you, please, provide a link to where I can read about "Has allowed
value set" - I didn't find it on the SMW page...

> ...or use the Semantic Internal Objects extension, so you could have
> something like:
> {{#set_internal:Is value set for|Has height=1|Has length=4|Has
> area=2}}
> {{#set_internal:Is value set for|Has height=2|Has length=5|Has
> area=5}}
> ...etc.
it sounds reasonable. Will I be able to query with some deviation, for
[[height=2 +/- 1]]
[[length=5 +/- 0.5]]
[[area = 5 +/- 3]]  ?

> The querying would be different depending on which option you went
> with, but in either case it wouldn't be that hard.
> I don't know whether you can actually write out all the possibilities
> by hand - it depends on your data needs. If you have hundreds or more
> of such allowed-value sets, it may make sense to create a custom
> extension for your wiki that would simply generate the text of these
> declarations, based on a formula and a set of inputs.
In my case there are hundreds of input elements, so doing it manually is
not an option. Do I need to program an extension in PHP or maybe it can
be done with Semantic Rules extension, ParserFunction or something like

thank you very much!

> -Yaron
> On Thu, Jan 28, 2010 at 9:49 AM, Hauke Pribnow <hauke.pribnow@gmx.net>
> wrote:
>         Zeev,
>         do you know about the ParserFunctions extension? If not, have
>         a look at it:
>         http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions
>         You should already be able to implement something like this by
>         using
>         this extension and some templates.
>         Cheers,
>         Hauke
>         ------------------------------------------------------------------------------
>         The Planet: dedicated and managed hosting, cloud storage,
>         colocation
>         Stay online with enterprise data centers and the best network
>         in the business
>         Choose flexible plans and management services without
>         long-term contracts
>         Personal 24x7 support from experience hosting pros just a
>         phone call away.
>         http://p.sf.net/sfu/theplanet-com
>         _______________________________________________
>         Semediawiki-devel mailing list
>         Semediawiki-devel@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/semediawiki-devel