|
1 .. -*- coding: utf-8 -*- |
|
2 |
|
3 ======================= |
|
4 gadict HACKING guide. |
|
5 ======================= |
|
6 .. contents:: |
|
7 :local: |
|
8 |
|
9 Versioning rules. |
|
10 ================= |
|
11 |
|
12 We use **major.minor** schema. |
|
13 |
|
14 Until we reach 5000 words **major** is 0. **minor** updated from time to time. |
|
15 |
|
16 Getting sources (VCS). |
|
17 ====================== |
|
18 |
|
19 Cloning repository:: |
|
20 |
|
21 $ hg clone http://hg.defun.work/gadict gadict |
|
22 $ hg clone http://hg.code.sf.net/p/gadict/code gadict-hg |
|
23 |
|
24 Pushing changes:: |
|
25 |
|
26 $ hg push ssh://$USER@hg.defun.work/gadict |
|
27 $ hg push ssh://$USER@hg.code.sf.net/p/gadict/code |
|
28 $ hg push https://$USER:$PASS@hg.code.sf.net/p/gadict/code |
|
29 |
|
30 Browsing sources. |
|
31 ================= |
|
32 |
|
33 http://hg.defun.work/gadict |
|
34 hgweb at home page. |
|
35 http://hg.code.sf.net/p/gadict/code |
|
36 hgweb at old home page (but supported as mirror). |
|
37 https://sourceforge.net/p/gadict/code/ |
|
38 Sourceforge Allure interface (not primary, a mirror). |
|
39 |
|
40 Dictionary source file format. |
|
41 ============================== |
|
42 |
|
43 For source file format used dictd C5 file format. See:: |
|
44 |
|
45 $ man 1 dictfmt |
|
46 |
|
47 Shortly: |
|
48 |
|
49 * Headwords was preceded by 5 or more underscore characters ``_`` and a blank |
|
50 line. |
|
51 * All text until the next headword is considered the definition. |
|
52 * Any leading ``@`` characters are stripped out, but the file is otherwise |
|
53 unchanged. |
|
54 |
|
55 For convenience also used such assumptions: |
|
56 |
|
57 * Headwords was separated by ``;<SPACE>`` (and all was placed on single line). |
|
58 * UTF-8 encoding was used. |
|
59 * Lines started with ``#`` striped out (comment syntax). |
|
60 * First line with ``ABOUT:`` used as description of dictionary. |
|
61 * First URL (line with ``http://``) used as dictionary home page. |
|
62 |
|
63 Comment syntax convention. |
|
64 ========================== |
|
65 |
|
66 As 'dictd -c5' format does not support comment syntax we filter out all |
|
67 lines that start with '#'. |
|
68 |
|
69 TODO convention. |
|
70 ================ |
|
71 |
|
72 Entries or parts of text that was not completed marked by keywords: |
|
73 |
|
74 TODO |
|
75 incomplete |
|
76 XXX |
|
77 urgent incomplete |
|
78 |
|
79 Makefile rules ``todo`` find this occurrence in sources:: |
|
80 |
|
81 $ make todo |
|
82 |
|
83 Dictionary file name convention. |
|
84 ================================ |
|
85 |
|
86 BNF form:: |
|
87 |
|
88 FILE ::= PREFIX "-" NAME "-" LANG ".dict-c5" |
|
89 PREFIX ::= "gadict" |
|
90 LANG ::= ISOCODE | ISOCODE "-" ISOCODE |
|
91 |
|
92 where ``ISOCODE`` is ISO 639-1 language (2 letter) code, currently ``en``, |
|
93 ``ru``, ``uk`` in use, ``NAME`` is dictionary abbreviated name. |
|
94 |
|
95 World wide dictionary formats and standards. |
|
96 ============================================ |
|
97 |
|
98 http://en.wikipedia.org/wiki/Dictionary_writing_system |
|
99 Dictionary writing system |
|
100 http://www.sil.org/computing/shoebox/mdf.html |
|
101 Multi-Dictionary Formatter (MDF). It defines about 100 data |
|
102 field markers. |
|
103 http://fieldworks.sil.org/flex/ |
|
104 FieldWorks Language Explorer (or FLEx, for short) is designed |
|
105 to help field linguists perform many common language |
|
106 documentation and analysis tasks. |
|
107 http://code.google.com/p/lift-standard/ |
|
108 LIFT (Lexicon Interchange FormaT) is an XML format for storing |
|
109 lexical information, as used in the creation of dictionaries. |
|
110 It's not necessarily the format for your lexicon. |
|
111 http://www.lexiquepro.com/ |
|
112 Lexique Pro is an interactive lexicon viewer and editor, with |
|
113 hyperlinks between entries, category views, dictionary |
|
114 reversal, search, and export tools. It's designed to display |
|
115 your data in a user-friendly format so you can distribute it |
|
116 to others. |
|
117 http://deb.fi.muni.cz/index.php |
|
118 DEBII — Dictionary Editor and Browser |
|
119 |
|
120 Register gadict dictionaries for dictd under Debian. |
|
121 ==================================================== |
|
122 :: |
|
123 |
|
124 $ su |
|
125 $ cat >>etc/dictd/dictd.order <<EOF |
|
126 gadict-dictabbr |
|
127 /home/user/usr/share/dictd/ |
|
128 $ dictdconfig --write |
|
129 $ /etc/init.d/dictd restart |
|
130 $ ^D |
|
131 $ dictdconfig --list |
|
132 $ dict -d gadict-dictabbr v |
|
133 |
|
134 Typing IPA chars in Emacs. |
|
135 ========================== |
|
136 |
|
137 For entering IPA chars use IPA input method. To enable it type:: |
|
138 |
|
139 C-u C-\ ipa <enter> |
|
140 |
|
141 All chars from alphabet typed as usual. To type special IPA chars use next key |
|
142 bindings (or read help in Emacs by ``M-x describe-input-method`` or ``C-h I``). |
|
143 |
|
144 For vowel:: |
|
145 |
|
146 æ ae |
|
147 ɑ o| or A |
|
148 ɒ |o or /A |
|
149 ʊ U |
|
150 ɛ /3 or E |
|
151 ɔ /c |
|
152 ə /e |
|
153 ʌ /v |
|
154 ɪ I |
|
155 |
|
156 For consonant:: |
|
157 |
|
158 θ th |
|
159 ð dh |
|
160 ʃ sh |
|
161 ʧ tsh |
|
162 ʒ zh or 3 |
|
163 ŋ ng |
|
164 ɡ g |
|
165 ɹ /r |
|
166 |
|
167 Special chars:: |
|
168 |
|
169 ː : (semicolon) |
|
170 ˈ ' (quote) |
|
171 ˌ ` (back quote) |
|
172 |
|
173 Alternatively use ``ipa-x-sampa`` or ``ipa-kirshenbaum`` input method (for help |
|
174 type: ``C-h I ipa-x-sampa RET`` or ``C-h I ipa-kirshenbaum RET``). |
|
175 |