| 1 |
{- |
| 2 |
- Language/Ding/Read/Usage.hs - read usage (<[]>) annotations from strings |
| 3 |
- |
| 4 |
- Copyright 2020,2022 Einhard Leichtfuß |
| 5 |
- |
| 6 |
- This file is part of ding2tei-haskell. |
| 7 |
- |
| 8 |
- ding2tei-haskell is free software: you can redistribute it and/or modify |
| 9 |
- it under the terms of the GNU Affero General Public License as published |
| 10 |
- by the Free Software Foundation, either version 3 of the License, or |
| 11 |
- (at your option) any later version. |
| 12 |
- |
| 13 |
- ding2tei-haskell is distributed in the hope that it will be useful, |
| 14 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
- GNU Affero General Public License for more details. |
| 17 |
- |
| 18 |
- You should have received a copy of the GNU Affero General Public License |
| 19 |
- along with ding2tei-haskell. If not, see <https://www.gnu.org/licenses/>. |
| 20 |
-} |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
module Language.Ding.Read.Usage |
| 29 |
( readUsage |
| 30 |
) where |
| 31 |
|
| 32 |
import Data.NatLang.Usage |
| 33 |
|
| 34 |
-- Notes: |
| 35 |
-- * The lists below have been created with the help of |
| 36 |
-- util/results/bracketexps. |
| 37 |
-- * The meaning of the annotations (which type of annotation they are) has |
| 38 |
-- been determined by searching examples in the Ding and infering from there |
| 39 |
-- on (if not obvious). In some cases, Wikipedia or the Wiktionary were of |
| 40 |
-- help. |
| 41 |
-- * See also Data/NatLang/Usage.hs and the notes there. |
| 42 |
|
| 43 |
|
| 44 |
-- TODO: ? differentiate languages (English vs. German annotations) |
| 45 |
|
| 46 |
-- Note: Words tend to be listed in decreasing order of frequency in the Ding. |
| 47 |
|
| 48 |
-- TODO: |
| 49 |
-- - "übtr." |
| 50 |
-- - "eBr.", "eam." |
| 51 |
-- - "mainly Am." |
| 52 |
-- - "bes. Süddt." |
| 53 |
-- - "Am., auch Br." |
| 54 |
-- - "also Br." |
| 55 |
-- - "alt" |
| 56 |
-- - "pej." |
| 57 |
-- - "obs." |
| 58 |
-- - "Sprw." ~ "prov." |
| 59 |
-- - "tm" (Trademark) |
| 60 |
-- - "archaic", "dated" |
| 61 |
-- - "also fig" |
| 62 |
-- - "auch übtr." |
| 63 |
-- - "humor." |
| 64 |
-- - "Reitsport" ~ "riding" |
| 65 |
-- - generally: German vs. English form |
| 66 |
-- - "log" |
| 67 |
-- - "especially Am." |
| 68 |
-- - "academic" ~ "sci"? | register? |
| 69 |
-- - "literary" |
| 70 |
-- - ... |
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
readUsage :: String -> Usage |
| 75 |
|
| 76 |
-- Regions where German is spoken (in a particular way). |
| 77 |
-- * Sometimes expressed as the corresponding dialect. |
| 78 |
readUsage s@"Ös." = Usage Regional s |
| 79 |
readUsage s@"Schw." = Usage Regional s |
| 80 |
readUsage s@"Dt." = Usage Regional s |
| 81 |
readUsage s@"Bayr." = Usage Regional s |
| 82 |
readUsage s@"Norddt." = Usage Regional s |
| 83 |
readUsage s@"Süddt." = Usage Regional s |
| 84 |
readUsage s@"Mitteldt." = Usage Regional s |
| 85 |
readUsage s@"BW" = Usage Regional s -- Baden-Württemberg ? |
| 86 |
readUsage s@"Westdt." = Usage Regional s |
| 87 |
readUsage s@"Ostdt." = Usage Regional s |
| 88 |
readUsage s@"Mittelwestdt." = Usage Regional s |
| 89 |
readUsage s@"Nordostdt." = Usage Regional s |
| 90 |
readUsage s@"Südtirol" = Usage Regional s |
| 91 |
readUsage s@"Nordwestdt." = Usage Regional s |
| 92 |
readUsage s@"Mittelostdt." = Usage Regional s |
| 93 |
readUsage s@"Südwestdt." = Usage Regional s |
| 94 |
readUsage s@"Lie." = Usage Regional s |
| 95 |
readUsage s@"Westös." = Usage Regional s |
| 96 |
readUsage s@"Lux." = Usage Regional s |
| 97 |
readUsage s@"Berlin" = Usage Regional s |
| 98 |
readUsage s@"Tirol" = Usage Regional s |
| 99 |
readUsage s@"Wien" = Usage Regional s |
| 100 |
readUsage s@"Ostös." = Usage Regional s |
| 101 |
readUsage s@"Oberdt." = Usage Regional s |
| 102 |
readUsage s@"Westfalen" = Usage Regional s |
| 103 |
readUsage s@"Sächs." = Usage Regional s |
| 104 |
readUsage s@"Pfalz" = Usage Regional s |
| 105 |
readUsage s@"Ostmitteldt." = Usage Regional s |
| 106 |
readUsage s@"Hessen" = Usage Regional s |
| 107 |
readUsage s@"Vbg." = Usage Regional s -- Vorarlbergisch |
| 108 |
readUsage s@"Südostös." = Usage Regional s |
| 109 |
readUsage s@"Schwäb." = Usage Regional s |
| 110 |
readUsage s@"Rheinl." = Usage Regional s |
| 111 |
readUsage s@"DDR" = Usage Regional s |
| 112 |
|
| 113 |
|
| 114 |
-- Regions where English is spoken (in a particular way). |
| 115 |
-- * Sometimes expressed as the corresponding dialect. |
| 116 |
readUsage s@"Br." = Usage Regional s |
| 117 |
readUsage s@"Am." = Usage Regional s |
| 118 |
readUsage s@"Austr." = Usage Regional s |
| 119 |
readUsage s@"Sc." = Usage Regional s |
| 120 |
readUsage s@"NZ" = Usage Regional s |
| 121 |
readUsage s@"Ir." = Usage Regional s |
| 122 |
readUsage s@"Can." = Usage Regional s |
| 123 |
readUsage s@"In." = Usage Regional s |
| 124 |
readUsage s@"South Africa" = Usage Regional s |
| 125 |
readUsage s@"Welch" = Usage Regional s |
| 126 |
readUsage s@"SE Asia" = Usage Regional s |
| 127 |
readUsage s@"Northern English" = Usage Regional s |
| 128 |
readUsage s@"Northern Irish" = Usage Regional s |
| 129 |
|
| 130 |
|
| 131 |
-- Languages being neither a dialect of German nor of English. |
| 132 |
readUsage s@"French" = Usage Language s |
| 133 |
readUsage s@"Ital." = Usage Language s |
| 134 |
readUsage s@"Lat." = Usage Language s |
| 135 |
|
| 136 |
|
| 137 |
-- Times |
| 138 |
readUsage s@"archaic" = Usage Time s |
| 139 |
readUsage s@"altertümelnd" = Usage Time s -- ~archaic |
| 140 |
readUsage s@"altertümlich" = Usage Time s -- ~archaic |
| 141 |
readUsage s@"dated" = Usage Time s |
| 142 |
|
| 143 |
|
| 144 |
-- Registers (TODO: more) |
| 145 |
-- * See https://en.wikipedia.org/wiki/Register_(sociolinguistics) |
| 146 |
-- for why some of these are considered registers. |
| 147 |
-- * TODO: Consider to map to ISO 12620. |
| 148 |
readUsage s@"techn." = Usage Register s -- not a domain? |
| 149 |
readUsage s@"ugs." = Usage Register s -- ~slang |
| 150 |
readUsage s@"coll." = Usage Register s -- ~slang |
| 151 |
readUsage s@"geh." = Usage Register s -- ? ~formal |
| 152 |
readUsage s@"slang" = Usage Register s |
| 153 |
readUsage s@"formal" = Usage Register s |
| 154 |
readUsage s@"humor." = Usage Register s -- ? |
| 155 |
readUsage s@"vulg." = Usage Register s |
| 156 |
readUsage s@"iron." = Usage Register s |
| 157 |
readUsage s@"fachspr." = Usage Register s -- ~ "sci." ? |
| 158 |
readUsage s@"euphem." = Usage Register s -- ? |
| 159 |
readUsage s@"dialect" = Usage Register s |
| 160 |
readUsage s@"literary" = Usage Register s -- ~ "poet." |
| 161 |
|
| 162 |
|
| 163 |
-- Styles (TODO: more) |
| 164 |
readUsage s@"fig." = Usage Style s |
| 165 |
|
| 166 |
|
| 167 |
-- Preferences (none; TODO) |
| 168 |
-- * TEI Guidelines: "preference level (‘chiefly’, ‘usually’, etc.)" |
| 169 |
-- * TEI Lex-0: -> frequency: ex.: rare, occas. |
| 170 |
--readUsage s@... = Usage Preference s |
| 171 |
|
| 172 |
|
| 173 |
-- Acceptabilities (none) |
| 174 |
-- * No further description in the TEI Guidelines. |
| 175 |
--readUsage s@... = Usage Acceptability s |
| 176 |
|
| 177 |
|
| 178 |
-- @type="textType", as in TEI Lex-0. Currently considered a hint. |
| 179 |
readUsage s@"jur." = Usage Hint s -- not a domain? |
| 180 |
readUsage s@"adm." = Usage Hint s -- not a domain? |
| 181 |
readUsage s@"poet." = Usage Hint s -- not a register?; ~ "literary" |
| 182 |
|
| 183 |
|
| 184 |
-- Domains: |
| 185 |
readUsage s@"ornith." = Usage Domain s -- the most frequent (!) |
| 186 |
readUsage s@"med." = Usage Domain s |
| 187 |
readUsage s@"chem." = Usage Domain s |
| 188 |
readUsage s@"geogr." = Usage Domain s |
| 189 |
readUsage s@"bot." = Usage Domain s |
| 190 |
readUsage s@"zool." = Usage Domain s |
| 191 |
readUsage s@"comp." = Usage Domain s |
| 192 |
readUsage s@"fin." = Usage Domain s |
| 193 |
readUsage s@"electr." = Usage Domain s |
| 194 |
readUsage s@"cook." = Usage Domain s |
| 195 |
readUsage s@"econ." = Usage Domain s |
| 196 |
readUsage s@"min." = Usage Domain s |
| 197 |
readUsage s@"constr." = Usage Domain s |
| 198 |
readUsage s@"auto" = Usage Domain s |
| 199 |
readUsage s@"mil." = Usage Domain s |
| 200 |
readUsage s@"pol." = Usage Domain s |
| 201 |
readUsage s@"anat." = Usage Domain s |
| 202 |
readUsage s@"mach." = Usage Domain s |
| 203 |
readUsage s@"sport" = Usage Domain s |
| 204 |
readUsage s@"soc." = Usage Domain s |
| 205 |
readUsage s@"mus." = Usage Domain s |
| 206 |
readUsage s@"textil." = Usage Domain s |
| 207 |
readUsage s@"geol." = Usage Domain s |
| 208 |
readUsage s@"math." = Usage Domain s |
| 209 |
readUsage s@"agr." = Usage Domain s |
| 210 |
readUsage s@"hist." = Usage Domain s |
| 211 |
readUsage s@"phys." = Usage Domain s |
| 212 |
readUsage s@"relig." = Usage Domain s |
| 213 |
readUsage s@"biol." = Usage Domain s |
| 214 |
readUsage s@"naut." = Usage Domain s |
| 215 |
readUsage s@"aviat." = Usage Domain s |
| 216 |
readUsage s@"ling." = Usage Domain s |
| 217 |
readUsage s@"envir." = Usage Domain s |
| 218 |
readUsage s@"telco." = Usage Domain s |
| 219 |
readUsage s@"lit." = Usage Domain s -- "literature", not "literally" |
| 220 |
readUsage s@"psych." = Usage Domain s |
| 221 |
readUsage s@"biochem." = Usage Domain s |
| 222 |
readUsage s@"art" = Usage Domain s |
| 223 |
readUsage s@"school" = Usage Domain s |
| 224 |
readUsage s@"meteo." = Usage Domain s |
| 225 |
readUsage s@"transp." = Usage Domain s |
| 226 |
readUsage s@"arch." = Usage Domain s -- "architecture" |
| 227 |
readUsage s@"astron." = Usage Domain s |
| 228 |
readUsage s@"print" = Usage Domain s |
| 229 |
readUsage s@"pharm." = Usage Domain s |
| 230 |
readUsage s@"stud." = Usage Domain s |
| 231 |
readUsage s@"phil." = Usage Domain s |
| 232 |
readUsage s@"statist." = Usage Domain s |
| 233 |
readUsage s@"photo." = Usage Domain s |
| 234 |
readUsage s@"astrol." = Usage Domain s |
| 235 |
readUsage s@"phot." = Usage Domain s |
| 236 |
readUsage s@"theat." = Usage Domain s |
| 237 |
readUsage s@"mech." = Usage Domain s |
| 238 |
readUsage s@"laser." = Usage Domain s |
| 239 |
readUsage s@"insur." = Usage Domain s |
| 240 |
|
| 241 |
-- does not really fit the common syntax: |
| 242 |
readUsage s@"Beleuchtungstechnik" = Usage Domain s |
| 243 |
|
| 244 |
readUsage s@"vetmed." = Usage Domain s |
| 245 |
readUsage s@"TV" = Usage Domain s |
| 246 |
readUsage s@"riding" = Usage Domain s |
| 247 |
readUsage s@"Reitsport" = Usage Domain s |
| 248 |
readUsage s@"Radsport" = Usage Domain s |
| 249 |
readUsage s@"cycling" = Usage Domain s |
| 250 |
readUsage s@"archeol." = Usage Domain s -- different from "arch." |
| 251 |
|
| 252 |
|
| 253 |
-- Default catchall |
| 254 |
readUsage s = Usage Hint s |
| 255 |
|
| 256 |
|
| 257 |
-- vi: ft=haskell ts=2 sw=2 et |