# Liblouis: Danish grade 2 table for 6 and 8 dots
#
#  Copyright (C) 2014, Bue Vester-Andersen <bue@vester-andersen.dk>
#
#  This file is part of liblouis.
#
#  liblouis is free software: you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as
#  published by the Free Software Foundation, either version 2.1 of the
#  License, or (at your option) any later version.
#
#  liblouis is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with liblouis. If not, see
#  <http://www.gnu.org/licenses/>.
#
#------------
#
# This file contains all core rules for grade 2, both 6 and 8 dots.
# It is included by both da-dk-g26.ctb and da-dk-g28.ctb.
#
# Version: Bue Vester-Andersen, 140511

# Character classes for use with numsign / ve contraction
# digletters covers both small and cap letters a-j, since caps may not be marked explicitly. 
class digletter AaBbCcDdEeFfGgHhIiJj
# nondigletters covers small letters from k + various part word contractions with dots 5 or 6. Necesary to ensure correct back-translation.
class nondigletter klmnopqrstuvwxyzæøå\x017e\x00e0\x00e7\x00e8\x00e9\x00ea\x00eb\x00ee\x00ef\x00f4\x00f9\x00fb\x00fc\x283f\x2829\x282b\x2837

#Special sequences, urls emails and file names.
# Currently commented out, since nocont does not affect nocross rules

# nocont ://
# nocont www
# nocont .com
# nocont .dk
#nocont .eu
#nocont .edu
#nocont .gov
#nocont .mil
#nocont .net
#nocont .org
#nocont .uk
#nocont .doc
#nocont .exe
#nocont .htm
#nocont .tex
#nocont .txt
#nocont .gif
#nocont .jpg
#nocont .png
#nocont .wav
#nocont .tar
#nocont .zip

#Words
word af 356
word aldrig 1-35
word aig =
word alle 1-15
begnum ae 6-1-15
contraction ae
word allerede 1-123-1235
begnum alr 6-1-123-1235
contraction alr
word alligevel 1-123-1236
begnum alv 6-1-123-1236
contraction alv
word altid 1-2345-145
begnum atd 6-1-2345-145
contraction atd
word altså 1-16
begnum aå 6-1-16
contraction aå
word at 1

word blevet 12-2345
begnum bt 6-12-2345
contraction bt
word blev 12-1236
begnum bv 6-12-1236
contraction bv
word blive 12-3456
word bve 12-1236-15
word bliver 12

word derefter 23456-1356
word derst =
word deres 256
word derfor 23456-124
word derf =
word derigennem 23456-24-12456
word derige 1456-1235-24-12456
word dermed 23456-134
word derm =
word derned 23456-1246
word derne =
word derop 23456-135
word dero =
word derover 23456-1346
word deror =
word derpå 23456-1234
word derp =
word dersom 23456-234
word ders =
word dertil 23456-2345
word dert =
word derunder 23456-12345
word derved 23456-1236
word din 145-1345
begnum dn 6-145-1345
contraction dn
word disse 145-234
begnum ds 6-145-234
contraction ds
word dit 145-2345
begnum dt 6-145-2345
contraction dt
word du 145

word efter 1356
word eller 15
word endnu 15-136
begnum eu 6-15-136
contraction eu

word fik 124-13
begnum fk 6-124-13
contraction fk
word fordi 124-145
begnum fd 6-124-145
contraction fd
word forskellige 124-123456-15
word fske =
word forskelligt 124-123456-2345
word fskt =
word forskellig 124-123456
word fsk =
word for 124
word fra 235
word første 124-1356-15
word først 124-1356
word før 246

word ganske 1245-123456
word gennem 12456
word ge =
word gik 1245-13
begnum gk 6-1245-13
contraction gk
word gør 1245

word ham 236
word hans 13456-234
begnum ys 6-13456-234
contraction ys
word han 13456
word har 125
word havde 125-1456
word hde =
word have 125-3456
word hve =
word helt 125-2345
begnum ht 6-125-2345
contraction ht
word hendes 125-234
begnum hs 6-125-234
contraction hs
word hende 125-145
begnum hd 6-125-145
contraction hd
word hun 136
word hvad 2456
word hv =
word hvis 2456-234
word hvs =
word hvordan 34-1
word hvorefter 34-1356
word hvorfor 34-124
word hvorigennem 34-24-12456
word hvorledes 34-15
word hvormed 34-134
word hvornår 34-1345
word hvorover 34-1346
word hvorpå 34-1234
word hvortil 34-2345
word hvorunder 34-12345
word hvorved 34-1236
word hvor 34

word igennem 24-12456
word ige =
word igen 35
word ig =
word ikke 24-13
begnum ik 6-24-13
contraction ik
word imidlertid 24-24
begnum ii 6-24-24
contraction ii

word jeg 245

word kan 13
word kommer 13-156
word ker =
word kommet 13-346
word ket =
word komme 13-146
word kme =
word kom 13-134
begnum km 6-13-134
contraction km
word kunne 13-1246
word kne =

word ligesom 123-234
begnum ls 6-123-234
contraction ls
word lige 123
word lille 123-123
begnum ll 6-123-123
contraction ll

word mange 134-12456
word mge =
word med 134
word megen 146-126
word meen =
word meget 146-346
word meet =
word mellem 146-134
word mem =
word men 146
word me =
word min 134-1345
begnum mn 6-134-1345
contraction mn
word mit 134-2345
begnum mt 6-145-2345
contraction mt
word måske 134-123456
word msk =
word måtte 134-1256
word mte =

word naturligvis 1345-2345-1236
begnum ntv 6-1345-2345-1236
contraction ntv
word nd =
word ned 1246
word ne =
word nogen 1345-1345
begnum nn 6-1345-1345
contraction nn
word noget 1345-2345
begnum nt 6-1345-2345
contraction nt
word nogle 1345-123-15
begnum nle 6-1345-123-15
contraction nle
word når 1345

word også 14-16
begnum cå 6-14-16
contraction cå
word og 14
word omkring 135-134-13
begnum omk 6-135-134-13
contraction omk
word op 135
word or =
word over 1346

word på 1234

word ret 12356
word re 1235-15
word rigtige 1235-12456
word rge =
word rigtigt 1235-2345
begnum rt 6-1235-2345
contraction rt
word rigtig 1235

word sagde 234-1456
word sammen 234-134
begnum sm 6-234-134
contraction sm
word samme 234-146
word sme =
word selvfølgelig 234-1236-124
begnum svf 6-234-1236-124
contraction svf
word selv 234-1236
begnum sv 6-234-1236
contraction sv
word sidste 234-1356-15
word sste =
word sidst 234-1356
word sst =
word sin 234-1345
begnum sn 6-234-1345
contraction sn
word sit 234-2345
begnum st 6-234-2345
contraction st
word skal 123456
word sk =
word skulle 123456-123-15
word skle =
word snart 234-1235
begnum sr 6-234-1235
contraction sr
word som 234
word sådan 16-1
begnum åa 6-16-1
contraction åa
word således 16-15
begnum åe 6-16-15
contraction åe
word så 16

word tid 2345-145
begnum td 6-2345-145
contraction td
word tilbage 2345-12
begnum tb 6-2345-12
contraction tb
word til 2345

word under 12345

word var- =
word var. =
word var 36
word ved 1236
word ville 1236-123-15
begnum vle 6-1236-123-15
contraction vle
word vil 1236-123
begnum vl 6-1236-123
contraction vl
word været 1236-2345
begnum vt 6-1236-2345
contraction vt
word være 345

# Special rules for numsign / ve
# must come before the general nocross rules
word ve =
before digletter begword ve = 1236-15

# vea
before nondigletter begword vea 3456-1
sufword veade 3456-1-1456
sufword veader 3456-1-23456
sufword veage 3456-1-12456

# veb
before nondigletter begword veb 3456-12
before nondigletter begword veba 3456-12-1
before nondigletter begword vebb 3456-12-12
before nondigletter begword vebe 3456-12-15
before nondigletter begword vebi 3456-12-24

# vec
before nondigletter begword vec 3456-14

# ved
before nondigletter begword ved 3456-145
before nondigletter begword veda 3456-145-1
before nondigletter begword vedb 3456-145-12
sufword vedben 3456-145-12-126
sufword vedbend 3456-145-12-15-12345
sufword vedbenden 3456-145-12-126-12346
before nondigletter begword vedc 3456-145-14
before nondigletter begword vedd 3456-145-145
sufword vedde 3456-145-1456
sufword veddet 3456-145-2346
sufword vede 3456-1456
sufword veden 3456-12346
sufword veder 3456-23456
sufword vedet 3456-2346
before nondigletter begword vedf 3456-145-124
before nondigletter begword vedfa 3456-145-124-1
before nondigletter begword vedfe 3456-145-124-15
before nondigletter begword vedfi 3456-145-124-24
before nondigletter begword vedg 3456-145-1245
before nondigletter begword vedga 3456-145-1245-1
sufword vedge 3456-145-12456
before nondigletter begword vedgi 3456-145-1245-24
before nondigletter begword vedh 3456-145-125
before nondigletter begword vedha 3456-145-125-1
before nondigletter begword vedhe 3456-145-125-15
before nondigletter begword vedhi 3456-145-125-24
before nondigletter begword vedi 3456-145-24
before nondigletter begword vedj 3456-145-245

# vee
before nondigletter begword vee 3456-15
sufword veen 3456-126
sufword veer 3456-156
sufword veet 3456-346

# vef
before nondigletter begword vef 3456-124
before nondigletter begword vefa 3456-124-1
before nondigletter begword vefe 3456-124-15
before nondigletter begword vefi 3456-124-24

# veg
before nondigletter begword veg 3456-1245
before nondigletter begword vega 3456-1245-1
sufword vege 3456-12456
sufword vegen 3456-1245-126
word veget 3456-1245-346
sufword vegger 3456-1245-1245-156
before nondigletter begword vegi 3456-1245-24

# veh
before nondigletter begword veh 3456-125
before nondigletter begword veha 3456-125-1
sufword vehage 3456-125-1-23456
before nondigletter begword vehe 3456-125-15
before nondigletter begword vehi 3456-125-24

# vei
before nondigletter begword vei 3456-24
sufword veide 3456-24-1456
sufword veige 3456-24-12456

# vej
before nondigletter begword vej 3456-245
before nondigletter begword veja 3456-245-1
before nondigletter begword vejaf 3456-245-1-124
sufword vejafde 3456-245-1-124-1456
before nondigletter begword vejafgif 3456-245-1-124-1245-24-124
before nondigletter begword vejb 3456-245-12
before nondigletter begword vejba 3456-245-12-1
before nondigletter begword vejbe 3456-245-12-15
before nondigletter begword vejbi 3456-245-12-24
before nondigletter begword vejc 3456-245-14
before nondigletter begword vejd 3456-245-145
before nondigletter begword vejda 3456-245-145-1
sufword vejde 3456-245-1456
before nondigletter begword vejdi 3456-245-145-24
before nondigletter begword veje 3456-245-15
before nondigletter begword vejeb 3456-245-15-12
before nondigletter begword vejed 3456-245-15-145
sufword vejede 3456-245-15-1456
before nondigletter begword vejef 3456-245-15-124
before nondigletter begword vejeg 3456-245-15-1245
sufword vejege 3456-245-15-12456
sufword vejen 3456-245-126
sufword vejene 3456-245-15-1246
sufword vejer 3456-245-156
word vejet 3456-245-346
before nondigletter begword vejf 3456-245-124
before nondigletter begword vejfa 3456-245-124-1
before nondigletter begword vejfe 3456-245-124-15
before nondigletter begword vejfi 3456-245-124-24
before nondigletter begword vejg 3456-245-1245
before nondigletter begword vejga 3456-245-1245-1
sufword vejge 3456-245-12456
before nondigletter begword vejgi 3456-245-1245-24
before nondigletter begword vejh 3456-245-125
before nondigletter begword vejha 3456-245-125-1
before nondigletter begword vejhe 3456-245-125-15
before nondigletter begword vejhi 3456-245-125-24
before nondigletter begword vejhj 3456-245-125-245
before nondigletter begword veji 3456-245-24
before nondigletter begword vejid 3456-245-24-145
before nondigletter begword vejj 3456-245-245
before nondigletter begword vejja 3456-245-245-1
before nondigletter begword vejje 3456-245-245-15
before nondigletter begword vejji 3456-245-245-24

#Part words
nocross den 12346
nocross der 23456
nocross det 2346
nocross de 1456
nocross en 126
nocross er 156
nocross et 346
nocross ge 12456
# nocross hvor 34
nocross hv 2456
nocross ig 35
nocross me 146
nocross nd 12345
nocross ne 1246
nocross or 1346
nocross re 12356
nocross sk 123456
nocross st 1356
nocross te 1256

#ve special case
noback nocross ve 3456
nofor midendword ve 3456
nofor before nondigletter begword ve 3456

# combinations to handle Danish regression rules
nocross dend 1456-12345
nocross end 15-12345
nocross gend 12456-12345
nocross gen 1245-126
nocross ger 1245-156
nocross get 1245-346
nocross hven 2456-126
nocross hver 2456-156
nocross hvet 2456-346
nocross hve 2456-15
nocross mend 146-12345
nocross men 134-126
nocross mer 134-156
nocross met 134-346
nocross nden 1345-12346
nocross nder 1345-23456
nocross ndet 1345-2346
nocross nend 1246-12345
nocross nen 1345-126
nocross ner 1345-156
nocross net 1345-346
nocross rend 12356-12345
nocross ren 1235-126
nocross rer 1235-156
nocross ret 1235-346
nocross sten 1356-126
nocross ster 1356-156
nocross stet 1356-346
nocross ste 1356-15
nocross tend 1256-12345
nocross ten 2345-126
nocross ter 2345-156
nocross tet 2345-346
nocross vend 3456-12345
nocross ven 1236-126
nocross ver 1236-156
nocross vet 1236-346


# Apparently "nocont" does not work yet.
#nocont @
#nocont .dk
