3

I am having hard time to parse modules and templates

Actually i could not find how to get that data with API

Here i will give simple example

https://en.wiktionary.org/wiki/%C3%A7al%C4%B1%C5%9Fmak

It uses many modules and templates and parsed results of them are not included in the dump file

So how can i get parsed results

For example to obtain Conjugations of this verb çalışmak, this is written in the source code

====Conjugation====
{{tr-conj|çalış|ı|çalışır|ı|t}}

So how I can get parsed results of that part from API?,

For example wiktionary explains how to use templates at the below page

https://en.wiktionary.org/wiki/Wiktionary:Templates

From there i have opened https://en.wiktionary.org/wiki/Template:en-noun

From there it gives as an example {{en-noun|es}}

So when we open march page

https://en.wiktionary.org/wiki/march#Verb

We see that the plural form is written as {{en-verb|es}}

And it is parsed as march (third-person singular simple present marches, present participle marching, simple past and past participle marched)

So i need to get that parsed part somehow

So what I want to achieve is simple

I give the word or the page id, the template and i get the parsed results

For example i give the word march give the template {{en-verb|es}} and I get the parsed result which is march (third-person singular simple present marches, present participle marching, simple past and past participle marched)

It would be even better if the output were more structured but this is also fine

Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
  • I am not sure that there is a way to get results of template via API. It should be noted that there are two types templates in Wiktionary: static templates and dynamic templates, see the paper "Semi-automatic methods for adding words to the dictionary of VepKar corpus based on inflectional rules extracted from Wiktionary", URL: https://arxiv.org/abs/2001.04719 – Andrew Krizhanovsky Jan 31 '20 at 11:14
  • @AndrewKrizhanovsky so far i could not find any way to parse such templates. The only way looks like manually checking the template and parsing ourselves. Or, the api returns parse however with html markup and it is again too much work to do. Such as https://en.wiktionary.org/w/api.php?action=parse&format=xml&text=%7B%7Btr-conj%7Cgel%7Ce%7Cgelir%7Ci%7Cd%7D%7D – Furkan Gözükara Jan 31 '20 at 12:58

0 Answers0