Hi James,
I found this link some weeks ago:
https://semantic-mediawiki.org/wiki/User:Yury_Katkov/programming_examples
Even though Semantic Tasks is unmaintained, I found some piece of code
that could inspire you as well:
Hi,
Even though Semantic Tasks is unmaintained, I found some piece of code
that could inspire you as well:
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FSemanticTasks/5363a0ba564c5c3708c246a4c316260d781da1e1/SemanticTasks.classes.php
Please try not follow these as general guideline
I spent a lot of time on Friday trying to figure out how to replicate an
ask query in PHP. I was pretty sure I could do something to reuse the
parser, but since I wanted to be able to manipulate the data before
displaying it I did not pursue that method. Thank you, Frank, for the way
you
James Montalvo wrote
I spent a lot of time on Friday trying to figure out how to replicate an
ask query in PHP. I was pretty sure I could do something to reuse the
parser, but since I wanted to be able to manipulate the data before
displaying it I did not pursue that method. Thank you, Frank,
Hey,
So you'd have something like
{{#gimmeh_datas_in_a_table: [[Category:Some category]]}}
that results in the same output as the #ask call you posted? If that's all
you're doing you can of course just use a template. Which indeed does not
work if you want to modify the result in certain ways.
Hey,
Hopefully writing result formats will become even easier
and more pleasant task!
Hopefully it will yes! Though this will not be brought with using the Ask
library, as the technical issues faced there are mostly disjoint from the
Ask language. That being said, having a nicer implementation
Good stuff! Hopefully writing result formats will become even easier
and more pleasant task!
What do you think to do with growong number of dependencies of SMW? It
seems that by SMW 1.11 we're going to need to install Validator,
DataValues, Ask and maybe something else in order to install
Hey all,
I'm happy to announce the initial release of the Ask library!
A small write-up of this release can be found at
http://www.bn2vs.com/blog/2013/11/17/ask-1-0-released/
The library itself and its documentation resides at
https://github.com/wmde/Ask
Cheers
--
Jeroen De Dauw
Hi and very nice Jeroen. Any discussion which version of smw is expected
to have this common library? I assume it's the same syntax as before,
minus subobjects? Any other functional differences? thanks for the hard
work/john
On 11/17/2013 2:11 PM, Jeroen De Dauw wrote:
Hey all,
I'm happy to
Hey John,
Any discussion which version of smw is expected to have this common
library
There is no discussion about this, as quite some work needs to happen
before we can use Ask in SMW. All I can provide is a guess for the first
release in which SMW might realistically be using this library,
Hi Jeroen!
Good stuff! Hopefully writing result formats will become even easier
and more pleasant task!
What do you think to do with growong number of dependencies of SMW? It
seems that by SMW 1.11 we're going to need to install Validator,
DataValues, Ask and maybe something else in order to
Hi All,
I was using SMW 1.5 ( with MW 1.15.6) and added my own special property
mimetype using smwInitProperties. All the pages with this property were
returned when i used ask query against them
{{#ask: [[mimetype::image/jpeg]] OR [[mimetype::image/bmp }}
But recently i upgraded to SMW 1.8
Hey,
Yes, this query is supposed to work on the current version, at least if you
add the closing ]].
Are you sure you ran both the schema update and data refresh scripts?
Cheers
--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil. ~=[,,_,,]:3
--
Thanks
1. ]] is there in the actual query.
2. i followed
http://semantic-mediawiki.org/wiki/Help:Installation#Upgrading_existing_installations
and ran following commands.
php SMW_setup.php -b SMWSQLStore3
php SMW_refreshData.php -v -b SMWSQLStore3 -fp
php SMW_refreshData.php -v -b
I changed it back to SQLStore2 in LocalSettings.php and i do see some
results.
Special:Properties list 199 properties when SQLStore2 is used where as only
73 when SQLStore3 is used.
I did not see any error while migrating, but will give it a 2nd try.
On Thu, Nov 7, 2013 at 12:48 PM, sumit
Yes I did refresh and other values are returned by ask queries but it seem
the majority of data haven't reached store 3 yet and I forgot that SMW
doesn't use the MW info for categories but it's own. Will take much, much
longer to finish the SMWUpdate jobs.
Thanks.
On Wed, 29 May 2013 08:01:53
Yes, that is true. SMW uses a pre-defined property to represent categorical
relations.
On Thu, May 30, 2013 at 11:58 AM, zehetner zehet...@molgen.mpg.de wrote:
Yes I did refresh and other values are returned by ask queries but it seem
the majority of data haven't reached store 3 yet and I
Hi,
in a wiki which runs
MediaWiki 1.19.1
PHP 5.4.4 (apache2handler)
MySQL 5.5.0-m2-log
Semantic MediaWiki (Version 1.8)
SMW Store 2
I get a list of the pages in category Maps when I use the query:
{{#ask: [[Category:Maps]]}}
and format=debug shows as SQL somethin like
SELECT
Just to make sure, did you refresh your data after moving to SqlStore3? You
need to do that before any data will show up.
Jamie Thingelstad
ja...@thingelstad.com
mobile: 612-810-3699
find me on AIM Twitter Facebook LinkedIn
On May 29, 2013, at 7:02 AM, zehetner zehet...@molgen.mpg.de wrote:
I ran into a problem where the ask queries were returning bogus information.
So I truncated the SMW_IDS table, then re-ran SMW_setup.php, followed by
SMW_refreshData.php in the SemanticMediaWiki maintenance directory.
To make sure everything was good, I ran the main MediaWiki runJobs.php.
There
On Montag, 31. Dezember 2007, Sergey Chernyshev wrote:
My point is that SMW's mission statement is to create Semantic Wikipedia -
that's why I'm saying this. Or am I wrong?
Indeed, but we also support other use-cases (some of our features obviously do
not address Wikipedia needs). And,
My point is that SMW's mission statement is to create Semantic Wikipedia -
that's why I'm saying this. Or am I wrong?
Sergey
On Dec 30, 2007 4:54 AM, cnit [EMAIL PROTECTED] wrote:
I'm not sure if restricting Ask functionality is along the lines of
Wikipedia policies - it's not a
What I meant was: a simple cron-job can touch LocalSettings.php regularly to
purge the MW cache globally. Not much interaction with MW needed for that.
Yes, that's simple.
I guess a strong solution for that will still take some time. One could of
course store inline queries in some table, use
I'm not sure if restricting Ask functionality is along the lines of
Wikipedia policies - it's not a modification operation therefore it should
be public, I believe.
I agree, that abuse bocking and request throttling might be a solution here,
but in general, I wouldn't recommend restriction of
On Donnerstag, 27. Dezember 2007, cnit wrote:
(2) Query answering is done without any caching, and this is clearly a
problem. While inline queries are computed only once and stored in the
parser cache afterwards, Special:Ask has no caching facility at all. This
needs to change in the
Well, that is not the case for the current parser cache, neither in MW nor in
SMW. But if course it could be achieved with some server-side cronjobs.
Ah, I didn't knew about MW cronjobs. That sounds nice. Will try to
find out some examples. Maybe you're right that such functionality
shouldn't
On Freitag, 28. Dezember 2007, cnit wrote:
Well, that is not the case for the current parser cache, neither in MW
nor in SMW. But if course it could be achieved with some server-side
cronjobs.
Ah, I didn't knew about MW cronjobs. That sounds nice. Will try to
find out some examples. Maybe
On Freitag, 14. Dezember 2007, Sergey Chernyshev wrote:
Got it - if it'll speed up the process, that'll be great. Currently SMW on
top of MW runs significantly slower then just MW which is not very good
because it means that SMW+MW can't scale as good as MW alone.
Can you describe in a couple
On Freitag, 14. Dezember 2007, cnit wrote:
Indeed. This was fixed now in SVN.
Thank you! It works!!
And with #ask SMW has become much more powerful!
One tought - I wonder if $smwgQEqualitySupport should be true by
default.. It seems to speeds up a little when set false. But of course
On Freitag, 14. Dezember 2007, Sergey Chernyshev wrote:
Markus, can you elaborate on three values - what's the difference between
SOME and FULL?
FULL is what used to be true in 1.0 (default)
NONE is what used to be false in all versions
SOME is new, but does basically what 0.7 did earlier.
So
On Donnerstag, 13. Dezember 2007, cnit wrote:
The reason is that SMW can only sort by properties that are part of the
core query. Print statements such as ?Date may or may not lead to one
(or more) outputs per query result, but are not used in the initial SQL
query (so as not to increase
Markus (or perhaps someone else),
Can you please give a hint, why with my query
{{#ask: [[Category:News]] |
?Date|
sort=Date|
order=descending|
limit=3|
format=template|
template=newsrow|
default=There was no news|
searchlabel=Browse all news...|
}}
In the SMWSQLStore::createSQLQuery()
And another note: {{#ask}} is in SVN (in a first version).
Thank you!
Working example query:
{{#ask: [[Category:Country]] [[borders::Nigeria]] |
?population|
?area#km² = ''Size''|
format=list|
limit = 3|
link=all|
intro=bTest/b_|
}}
It seems that the category specific
* cnit [EMAIL PROTECTED] [2007-12-03 16:24]:
May I suggest another kind of ask format? Sometimes it's desirable to
get only a simple count of rows instead of the query result rows. So,
if there's a 5 rows in the query result, ask format=count would
return a number 5. It may be useful to
On Montag, 12. November 2007, cnit wrote:
Yes, I could use this as well. But this feature comes only after the
implementation of {{#ask...}} (since this change will change the
interaction of inline queries with MediaWiki's table creation).
Can the implementation of {{#ask}} make possible
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
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
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 :)
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 shamelessplugRegExParserFunctions/shamelessplug.
Combining {{#ask}} with {{#dpl}} and {{#regex}} can produce some very
neat combinations. Also, I'm
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]
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
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
Good to hear that at least the XML-import+SMW-refresh finally worked. The
design of MediaWiki is very fragile in many places, and I fear that there are
much more non-common cases where extensions do not work as expected (e.g. due
to the combination of global and non-global objects everywhere in
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=bTest/b_|
}}
Moreover, it is now of course possible to use templates and
Hello Markus,
On Tuesday, November 6, 2007, 4:20:53 PM, you wrote:
MK On Dienstag, 6. November 2007, cnit wrote:
The other issue that I'm having is {{#ask}} parser function - not
having it stops almost all of my development. It's probably the most
anticipated feature right now. Do you have
Thank you, Jim. That's what I expected. I'm just hoping for 1.0 final is
close enough.
Sergey
On Nov 12, 2007 4:31 PM, Jim Wilson [EMAIL PROTECTED] wrote:
Although I am in favor of {{#ask:}} at the earliest possible
conveneince, after a cursory look through the code, I'm fairly
Yes, I could use this as well. But this feature comes only after the
implementation of {{#ask...}} (since this change will change the interaction
of inline queries with MediaWiki's table creation).
Can the implementation of {{#ask}} make possible such trick that I've
unsuccessfully tried to
Yaron noticed that there is new inline query extension posted on
MediaWiki.org: http://www.mediawiki.org/wiki/Extension:SMW_ParserFunctionAsk
I'm definitely going to install it and see if it'll work for my needs, but
what bothers me is the size of it - it seems to be too simple ;)
I also noticed
Although I am in favor of {{#ask:}} at the earliest possible
conveneince, after a cursory look through the code, I'm fairly certain
this extension will fail to operate as expected.
The first reason is that ask, which is an extension tag, will always
return fully qualified HTML. The output of a
On Donnerstag, 8. November 2007, Sergey Chernyshev wrote:
Not sure if it's related to this issue, but I also lost some data in
smw_attributes table (not all of it though). The worst part is that it
didn't reappear after I ran complete SMW_refreshData on the dataset.
I wonder what needs to be
Did you ever run SMW_refreshData after the import? Plain import does probably
bypass SMW's (save) hooks, so that this last part would be needed (twice, as
described in INSTALL).
SMW's tables are completely determined by the page contents of your wiki, and
so they do not need to be imported or
Yes, I ran SMW_refreshData twice - first with -p and second without.
The problem I ran into is that Property page complained like this:
PHP Fatal error: Call to a member funct
ion getText() on a non-object in /path to mw/extensions/SemanticMediaWiki
/includes/articlepages/SMW_PropertyPage.php on
Yes, this appears to be a bug. For a quick workaround, consider using the
formats list, ul or ol, all of which also support the
template-parameter for formatting (and this one certainly works with SMW1.0).
Note that with list, you can also choose the separator between items
(parameter sep),
Not sure if it's related to this issue, but I also lost some data in
smw_attributes table (not all of it though). The worst part is that it
didn't reappear after I ran complete SMW_refreshData on the dataset.
I wonder what needs to be done to repopulate SMW tables from scratch?
Sergey
Yes, this appears to be a bug. For a quick workaround, consider using the
formats list, ul or ol, all of which also support the
template-parameter for formatting (and this one certainly works with SMW1.0).
Note that with list, you can also choose the separator between items
(parameter sep), so
I think that's a great format for the {{ask}} parser function - it nicely
separates data from presentation; which are somewhat mixed together in
current inline queries.
Also, this is unrelated, but I discovered yesterday that inline queries in
SMW 1.0 can handle redirected pages (pages for which
Markus, thank you for the follow-up! It's great to know that {{#ask}} is
scheduled for 1.0 release!
I'm happy to participate in architectural discussion. Here're some thoughts
on the subject:
1. it seems to be to restricting on query language to remove pipes and
equal signs from it - who
Is there an equivalent to ask but as a parser function? Akin to {{#ask}}?
Thanks in advance.
-- Jim R. Wilson (jimbojw)
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2
58 matches
Mail list logo