Difference between revisions of "JSON-RPC Apertium services"
Line 23: | Line 23: | ||
Given a word (not necessarily a lemma), return a list of paradigms which could apply to that 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. |
|||
==Bidix service== |
==Bidix service== |
Revision as of 17:33, 3 December 2007
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 langauge 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.
Monodix service
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.