Differences between revisions 22 and 23
Revision 22 as of 2014-03-22 14:10:02
Size: 5800
Comment: very minor fixes
Revision 23 as of 2016-10-24 19:33:15
Size: 5626
Editor: moomoc
Comment: update page nformatoin
Deletions are marked like this. Additions are marked like this.
Line 27: Line 27:
git clone https://alioth.debian.org/git/pkg-freedict/freedict.git git clone https://anonscm.debian.org/pkg-freedict/freedict.git
Line 31: Line 31:
Line 54: Line 55:
 * you can install opendict or goldendict, which views the databases directly  * you can install goldendict, which views the databases directly
Line 58: Line 59:
  apt-get install dictd   sudo apt install dictd
Line 62: Line 63:
    * dict (a command line client)
    * gnome-dictionary
    * [[DebianPkg:dict]] (a command line client)
    * [[DebianPkg:gnome-dictionary]]
Line 71: Line 72:
The database of databases with information about the size, author, name and
download destination can be found at
[[http://www.freedict.org/en/db-as-xml.html]]. This data is used to construct a
freedict.orig.tar.gz (the original source) which is then imported.

For performance issues, the freedict-database.xml (with all the dictionary
information in it) is cached, one should run
{{{
debian/fetchdictdata.py -x
}}}
to get the latest version.
This is essentially the FreeDict API, an XML document containing meta information about all available dictionaries and their release location.
Important for Debian are the size, author, name and download destination. It is downloaded from
[[http://www.freedict.org/freedict-database.xml]] and can be fetched using `debian/fetchdictdata.py -x`.
Line 85: Line 78:
In order to fetch the latest FreeDict source, one executes In order to fetch the latest FreeDict source, one has to execute:
Line 91: Line 84:
The usage is explained in the first lines of the mentioned file. After this, the
orig.tar.gz-file can be imported with git-import-orig from the git-buildpackage
utilities.
FreeDict does not provide all dictionaries as one source, but release each
dictionary individually. However, the release process is exactly the same for
all dictionaries and it would be cumbersome to update > 80 packages everytime,
it's better to have all dictionaries in one repository. The latest release orig
tarball can be obtained using `debian/fetchdictdata.py -f`.
Line 104: Line 100:
debian/control is auto-generated.<<br>> The file {{{debian/control}}} is auto-generated.
Line 110: Line 107:

Any bug in the generated control file has to be fixed in {{{debian/fetchdictdata.py}}}.
Line 125: Line 124:
 * if no exception was found, use licensecheck and if it fails afterwards a home-brewed license identifier to collect information about the license. Currently only GPL is used - and recognized.
Line 127: Line 125:

If a FIXME entry is found, it's best to investigate the copyright information about this dictionary, extend the parser and if not possible, add an exception. As the name suggest, there should be only a few exceptions.
Line 130: Line 130:
There is essentially only a loop going through all directories and executing
<tt>make lang-lang.dict.dz</tt>.
The build process is essentially only a loop going through all directories and executing

{{{
make lang-lang.dict.dz}}}
Line 136: Line 138:
Building all the databases takes very, very long. To test the packaging, the {{{BUILD_MODE}}} environment variable can be set, so that no actual dictionaries are generated (only empty files are created):

{{{
BUILD_MODE=dummy dpkg-buildpackage
}}}

Line 138: Line 147:
Our mailing list can be joined by sending a mail to {{{pkg-freedict-discuss-subscribe@lists.alioth.debian.org}}} or by visiting the
[[https://lists.alioth.debian.org/mailman/listinfo/pkg-freedict-discuss|subscription page]].
The posting address is {{{pkg-freedict-discuss@lists.alioth.debian.org}}}.
The archive can be found at
[[http://lists.alioth.debian.org/pipermail/pkg-freedict-discuss/]].

We have also an IRC channel, just join us on {{{irc.debian.org}}} in the {{{#debian-freedict}}} channel!
I would be very interested in help. At the moment, there is no team for maintaining the FreeDict dictionaries, but if somebody is interested, it would be good to set up a team.
Line 147: Line 150:
We always need help, be it sporadic or permanent help, it is always welcome.

Currently, the team consists of:

* Sebastian Humenda as packager
* Sébastien Villemond as package uploader/co-maintainer

Please see also our to do section.
Please see also the to do section.
Line 166: Line 162:
 * find someone with opendict-knowledge and let them tell us how we add dictionaries to the opendict database (or validate whether the old way works)

Translation(s): English - Italiano


FreeDict - free (multi/bi)lingual dictionaries

This wiki page documents the work flow and the usage of FreeDict dictionary databases in Debian. Users should directly skip to the [[#Using_FreeDict_dictionaries|Using FreeDict dictionaries]] section.

About FreeDict

The FreeDict project aims at providing free (multi|bi)lingual dictionary (databases) and this team aims at packaging the latest versions to include at both in Ubuntu and Debian Stable/Unstable.

The preferred editable form of the data is in TEI/XML a file format under active maintenance by the Text Encoding Initiative.

Repository

The source can be obtained by checking out:

git clone https://anonscm.debian.org/pkg-freedict/freedict.git

If you have an alioth account, check out:

git clone ssh://<username>@alioth.debian.org/git/pkg-freedict/pkg-freedict.git

Using FreeDict dictionaries

A list of dictionaries can be obtained e.g. through

aptitude search dict-freedict

You can install all dictionaries using

apt-get install dict-freedict-all

(if anyone wants that ;-)).

In addition to the dictionary databases you need a program to view them. You have two options:

  • you can install goldendict, which views the databases directly
  • you can use the classical dictd client/server software:
    •   sudo apt install dictd
      You then need a dict client, for instance:

Build Process

Explanation Of Files Under debian/

debian/freedict.xml

This is essentially the FreeDict API, an XML document containing meta information about all available dictionaries and their release location. Important for Debian are the size, author, name and download destination. It is downloaded from http://www.freedict.org/freedict-database.xml and can be fetched using debian/fetchdictdata.py -x.

get orig.tar.gz distribution

In order to fetch the latest FreeDict source, one has to execute:

debian/fetchdictdata.py -f

FreeDict does not provide all dictionaries as one source, but release each dictionary individually. However, the release process is exactly the same for all dictionaries and it would be cumbersome to update > 80 packages everytime, it's better to have all dictionaries in one repository. The latest release orig tarball can be obtained using debian/fetchdictdata.py -f.

debian/iso-639-3_20130123.tab

From time to time, one should also update the debian/iso.*-file with the language codes, used to translate the short dictionary names like afr-deu into long names for package descriptions. They can be found at http://www-01.sil.org/iso639-3/download.asp.

debian/control

The file debian/control is auto-generated.

Modifications for the source package should be done in debian/control.HEAD, everything else is then generated with

debian/fetchdictdata.py -dc

Any bug in the generated control file has to be fixed in debian/fetchdictdata.py.

debian/copyright

debian/copyright is also semi-auto-generated. The command

debian/fetchdictdata.py -dc

generates the copyright (and control) file. The generated file MUST be checkd afterwards.

The generation consists of the following steps:

  • include debian/copyright.snippets/HEAD
  • for each dictionary look for an exception in debian/copyright.snippets and if present, include it
  • every dictionary where the license cannot be found will get "FIXME" as its license value

If a FIXME entry is found, it's best to investigate the copyright information about this dictionary, extend the parser and if not possible, add an exception. As the name suggest, there should be only a few exceptions.

The Actual Build Process

The build process is essentially only a loop going through all directories and executing

make lang-lang.dict.dz

One special exception is hung-eng and eng-hun, where the database is extracted from a special file before the above explained run.

Building all the databases takes very, very long. To test the packaging, the BUILD_MODE environment variable can be set, so that no actual dictionaries are generated (only empty files are created):

BUILD_MODE=dummy dpkg-buildpackage

Contact And Help Wanted!

I would be very interested in help. At the moment, there is no team for maintaining the FreeDict dictionaries, but if somebody is interested, it would be good to set up a team.

Please see also the to do section.

To Do / Roadmap (?)

Have a look at the current bugs:

[http://packages.qa.debian.org/f/freedict.html]

Further things to be done:

  • package freedict-tools as separate package
  • parallelize build process ( no data dependencies actually) ! adjust maintainer scripts to register databases in goldendict
  • package descriptions are autogenerated from data, do the very same with translations, see http://www.debian.org/international/l10n/ddtp

  • review old patches under debian/patches.old and commit those upstream, if appropriate
    • ! could be split among several persons, so everyone has only a little piece of work