Debian Codegraph @

importers/ding2tei/src/preprocess/de-en/README

raw
1 README
2 ======
3
4 This directory contains preprocessor scripts, written in sed.
5 They should be applied before running the main program.
6
7
8 About
9 -----
10
11 The scripts are used to fix some irregularities before handling processing to
12 the main translating program. Generally, only irregularities that are
13 assumed as mistakes are fixed.
14
15 Targeted at the German-English Ding dictionary, version 1.9.
16
17 Called with `sed -E' (see Shebang); i.e., extended regular expressions are
18 used.
19
20
21 Updates
22 -------
23
24 When updating to a new Ding version, `update_help.bash' should be used. See
25 there for more information.
26
27
28 Conventions
29 -----------
30 * Use the g (global) specifier, for anything that seems likely to possibly
31 occur elsewhere, even if it does not. There might always be added another
32 occurrence in a later version and `g' does not cost much.
33 * Be as generic as possible and as specific as necessary.
34 * Do not overgeneralize (e.g., "(n)" -> "{n}"). There may be legitimate
35 uses of apparent misspellings / bad syntax.
36 * Ex.: "to proffer sb. sth. /sth. to sb." -> "... sb. sth. / sth. to sb."
37 * Bad: "sb. /sth." -> "sb./sth." (when generalized).
38 * Use groups (<()>) and back-references (<\$i>).
39 * Use <`> as separator to avoid the necessity to escape (/).
40 * Use "\<" and "\>" where applicable.
41 * On changes of this script, diff the result with the former result to check
42 for erronous replacing. This is usually doable in time.
43 * When changing to another Ding version, review the diff (!) and check for
44 new irregularities (optional).
45 * Ideally, when grouping (using parentheses), group in an understandable,
46 rather than an efficient way.
47 * Ex.: "s`\<(to take)/ (to carry out) (a measure)`\1 / \2 \3`g"
48 * Groups 2 and 3 could be merged.
49
50
51 Helpful tools
52 -------------
53 * Regexes (grep/$EDITOR/less) to find common mistakes
54 * e.g.: '\([^{]{0,10}\b(adj|adv|prp|n|m|f|...)\b' to find misusage of
55 parantheses (instead of braces).
56 * util/extract_braceexps.sed
57 * Analyze the output to find any irregular brace expression.