Hi

<[email protected]> wrote:
> >
> http://en.wiktionary.org/w/api.php?format=json&action=query&titles=murky&rvprop=content&prop=revisions&redirects=1
> >
> > yields json contents for the word 'murky'.
> >
> [snip]
> > content['query']['pages']['54377']['revisions][0]['*'] yields meaning and
> > other related contents.
> >
> >
> > I am interested to retrieve the meaning of the word. how can I do it?
> >
> > In this scenario I find api to be unusable since pageid is dynamically
> > generated which is required to access the contents.
> >
> If you pass the &indexpageids=1 parameter, the API will output an
> array containing the page IDs used in the response.
>
> http://en.wiktionary.org/w/api.php?format=json&action=query&titles=murky&rvprop=content&prop=revisions&redirects=1&indexpageids=1


Thanks .

>
>
> > Yes I can use xml and find contents inside <rev></rev> tag, but how will
> > some one fetch synonym alone and part of speech alone?
> >
> The API does not provide a way to get just the IPA pronunciation, or
> just the synonyms, or fetch any other semantic information. The only
> thing that is offered is separation into sections using ==Headers== ,
> for anything else you'll have to extract the information yourself
> AFAIK.
>
> Instead of separating contents with ==Headers== it will be freaking
awesome if it is returned as array, This makes easy for end users. Else I
need to write my own parser.

Roan
>
> _______________________________________________
> Mediawiki-api mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>



-- 
*
Thanks & Regards

"Talk is cheap, show me the code" -- Linus Torvalds
kracekumar
www.kracekumar.com
*
_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to