Skip to content

Commit

Permalink
Fixed Danish tables and cleared inconsistencies in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
BueVest authored and bertfrees committed Aug 27, 2018
1 parent 2ddf621 commit 0eab86d
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 206 deletions.
6 changes: 3 additions & 3 deletions tables/da-dk-6miscChars.cti
Expand Up @@ -80,9 +80,9 @@ sign \x00b5 5-134 MICRO SIGN
digit \x00b9 346-1 SUPERSCRIPT ONE
#letter \x00ba 12345678 MASCULINE ORDINAL INDICATOR
noback punctuation \x00bb 2356 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
sign \x00bc 3456-1-34-145 VULGAR FRACTION ONE QUARTER
sign \x00bd 3456-1-34-12 VULGAR FRACTION ONE HALF
sign \x00be 3456-14-34-145 VULGAR FRACTION THREE QUARTERS
noback sign \x00bc 3456-1-34-145 VULGAR FRACTION ONE QUARTER
noback sign \x00bd 3456-1-34-12 VULGAR FRACTION ONE HALF
noback sign \x00be 3456-14-34-145 VULGAR FRACTION THREE QUARTERS
noback punctuation \x00bf 26 INVERTED QUESTION MARK
uplow \x00c0\x00e0 5-1 LATIN LETTER A WITH GRAVE
noback uplow \x00c1\x00e1 5-1 LATIN LETTER A WITH ACUTE
Expand Down
54 changes: 3 additions & 51 deletions tables/da-dk-g16.ctb
Expand Up @@ -103,7 +103,7 @@ include da-dk-6miscChars.cti

# Litdigits
include litdigits6Dots.uti

numericmodechars /,.:^
undefined 26

### Braille indicators and special characters
Expand Down Expand Up @@ -140,13 +140,10 @@ endemphword underline 56

capsletter 46
begcapsword 456
endcapsword 68 # Used during back-translation to stop overflow of capsword
endcapsword 6
multind 6-46 letsign capsletter
multind 46-6 capsletter letsign
multind 6-456 letsign begcapsword
multind 68-6-46 endcapsword letsign capsletter
multind 68-6-456 endcapsword letsign begcapsword
multind 68-6 endcapsword letsign

numsign 3456
multind 6-3456 letsign numsign
Expand Down Expand Up @@ -212,7 +209,7 @@ midnum / 34
midnum : 25

midnum ^ 45-346
midnum \x00d7 45-3-3456
midnum \x00d7 45-3

# Punctuation
prepunc " 2356
Expand Down Expand Up @@ -273,56 +270,11 @@ nofor context `@36-36~ "-"
noback pass2 @467 @45-6
noback pass2 @4568 @45-456

# Show endcapsword as dot 6 (letsign)
noback pass2 @68 @6

noback pass2 @6-46-5 @46-5 # no letsign before cap letters with accent
noback pass2 @6-46 @46-6 # Ensure correct order

### Pass 2 - backward

# Insert letsign between number (with extra punctuation) and capsletter sign
nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@46 @68-6
nofor pass2 @3456$l.$Spm$l.@3[]@46 @68-6
nofor pass2 @3456$l.$Spm$Spm[]@46 @68-6
nofor pass2 @3456$l.$Spm[]@46 @68-6

# Insert letsign between number (with extra punctuation) and capsword sign
nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@456 @6
nofor pass2 @3456$l.$Spm$l.@34$l.@34[]@456 @6
nofor pass2 @3456$l.$Spm$l.@36$l.@36[]@456 @6
nofor pass2 @3456$l.$Spm$l.@3[]@456 @6
nofor pass2 @3456$l.$Spm$l.@34[]@456 @6
nofor pass2 @3456$l.$Spm$l.@36[]@456 @6
nofor pass2 @3456$l.$Spm$Spm[]@456 @6
nofor pass2 @3456$l.$Spm[]@456 @6
nofor pass2 @3456$l.[]@456 @6

# Place endcaps in connection to all the following Braille patterns:
nofor pass2 $l[@45-3] @45-3-68
nofor pass2 $l[@468] @468-68
nofor pass2 $l[@6] @68-6 # Must come before letsign
nofor pass2 $l[@36] @36-68
nofor pass2 $l[@34] @34-68
nofor pass2 $l[@2356] @2356-68
nofor pass2 $l[@45-36] @45-36-68
nofor pass2 $l[@4-356] @4-356-68
nofor pass2 $l[@245-356] @245-356-68
nofor pass2 $l[@4] @4-68
nofor pass2 $l[@235] @235-68
nofor pass2 $l[@45-1] @45-1-68
nofor pass2 $l[@236] @236-68
nofor pass2 $l[@356-356] @356-356-68
nofor pass2 $l[@356] @356-68
nofor pass2 $l[@3] @3-68
nofor pass2 $l[@2] @2-68
nofor pass2 $l[@26] @26-68
nofor pass2 $l[@25] @25-68
nofor pass2 $l[@12346] @12346-68

nofor pass2 $l[]@46 @68-6
#nofor pass2 $a[]@456 @6

### Pass 3 - forward translation

# Ensure there is only one letsign
Expand Down
117 changes: 40 additions & 77 deletions tables/da-dk-g26.ctb
Expand Up @@ -126,8 +126,13 @@ math \x00f7 45-256 DIVISION SIGN
# Misc unicode characters
include da-dk-6miscChars.cti

# Extra chars for private use:
space \xf800 234f # Used to force a hidden word boundary
letter \xf801 123f # Used to prevent word contractions in certain cases

# Litdigits
include litdigits6Dots.uti
numericmodechars /,.:^

undefined 26

Expand Down Expand Up @@ -164,13 +169,10 @@ endemphword underline 56

capsletter 46
begcapsword 456
endcapsword 68 # Used during back-translation to stop overflow of capsword
endcapsword 6
multind 6-46 letsign capsletter
multind 46-6 capsletter letsign
multind 6-456 letsign begcapsword
multind 68-6-46 endcapsword letsign capsletter
multind 68-6-456 endcapsword letsign begcapsword
multind 68-6 endcapsword letsign

numsign 3456
multind 6-3456 letsign numsign
Expand Down Expand Up @@ -225,6 +227,9 @@ nofor correct "\x28a0" ? # Extraneous endcaps signs
#nofor correct "\x2820" ?
nofor correct "~\\456/" "|"

#ensure \xf800\xf801 between a digit and a letter
noback correct $dy[]$l "\xf800\xf801"
noback correct $dy$Spm.[]$l "\xf800\xf801"
### Pass 1 - Forward and backward

# Punctuations, math and numbers
Expand All @@ -238,16 +243,14 @@ nofor midnum ^ 346
nofor midnum ^ 45-346

midnum ^ 45-346
midnum \x00d7 45-3-3456
midnum \x00d7 45-3

# various back rules for math signs etc.
nofor midnum % 0-245-356-0-3456
nofor endnum % 0-245-356
nofor endnum \x2030 0-245-356-356
nofor midnum \s 3456
nofor midnum \x00d7 45-3-3456
nofor midnum \x00d7 45-3
nofor midnum \x00d7 3-3456
#nofor midnum \x00d7 3

# Punctuation
prepunc " 2356
Expand Down Expand Up @@ -281,7 +284,6 @@ always ) 6-356

# extra back rules for ")"
nofor after punctuation always ) 356
nofor after punctuation always ) 68-356
nofor always \x00b0 4-356
nofor always ') 4-6-356
nofor always ") 2356-356
Expand Down Expand Up @@ -882,29 +884,17 @@ nofor sufword weizsäck 6-2456-15-24-6-1356-234-345-14-13

# Common combinations of one word contractions with slash
word af/på 356-34-1234
word af/på 356-34-68-1234
word du/i 145-34-24
word du/i 145-34-68-24
word eller/og 15-34-14
word eller/og 15-34-68-14
word fra/til 235-34-2345
word fra/til 235-34-68-2345
word han/hun 13456-34-136
word han/hun 13456-34-68-136
word hun/han 136-34-13456
word hun/han 136-34-68-13456
word i/du 24-34-145
word i/du 24-34-68-145
word og/eller 14-34-15
word og/eller 14-34-68-15
word over/under 1346-34-12345
word over/under 1346-34-68-12345
word på/af 1234-34-356
word på/af 1234-34-68-356
word til/fra 2345-34-235
word til/fra 2345-34-68-235
word under/over 12345-34-1346
word under/over 12345-34-68-1346

# no backtrans of ^1 and `2. use contractions
nofor always eta 346-1
Expand Down Expand Up @@ -1014,6 +1004,7 @@ noback context `["!"] @6-235

# Ensure two dashes where appropriate.
noback context $w["-"]$w @36
noback context $sw["-"]"\xf800\xf801" @36
noback context $sw["-"]$sw @36-36
noback context `["-"]$sw @36-36
noback context $sw["-"]~ @36-36
Expand All @@ -1023,22 +1014,6 @@ noback context `["-"]~ @36-36
# Ensure letsign between letter and numsign
noback context $l[]$D @6

# No "nd", "hv", "or", or "st" after a digit and a letsign
noback context $dy["hv"] @6-125-1236
noback context $dy$Spm["hv"] @6-125-1236
noback context $dy["nd"] @6-1345-145
noback context $dy$Spm["nd"] @6-1345-145
noback context $dy["or"] @6-135-1235
noback context $dy$Spm["or"] @6-135-1235
noback context $dy["st"] @6-234-2345
noback context $dy$Spm["st"] @6-234-2345
noback context $dy["te"] @6-2345-15
noback context $dy$Spm["te"] @6-2345-15


#ensure dot 6 between a digit and a letter
noback context $dy[]$u @6
noback context $dy$Spm.[]$u @6

### context - backward translation

Expand All @@ -1054,6 +1029,18 @@ nofor context `@36-36~ "-"

### Pass 2 - forward translation

# No "nd", "hv", "or", or "st" after a digit and a letsign
noback pass2 @234f-123f-2456 @6-125-1236
noback pass2 @234f-123f-12345 @6-1345-145
noback pass2 @234f-123f-1346 @6-135-1235
noback pass2 @234f-123f-1356 @6-234-2345
noback pass2 @234f-123f-1256 @6-2345-15
# extra lines to correct hyphenation errors caused by \xf801
noback pass2 @234f-123f-135-3456-1235 @6-135-1236-156
noback pass2 @234f-123f-3456 @6-1236-15

noback pass2 @234f-123f @6

# Correct chars defined as 8 dots because they include letsign
noback pass2 @467 @45-6
noback pass2 @4568 @45-456
Expand All @@ -1063,10 +1050,8 @@ noback pass2 @13467 @6-1346
noback pass2 @13567 @6-1356
noback pass2 @12567 @6-1256

# Show endcapsword as dot 6 (letsign)
noback pass2 @68 @6

noback pass2 @6-46-5 @46-5 # no letsign before cap letters with accent
noback pass2 @234f-123f-46-5 @46-5 # no letsign before cap letters with accent
noback pass2 _$D[@6-46-6] *
noback pass2 _$D[@6-46] *
noback pass2 @6-46-6 @46-6 # Ensure correct order and no double letsign
Expand All @@ -1075,45 +1060,23 @@ noback pass2 @6-46 @46-6 # Ensure correct order
### Pass 2 - backward

# Insert letsign between number (with extra punctuation) and capsletter sign
nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@46 @68-6
nofor pass2 @3456$l.$Spm$l.@3[]@46 @68-6
nofor pass2 @3456$l.$Spm$Spm[]@46 @68-6
nofor pass2 @3456$l.$Spm[]@46 @68-6
#nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@46 @6
#nofor pass2 @3456$l.$Spm$l.@3[]@46 @6
#nofor pass2 @3456$l.$Spm$Spm[]@46 @6
#nofor pass2 @3456$l.$Spm[]@46 @6

# Insert letsign between number (with extra punctuation) and capsword sign
nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@456 @6
nofor pass2 @3456$l.$Spm$l.@34$l.@34[]@456 @6
nofor pass2 @3456$l.$Spm$l.@36$l.@36[]@456 @6
nofor pass2 @3456$l.$Spm$l.@3[]@456 @6
nofor pass2 @3456$l.$Spm$l.@34[]@456 @6
nofor pass2 @3456$l.$Spm$l.@36[]@456 @6
nofor pass2 @3456$l.$Spm$Spm[]@456 @6
nofor pass2 @3456$l.$Spm[]@456 @6
nofor pass2 @3456$l.[]@456 @6

# Place endcaps in connection to all the following Braille patterns:
nofor pass2 $l[@45-3] @45-3-68
nofor pass2 $l[@468] @468-68
nofor pass2 $l[@6] @68-6 # Must come before letsign
nofor pass2 $l[@36] @36-68
nofor pass2 $l[@34] @34-68
nofor pass2 $l[@2356] @2356-68
nofor pass2 $l[@45-36] @45-36-68
nofor pass2 $l[@4-356] @4-356-68
nofor pass2 $l[@245-356] @245-356-68
nofor pass2 $l[@4] @4-68
nofor pass2 $l[@235] @235-68
nofor pass2 $l[@45-1] @45-1-68
nofor pass2 $l[@236] @236-68
nofor pass2 $l[@356-356] @356-356-68
nofor pass2 $l[@356] @356-68
nofor pass2 $l[@3] @3-68
nofor pass2 $l[@2] @2-68
nofor pass2 $l[@26] @26-68
nofor pass2 $l[@25] @25-68
nofor pass2 $l[@12346] @12346-68

nofor pass2 $l[]@46 @68-6
#nofor pass2 @3456$l.$Spm$l.@3$l.@3[]@456 @6
#nofor pass2 @3456$l.$Spm$l.@34$l.@34[]@456 @6
#nofor pass2 @3456$l.$Spm$l.@36$l.@36[]@456 @6
#nofor pass2 @3456$l.$Spm$l.@3[]@456 @6
#nofor pass2 @3456$l.$Spm$l.@34[]@456 @6
#nofor pass2 @3456$l.$Spm$l.@36[]@456 @6
#nofor pass2 @3456$l.$Spm$Spm[]@456 @6
#nofor pass2 @3456$l.$Spm[]@456 @6
#nofor pass2 @3456$l.[]@456 @6

#nofor pass2 $l[]@46 @6
#nofor pass2 $a[]@456 @6

### Pass 3 - forward translation
Expand Down

0 comments on commit 0eab86d

Please sign in to comment.