JSON-RPC Apertium services
Plans for JSON-RPC services have currently been put on hold. We are concentrating our efforts on D-Bus service for Apertium. Please feel free to help us further develop the D-Bus system - even suggestions are welcome!
In order to make it easier to interface with Apertium, bindings to other languages have been requested.
A general solution to the problem is to create services which expose their functions via JSON-RPC. There would be three kinds of services:
- A monodix service to edit a monodix,
- A bidix service to edit a bidix - this would use the monodix services of the language pair in question,
- A translation service.
One might run as many as four services for a single language pair. If one considers the English-Afrikaans pair, one would run:
- A monodix service for the English monodix,
- A monodix service for the Afrikaans monodix,
- A bidix service for the English-Afrikaans bidix,
- A translation service to translate between English and Afrikaans.
This section aims to give a summary of the features required of the monodix service.
Return a list of all the paradigms
This is simple - simply look up the paradigms in the XML file and return them as a JSON list. Filtering by tags might be useful - i.e. only return paradigms with the "n" tag, or only return paradigms with "adj.sint" as tags.
Find paradigms applying to a word
Given a word (not necessarily a lemma), return a list of paradigms which could apply to that word.
Merging of word lists
If one wants to add a word list to a monodix via a script, there is the danger of adding words that are already in the monodix. The merge feature should work by only adding words which have not yet been added to the monodix.