[SMW-devel] Querying Article META-DATA (Was: {{#ask}})

2007-11-29 Thread Sergey Chernyshev
Actually, since we're talking about querying different sources - I wonder if
adding such external sources for data through virtual namespaces would be a
way to extand data source? I had an idea to coupling SMW-based wiki with
some external source of information - this might be a solution.

 Sergey


On Nov 29, 2007 5:10 PM, S Page <[EMAIL PROTECTED]> wrote:

> Denny Vrandečić wrote:
> > Any idea how to add page and wiki-meta data to SMW? The problem is, by
> > simply adding further special properties (last modified date, creation
> > date, etc.) it seems to clutter the property namespace... Well, doing
> > the implementation is not trivial either, but heck  :)
>
> Perhaps a special virtual namespace, e.g. [[ArticleMetaProperty:Last
> modified date]] ?
>
> The SMW query code would notice this virtual namespace and retrieve the
> metadata.  For extensibility, it could call back into custom code that
> gets a particular metadatum property; though appending extra SQL code
> seems very fragile.  And doing this really ties SMW into MediaWiki
> database internals.
>
> Some of the names you want to query on are in
> http://meta.wikimedia.org/wiki/Help:Variable, like
> {{REVISIONTIMESTAMP}}. But this missing things like "username who last
> modified", "page size", etc.
>
> Hard to do, hard to maintain, hard to extend, but it would be very useful.
>
> --
> =S
>
> -
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> ___
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>



-- 
Sergey Chernyshev
http://www.sergeychernyshev.com/
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] {{#ask}}

2007-11-29 Thread S Page
Denny Vrandečić wrote:
> Any idea how to add page and wiki-meta data to SMW? The problem is, by 
> simply adding further special properties (last modified date, creation 
> date, etc.) it seems to clutter the property namespace... Well, doing 
> the implementation is not trivial either, but heck  :)

Perhaps a special virtual namespace, e.g. [[ArticleMetaProperty:Last 
modified date]] ?

The SMW query code would notice this virtual namespace and retrieve the 
metadata.  For extensibility, it could call back into custom code that 
gets a particular metadatum property; though appending extra SQL code 
seems very fragile.  And doing this really ties SMW into MediaWiki 
database internals.

Some of the names you want to query on are in 
http://meta.wikimedia.org/wiki/Help:Variable, like 
{{REVISIONTIMESTAMP}}. But this missing things like "username who last 
modified", "page size", etc.

Hard to do, hard to maintain, hard to extend, but it would be very useful.

--
=S

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] {{#ask}}

2007-11-29 Thread Audra Johnson
I don't think doing the implementation would really be that hard.   
There would need to be a refreshMetaSemantics.php maintenance  
script,  and some hooks going into creating and saving pages and  
maybe some other tasks like viewing.  It should probably only keep  
metadata on pages set to have evaluated annotations as defined in  
$smwgNamespacesWithSemanticLinks. If implemented in the core, there  
should be a global settings option so keeping this information can be  
turned on or off.  But I could just as easily see this as a SMW  
extension, and it might be better that way.

Either the special properties would need to be somewhat specific to  
keep from clashing (page last modified on, page created on, page  
edited by, number of page views, number of page edits), or users  
should be allowed to specify what the property namespaces should be.  
Users should also be allowed to customize what metadata gets saved,  
because if they don't care about storing how many times a page is  
viewed, they won't want the extra database hit to update that  
semantic bit of data every time a page is viewed.

I think have a pretty clear idea of how it could be done,  
unfortunately I probably wouldn't be able to do an implementation  
until late December.  So if nobody else does one by then, feel free  
hit me up and remind me, because it's actually something I kind of  
want for myself.  Lately I've been thinking of other possible  
automatically added semantic data, too, like a user ratings system  
extension that works with SMW.

--Audra

On Nov 29, 2007, at 8:08 AM, Denny Vrandečić wrote:

> Any idea how to add page and wiki-meta data to SMW? The problem is, by
> simply adding further special properties (last modified date, creation
> date, etc.) it seems to clutter the property namespace... Well, doing
> the implementation is not trivial either, but heck  :)
>
> Cheers,
> denny
>
>
> Sergey Chernyshev wrote:
>> I use DPL for techpresentations.org   
>> but
>> only because it has access to page meta-data (in my case page  
>> creation
>> dates). I wasn't impressed with DPL's approach and prefer SMW  
>> approach
>> which is about semantic data storage.
>>
>>Sergey
>>
>>
>> On Nov 28, 2007 10:52 AM, Jim Wilson <[EMAIL PROTECTED]
>> > wrote:
>>
>> Of course, I am THRILLED that this is coming down the pipe.
>>
>> Sergey, If you're planning to do something crazy, I suggest  
>> checking
>> out DPL and RegExParserFunctions.
>> Combining {{#ask}} with {{#dpl}} and {{#regex}} can produce  
>> some very
>> neat combinations.  Also, I'm interested to see what you come  
>> up with
>> in the way of {{#ask}} queries.
>>
>> -- Jim
>>
>> On Nov 27, 2007 5:04 PM, Sergey Chernyshev
>> <[EMAIL PROTECTED]
>> > wrote:
>>> Perfect - it works great for what I was planning to use it for!
>> Now almost
>>> no barriers are there ;)
>>>
>>> Sergey
>>>
>>>
>>>
>>>
>>> On Nov 27, 2007 4:43 PM, Markus Krötzsch <
>> [EMAIL PROTECTED]  >  
>> wrote:

 On Dienstag, 27. November 2007, Sergey Chernyshev wrote:
> WOW! Markus, this is great present for being back from
>> vacation! ;) I'll
> test it on my instances as soon as I'll get some time with
>> computer
> tomorrow.

 Great, hope you like it. Surprisingly, most of the work had to
>> go into
 modifying Special:Ask to allow linking to queries using
>> internal links,
>>> and
 into supporting the new separation of printout requests and
>> queries (which
 also makes way for some more "presents"). I had to adopt the
>> Special:ask
 interface a little to account for this. I will drop another
>> short note
>>> about
 recent changes and then be offline for a few days. I guess RC3
>> would be in
 order after this.

 Markus





>
>  Sergey
>
> On Nov 23, 2007 4:01 PM, Markus Krötzsch
>> <[EMAIL PROTECTED] >
>>> wrote:
>> And another note: {{#ask}} is in SVN (in a first version).
>>
>> Working example query:
>>
>> {{#ask: [[Category:Country]] [[borders::Nigeria]] |
>>  ?population|
>>  ?area#km² = ''Size''|
>>  format=list|
>>  limit = 3|
>>  link=all|
>>  intro=Test_|
>> }}
>>
>> Moreover, it is now of course possible to use templates and
>> their
>>> params
>> rather freely in {{#ask}}. Actually even some very
>> unreasonable things
>> work,
>> but many cool things should also be possible. One real
>> issue might be
>> that uninitiated users might nest {{#ask}} in order to emulate
>> -subqueries, even though the latter are much more
>> efficient and
>> complete. Of course nesting sometimes is desirable:
>>
>> {{#ask:
>> [[Category:Country]]
>> [[populatio

Re: [SMW-devel] {{#ask}}

2007-11-29 Thread Denny Vrandečić
Any idea how to add page and wiki-meta data to SMW? The problem is, by 
simply adding further special properties (last modified date, creation 
date, etc.) it seems to clutter the property namespace... Well, doing 
the implementation is not trivial either, but heck  :)

Cheers,
denny


Sergey Chernyshev wrote:
> I use DPL for techpresentations.org  but 
> only because it has access to page meta-data (in my case page creation 
> dates). I wasn't impressed with DPL's approach and prefer SMW approach 
> which is about semantic data storage.
> 
>Sergey
> 
> 
> On Nov 28, 2007 10:52 AM, Jim Wilson <[EMAIL PROTECTED] 
> > wrote:
> 
> Of course, I am THRILLED that this is coming down the pipe.
> 
> Sergey, If you're planning to do something crazy, I suggest checking
> out DPL and RegExParserFunctions.
> Combining {{#ask}} with {{#dpl}} and {{#regex}} can produce some very
> neat combinations.  Also, I'm interested to see what you come up with
> in the way of {{#ask}} queries.
> 
> -- Jim
> 
> On Nov 27, 2007 5:04 PM, Sergey Chernyshev
> <[EMAIL PROTECTED]
> > wrote:
>  > Perfect - it works great for what I was planning to use it for!
> Now almost
>  > no barriers are there ;)
>  >
>  > Sergey
>  >
>  >
>  >
>  >
>  > On Nov 27, 2007 4:43 PM, Markus Krötzsch <
> [EMAIL PROTECTED]  > wrote:
>  > >
>  > > On Dienstag, 27. November 2007, Sergey Chernyshev wrote:
>  > > > WOW! Markus, this is great present for being back from
> vacation! ;) I'll
>  > > > test it on my instances as soon as I'll get some time with
> computer
>  > > > tomorrow.
>  > >
>  > > Great, hope you like it. Surprisingly, most of the work had to
> go into
>  > > modifying Special:Ask to allow linking to queries using
> internal links,
>  > and
>  > > into supporting the new separation of printout requests and
> queries (which
>  > > also makes way for some more "presents"). I had to adopt the
> Special:ask
>  > > interface a little to account for this. I will drop another
> short note
>  > about
>  > > recent changes and then be offline for a few days. I guess RC3
> would be in
>  > > order after this.
>  > >
>  > > Markus
>  > >
>  > >
>  > >
>  > >
>  > >
>  > > >
>  > > >  Sergey
>  > > >
>  > > > On Nov 23, 2007 4:01 PM, Markus Krötzsch
> <[EMAIL PROTECTED] >
>  > wrote:
>  > > > > And another note: {{#ask}} is in SVN (in a first version).
>  > > > >
>  > > > > Working example query:
>  > > > >
>  > > > > {{#ask: [[Category:Country]] [[borders::Nigeria]] |
>  > > > >  ?population|
>  > > > >  ?area#km² = ''Size''|
>  > > > >  format=list|
>  > > > >  limit = 3|
>  > > > >  link=all|
>  > > > >  intro=Test_|
>  > > > > }}
>  > > > >
>  > > > > Moreover, it is now of course possible to use templates and
> their
>  > params
>  > > > > rather freely in {{#ask}}. Actually even some very
> unreasonable things
>  > > > > work,
>  > > > > but many cool things should also be possible. One real
> issue might be
>  > > > > that uninitiated users might nest {{#ask}} in order to emulate
>  > > > > -subqueries, even though the latter are much more
> efficient and
>  > > > > complete. Of course nesting sometimes is desirable:
>  > > > >
>  > > > > {{#ask:
>  > > > > [[Category:Country]]
>  > > > > [[population::>{{#ask:headers=hide|?Population|[[Uganda]]}}
> ]]  |
>  > > > >  sort=population|
>  > > > >  ?population
>  > > > > }}
>  > > > >
>  > > > > This indeed works now.
>  > > > >
>  > > > > Here is what should hopefully work for #ask on SVN:
>  > > > >
>  > > > > * all printout formats other than "debug" (which still
> gives some
>  > HTML),
>  > > > > * all known parameters (though some now are more flexible
> since you
>  > can
>  > > > > use
>  > > > > wiki-markup as values),
>  > > > > * printout requests with the syntax "? property#unit = label",
>  > > > > * basic queries, nested queries, value ranges, wildcards,
> and yet
>  > > > > *  should work as it did before (I hope).
>  > > > >
>  > > > > Here is what certainly does not work:
>  > > > >
>  > > > > * links to further results don't work in wikitext (we need
> another
>  > > > > URL-scheme
>  > > > > for that, but "external" links may be my first fix),
>  > > > > * printouts of Categories do not work via "? Category" yet,
>  > > > > * disjunctions in queries obviously do not work yet, since
> "|" is
>  > already
>  > > > > taken in templates (Sergey suggested a solution