| 1 |
Conversion process |
| 2 |
================== |
| 3 |
|
| 4 |
The conversion happens in several steps. |
| 5 |
|
| 6 |
|
| 7 |
Preprocessing |
| 8 |
------------- |
| 9 |
|
| 10 |
This is done with `sed' scripts, located in `src/preprocess'. |
| 11 |
|
| 12 |
|
| 13 |
Ding -> Ding AST |
| 14 |
---------------- |
| 15 |
|
| 16 |
Convert the textual Ding source into a Haskell data structure, staying close |
| 17 |
to the syntax of the Ding source. |
| 18 |
|
| 19 |
This is subdivided into two steps, lexing and parsing. |
| 20 |
|
| 21 |
Some information from the source may be dropped here, if it is not intended |
| 22 |
to be used. |
| 23 |
|
| 24 |
|
| 25 |
Enrichment of the Ding AST |
| 26 |
-------------------------- |
| 27 |
|
| 28 |
Enrich the Ding AST with some information, in particular annotations, inferred |
| 29 |
from other parts of the AST. |
| 30 |
|
| 31 |
|
| 32 |
Ding AST -> TEI AST |
| 33 |
------------------- |
| 34 |
|
| 35 |
Transform the Ding AST to a data structure that more closely resembles the |
| 36 |
TEI[-Lex0] format. |
| 37 |
|
| 38 |
The TEI AST shall be limited in expressiveness in comparison to the full |
| 39 |
potential of TEI (for dictionaries), only information that is extracted from |
| 40 |
the Ding needs to be representable. |
| 41 |
|
| 42 |
The conversion shall be done towards both a deu-eng and a eng-deu target. |
| 43 |
Note that the Ding AST is symmetrical in nature, so this should not be |
| 44 |
difficult. |
| 45 |
|
| 46 |
Since several headwords per entry seem to be disencouraged in the FreeDict |
| 47 |
project, groups on the respective keyword side have to be split here, thereby |
| 48 |
creating multiple entries with different keys but identical values. |
| 49 |
|
| 50 |
|
| 51 |
TEI AST -> TEI XML |
| 52 |
---------------------------------------- |
| 53 |
|
| 54 |
Finally convert the TEI AST to TEI XML. |