Hi guys,
When I do a query for categories using the API I would only like to get the
categories that are listed in the wiki page. For example when I query the
Brocoli page, I get this:
<categories>
<cl ns="14" title="Category:All articles with unsourced statements"/>
<cl ns="14" title="Category:Articles containing Italian-language text"/>
<cl ns="14" title="Category:Articles with 'species' microformats"/>
<cl ns="14" title="Category:Articles with unsourced statements from January
2013"/>
<cl ns="14" title="Category:Brassica oleracea"/>
<cl ns="14" title="Category:Commons category with local link same as on
Wikidata"/>
<cl ns="14" title="Category:Cultivars"/>
<cl ns="14" title="Category:Edible plants"/>
<cl ns="14" title="Category:Inflorescence vegetables"/>
<cl ns="14" title="Category:Pages with citations having bare URLs"/>
</categories>
But I am only interested in these (You'll see it at the bottom of this page
http://en.wikipedia.org/wiki/Brocoli):
<cl ns="14" title="Category:Brassica oleracea"/>
<cl ns="14" title="Category:Cultivars"/>
<cl ns="14" title="Category:Edible plants"/>
<cl ns="14" title="Category:Inflorescence vegetables"/>
I was wondering if there is any workaround this?
Thanks
Chux
Hi all,
Currently I create a mediawiki website.
For the API request, I want to add some limit such as 1000 per day per
developer,etc.
I find 3scale provides this service, but I have some problems to deploy it.
Do I really need 3rd-party service to add limit to mediawiki?
If so, how can I change the API url, for me, I want to change it from
example.com/w/api.php to api.example.com
Thanks
Best,
John
Just wanted to make sure this response made it to the public list.
Looks like I was wrong to suggest this wasn't an API question. :-)
-Sumana
-------- Original Message --------
Subject: Re: [Mediawiki-api] highlighting and stemming in wikipedia
search results
Date: Thu, 15 Aug 2013 08:19:07 -0400
From: Nikolas Everett <neverett(a)wikimedia.org>
To: Sumana Harihareswara <sumanah(a)wikimedia.org>
CC: Ewa Szwed <ewaszynal(a)gmail.com>
I can totally help!
So we use a home grown lucene wrapper at this point but are in the process
of deploying elasticsearch. Both of them power search + highlighting +
"did you mean" all at the same time. Both of them have per language
configuration/customization to return usefully stemmed results for the
language being searched. For example, the new search we're working on
flattens accented characters but only when searching English wikis.
Rather than reimplement it I suggest scraping it from the api if you can.
It looks like the simplest way to get our highlighting from the api is to
ask for it like this:
http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikiped…
If there is something wrong with the API or our search/highlighting then
I'd be happy to work with you on fixing it.
Nik
On Thu, Aug 15, 2013 at 1:05 AM, Sumana Harihareswara <sumanah(a)wikimedia.org
> wrote:
> On 08/12/2013 05:07 AM, Ewa Szwed wrote to MediaWiki API announcements &
> discussion <mediawiki-api(a)lists.wikimedia.org>:
> > Currently I am working on a part of a wikimirror project that involves
> > doing a search in wikipedia and retrieving snippet of text with searched
> > terms being highlighted.
> > I would like to improve what I am doing at the moment by highlighting
> also
> > different forms of a given word.
> > For example if user types in: 'playing' I would also highlight play,
> plays,
> > played and so on.
> > In wikipedia this already works like this:
> >
> https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default…
> > I would like to ask what technics (plugins, libraries, extensions)
> > wikipedia uses to do this type of highlighting.
> > I would appreciate any answer.
>
>
> Ewa Szwed, thanks for your question. In the future you should probably
> try the Wikimedia developers' and general MediaWiki list if you have a
> search-related question: <wikitech-l(a)lists.wikimedia.org>
>
> I'm also cc'ing Nik Everett, the lead for Wikimedia search-related
> questions. I hope he can help. Thanks.
> --
> Sumana Harihareswara
> Engineering Community Manager
> Wikimedia Foundation
Hi,
Abuse Filter extension, Visual Editor, ... are able to create tags when
edits are saved.
Is it possible to do the same kind of things when using the API to edit a
page ?
I'd like to be able to add tags when I save a page using WPCleaner [1] for
several purposes:
* marking the edit as being done by WPCleaner, like what Visual Editor is
doing for its own edits
* when fixing errors for project Check Wiki [2], adding a tag for each kind
of error that has been fixed
* and probably other uses in the future
Having this kind of tags could help track what tools are doing if they
implemented this.
I konw I could use it to see how WPCleaner is used, and if a problem is
reported to check if several edits need to be fixed.
Nico
[1] http://en.wikipedia.org/wiki/Wikipedia:WPCleaner
[2] http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Check_Wikipedia
On 13/08/13 05:00 AM, mediawiki-api-request(a)lists.wikimedia.org wrote:
> On Mon, Aug 12, 2013 at 4:53 PM, McIver, David <
> David.McIver(a)childrens.harvard.edu> wrote:
>
>> Hello all,
>>
>> I am trying to figure out how to gather information regarding the
>> number of page visits, and the number of page edits, to certain
>> pages of interest on Wikipedia.
>>
>> As this is not terribly complicated information, I think there
>> should probably be an easy way to do this. However, I haven't
>> been able to find a way to gather this data from the API
>> Sandbox.
>>
>> Any help you could offer would be greatly appreciated.
>
>
>
> http://stats.grok.se
>
That may help for WMF wikis, but not for Mediawiki.
It would be useful if the page views, where collected, were available
via api.
Amgine
Hello all,
I am trying to figure out how to gather information regarding the number of page visits, and the number of page edits, to certain pages of interest on Wikipedia.
As this is not terribly complicated information, I think there should probably be an easy way to do this. However, I haven't been able to find a way to gather this data from the API Sandbox.
Any help you could offer would be greatly appreciated.
Thanks,
Dave
Currently I am working on a part of a wikimirror project that involves
doing a search in wikipedia and retrieving snippet of text with searched
terms being highlighted.
I would like to improve what I am doing at the moment by highlighting also
different forms of a given word.
For example if user types in: 'playing' I would also highlight play, plays,
played and so on.
In wikipedia this already works like this:
https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default…
I would like to ask what technics (plugins, libraries, extensions)
wikipedia uses to do this type of highlighting.
I would appreciate any answer.
Hi,
I noticed some pages we crawled containing error message like this;
<div id="mw-content-text" lang="zh-CN" dir="ltr" class="mw-content-ltr"><p
class="error">Failed to render property P373:
Wikibase\LanguageWithConversion::factory: given languages do not have the
same parent language</p>
But when I open the url in browser, there is no such message. And using
index.php can also get normal content without error messages.
Here are examples you can retry:
bad
$ wget 'http://zh.wikipedia.org/zh-cn/Google'
good
$ wget 'http://zh.wikipedia.org/w/index.php?title=Google'
Looks like something is wrong on Wikipedia side, anything need to fix?
Thanks
--
Jiang BIAN
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it went to
the wrong person. Thanks.
Hi,
I noticed some pages we crawled containing error message like this;
<div id="mw-content-text" lang="zh-CN" dir="ltr" class="mw-content-ltr"><p
class="error">Failed to render property P373:
Wikibase\LanguageWithConversion::factory: given languages do not have the
same parent language</p>
But when I open the url in browser, there is no such message. And using
index.php can also get normal content without error messages.
Here are examples you can retry:
bad
$ wget 'http://zh.wikipedia.org/zh-cn/Google'
good
$ wget 'http://zh.wikipedia.org/w/index.php?title=Google'
Looks like something is wrong on Wikipedia side, anything need to fix?
Thanks
--
Jiang BIAN
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it went to
the wrong person. Thanks.
Hi,
I noticed some pages we crawled containing error message like this;
<div id="mw-content-text" lang="zh-CN" dir="ltr" class="mw-content-ltr"><p
class="error">Failed to render property P373:
Wikibase\LanguageWithConversion::factory: given languages do not have the
same parent language</p>
But when I open the url in browser, there is no such message. And using
index.php can also get normal content without error messages.
Here are examples you can retry:
bad
$ wget 'http://zh.wikipedia.org/zh-cn/Google'
good
$ wget 'http://zh.wikipedia.org/w/index.php?title=Google'
Looks like something is wrong on Wikipedia side, anything need to fix?
Thanks
--
Jiang BIAN
This email may be confidential or privileged. If you received this
communication by mistake, please don't forward it to anyone else, please
erase all copies and attachments, and please let me know that it went to
the wrong person. Thanks.