Page MenuHomePhabricator

Add API action for editing lexicon
Closed, ResolvedPublic4 Estimated Story Points


Add a new API action for adding and/or modifying lexicon entries.

This will be used by edit lexicon special page: T181269.

Underneath the hood this is responsible for calling mechanisms for internal versioned storage of the changed lexicon entry and for calling the mechanism which pushes this change to Speechoid. T274504

The API is not responsible for providing reverting/toll-back etc. functionality.

T274485 specifies the parameters needed for the special page. The API expects:

  • the word itself
  • the page from which you started (optional)
  • language (required if no source_page)
  • transcription (IPA)
  • csrf-token

Event Timeline

Lokal_Profil updated the task description. (Show Details)
Lokal_Profil moved this task from Unsorted to Editor on the Wikispeech-Text-to-Speech board.

Speechoid requests look like this, not all parameters are needed:

    "strn": "flesk",
    "language": "sv-se",
    "partOfSpeech": "NN",
    "morphology": "SIN-PLU|IND|NOM|NEU",
    "wordParts": "flesk",
    "lemma": {
	"strn": "flesk",
	"reading": "",
	"paradigm": "s7n-övriga ex träd"
    "transcriptions": [
	    "strn": "\" f l E s k",
	    "language": "sv-se"
kalle changed the point value for this task from 12 to 4.Feb 25 2021, 9:20 AM

Change 667644 had a related patch set uploaded (by Karl Wettin (WMSE); owner: Karl Wettin (WMSE)):
[mediawiki/extensions/Wikispeech@master] [WIP] Introduce ApiLexicon

This is not needed right now since we aren't going to use AJAX requests in T274649.

Change 667644 abandoned by Karl Wettin (WMSE):

[mediawiki/extensions/Wikispeech@master] [WIP] Introduce ApiLexicon


Lexicon editor has been implemented as special page.