D-Bus service for Apertium

From Apertium
Revision as of 15:24, 12 December 2007 by Francis Tyers (talk | contribs)
Jump to navigation Jump to search

D-Bus is a simple inter-process communication system. We are in the process of developing D-Bus services for Apertium which will make programmatic access to the Apertium tools easier.

D-Bus bus names

D-Bus allows services to be registered under Java style package names (e.g. org.apertium.my_service).

We envision two services:

  • org.apertium.info - this will expose objects to query various aspects of the installed apertium system.
  • org.apertium.translate - this will exposes translation functions.

Multiple objects can be registered with each service. Objects are given UNIX path names. For example, suppose we have English-Polish (en-pl) and English-Catalan (en-ca) translation modes installed in our system, then org.apertium.translate will expose at least four translation objects:

  • English->Catalan translation object,
  • Catalan->English translation object,
  • English->Polish translation object,
  • Polish->English translation object.

Given that one invokes these modes from the command line with "apertium en-ca", "apertium ca-en", "apertium en-pl" and "apertium pl-en", a good naming scheme for the objects would be:

  • /en-ca for the English->Catalan translation object
  • /ca-en for the Catalan->English translation object
  • /en-pl for the English->Polish translation object
  • /pl-en for the Polish->English translation object

These objects will have the full names org.apertium.translate/en-ca, org.apertium.translate/ca-en, org.apertium.translate/en-pl and org.apertium.translate/pl-en.