User:Conrad.Irwin/How about an API

Hello, you have come here looking for the meaning of the word User:Conrad.Irwin/How about an API. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Conrad.Irwin/How about an API, but we will also tell you about its etymology, its characteristics and you will know how to say User:Conrad.Irwin/How about an API in singular and plural. Everything you need to know about the word User:Conrad.Irwin/How about an API you have here. The definition of the word User:Conrad.Irwin/How about an API will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Conrad.Irwin/How about an API, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

An API supporting the following type of queries would be a very useful start to creating a higher-level interface to Wiktionary (this is not example syntax, just ideas)

FIND synonyms FOR en:dog
FIND translations FOR en:dog WHERE targetlanguage=fr
FIND antonyms, anagrams FOR fr:chien
FIND * FOR dog

In order to add this to Wiktionary without necessitating editing each of our million pages, I propose adding a parser function {{#store}} that could be used in our current templates.

{{#store:translation|dog|en|noun|targetlanguage=fr|translation=chien}}
{{#store:synonym|dog|en|noun|synonym=pooch}}

Each piece of data is indexed by the un-named fields, and contains the information in the named fields. The un-named fields would be "word, language, part-of-speech, context", though part-of-speech and context may be optional. In order for this to work, a second extension might be needed that could keep track of what language and part-of-speech the part of the entry was; by looking at the headers - this could be done quite nicely using a simple custom extension with http://www.mediawiki.orghttps://dictious.com/en/Extension:VariablesExtension.

I would then propose a SpecialPage that would allow Sysops (or just Technocrats) to define what form each type of "store" command could take.

ALLOW synonym, antonym, translation WITH targetlang, definition, etymology, descendant WITH targetlang

Once all of the above was working nicely, I might add a SpecialPage that allows the specification of additional parsing rules in order to create further {{#store}} commands from formatting.

CONVERT ^#\s*(.*)$ INTO {{#store:definition|{{PAGENAME}}|{{#var:LANGUAGE}}|{{#var:PARTOFSPEECH}}|definition=$1}}