Grammalecte  Hex Artifact Content

Artifact 112cceef9c51c0407397e6ff92106d802466ae310604eecb6ccccf5766261c5d:

  • File graphspell/char_player.py — part of check-in [a85f64f6f8] at 2019-05-10 20:52:12 on branch trunk — [graphspell][core][fr] code cleaning (pylint) (user: olr size: 11111)

0000: 22 22 22 0a 4c 69 73 74 20 6f 66 20 73 69 6d 69  """.List of simi
0010: 6c 61 72 20 63 68 61 72 73 0a 75 73 65 66 75 6c  lar chars.useful
0020: 20 66 6f 72 20 73 75 67 67 65 73 74 69 6f 6e 20   for suggestion 
0030: 6d 65 63 68 61 6e 69 73 6d 0a 22 22 22 0a 0a 69  mechanism."""..i
0040: 6d 70 6f 72 74 20 72 65 0a 69 6d 70 6f 72 74 20  mport re.import 
0050: 75 6e 69 63 6f 64 65 64 61 74 61 0a 0a 0a 5f 78  unicodedata..._x
0060: 54 72 61 6e 73 43 68 61 72 73 46 6f 72 53 70 65  TransCharsForSpe
0070: 6c 6c 69 6e 67 20 3d 20 73 74 72 2e 6d 61 6b 65  lling = str.make
0080: 74 72 61 6e 73 28 7b 0a 20 20 20 20 27 c5 bf 27  trans({.    '..'
0090: 3a 20 27 73 27 2c 20 20 27 ef ac 83 27 3a 20 27  : 's',  '...': '
00a0: 66 66 69 27 2c 20 20 27 ef ac 84 27 3a 20 27 66  ffi',  '...': 'f
00b0: 66 6c 27 2c 20 20 27 ef ac 80 27 3a 20 27 66 66  fl',  '...': 'ff
00c0: 27 2c 20 20 27 ef ac 85 27 3a 20 27 66 74 27 2c  ',  '...': 'ft',
00d0: 20 20 27 ef ac 81 27 3a 20 27 66 69 27 2c 20 20    '...': 'fi',  
00e0: 27 ef ac 82 27 3a 20 27 66 6c 27 2c 20 20 27 ef  '...': 'fl',  '.
00f0: ac 86 27 3a 20 27 73 74 27 0a 7d 29 0a 0a 64 65  ..': 'st'.})..de
0100: 66 20 73 70 65 6c 6c 69 6e 67 4e 6f 72 6d 61 6c  f spellingNormal
0110: 69 7a 61 74 69 6f 6e 20 28 73 57 6f 72 64 29 3a  ization (sWord):
0120: 0a 20 20 20 20 22 6e 6f 6d 61 6c 69 7a 61 74 69  .    "nomalizati
0130: 6f 6e 20 4e 46 43 20 61 6e 64 20 72 65 6d 6f 76  on NFC and remov
0140: 69 6e 67 20 6c 69 67 61 74 75 72 65 73 22 0a 20  ing ligatures". 
0150: 20 20 20 72 65 74 75 72 6e 20 75 6e 69 63 6f 64     return unicod
0160: 65 64 61 74 61 2e 6e 6f 72 6d 61 6c 69 7a 65 28  edata.normalize(
0170: 22 4e 46 43 22 2c 20 73 57 6f 72 64 2e 74 72 61  "NFC", sWord.tra
0180: 6e 73 6c 61 74 65 28 5f 78 54 72 61 6e 73 43 68  nslate(_xTransCh
0190: 61 72 73 46 6f 72 53 70 65 6c 6c 69 6e 67 29 29  arsForSpelling))
01a0: 0a 0a 0a 5f 78 54 72 61 6e 73 43 68 61 72 73 46  ..._xTransCharsF
01b0: 6f 72 53 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e  orSimplification
01c0: 20 3d 20 73 74 72 2e 6d 61 6b 65 74 72 61 6e 73   = str.maketrans
01d0: 28 7b 0a 20 20 20 20 27 c3 a0 27 3a 20 27 61 27  ({.    '..': 'a'
01e0: 2c 20 20 27 c3 a9 27 3a 20 27 65 27 2c 20 20 27  ,  '..': 'e',  '
01f0: c3 ae 27 3a 20 27 69 27 2c 20 20 27 c3 b4 27 3a  ..': 'i',  '..':
0200: 20 27 6f 27 2c 20 20 27 c3 bb 27 3a 20 27 75 27   'o',  '..': 'u'
0210: 2c 20 20 27 c3 bf 27 3a 20 27 69 27 2c 20 20 22  ,  '..': 'i',  "
0220: 79 22 3a 20 22 69 22 2c 0a 20 20 20 20 27 c3 a2  y": "i",.    '..
0230: 27 3a 20 27 61 27 2c 20 20 27 c3 a8 27 3a 20 27  ': 'a',  '..': '
0240: 65 27 2c 20 20 27 c3 af 27 3a 20 27 69 27 2c 20  e',  '..': 'i', 
0250: 20 27 c3 b6 27 3a 20 27 6f 27 2c 20 20 27 c3 b9   '..': 'o',  '..
0260: 27 3a 20 27 75 27 2c 20 20 27 c5 b7 27 3a 20 27  ': 'u',  '..': '
0270: 69 27 2c 0a 20 20 20 20 27 c3 a4 27 3a 20 27 61  i',.    '..': 'a
0280: 27 2c 20 20 27 c3 aa 27 3a 20 27 65 27 2c 20 20  ',  '..': 'e',  
0290: 27 c3 ad 27 3a 20 27 69 27 2c 20 20 27 c3 b3 27  '..': 'i',  '..'
02a0: 3a 20 27 6f 27 2c 20 20 27 c3 bc 27 3a 20 27 75  : 'o',  '..': 'u
02b0: 27 2c 20 20 27 c3 bd 27 3a 20 27 69 27 2c 0a 20  ',  '..': 'i',. 
02c0: 20 20 20 27 c3 a1 27 3a 20 27 61 27 2c 20 20 27     '..': 'a',  '
02d0: c3 ab 27 3a 20 27 65 27 2c 20 20 27 c3 ac 27 3a  ..': 'e',  '..':
02e0: 20 27 69 27 2c 20 20 27 c3 b2 27 3a 20 27 6f 27   'i',  '..': 'o'
02f0: 2c 20 20 27 c3 ba 27 3a 20 27 75 27 2c 20 20 27  ,  '..': 'u',  '
0300: e1 bb b3 27 3a 20 27 69 27 2c 0a 20 20 20 20 27  ...': 'i',.    '
0310: c4 81 27 3a 20 27 61 27 2c 20 20 27 c4 93 27 3a  ..': 'a',  '..':
0320: 20 27 65 27 2c 20 20 27 c4 ab 27 3a 20 27 69 27   'e',  '..': 'i'
0330: 2c 20 20 27 c5 8d 27 3a 20 27 6f 27 2c 20 20 27  ,  '..': 'o',  '
0340: c5 ab 27 3a 20 27 75 27 2c 20 20 27 c8 b3 27 3a  ..': 'u',  '..':
0350: 20 27 69 27 2c 0a 20 20 20 20 27 c3 a7 27 3a 20   'i',.    '..': 
0360: 27 63 27 2c 20 20 27 c3 b1 27 3a 20 27 6e 27 2c  'c',  '..': 'n',
0370: 20 20 27 6b 27 3a 20 27 71 27 2c 20 20 27 77 27    'k': 'q',  'w'
0380: 3a 20 27 76 27 2c 0a 20 20 20 20 27 c5 93 27 3a  : 'v',.    '..':
0390: 20 27 6f 65 27 2c 20 20 27 c3 a6 27 3a 20 27 61   'oe',  '..': 'a
03a0: 65 27 2c 0a 20 20 20 20 27 c5 bf 27 3a 20 27 73  e',.    '..': 's
03b0: 27 2c 20 20 27 ef ac 83 27 3a 20 27 66 66 69 27  ',  '...': 'ffi'
03c0: 2c 20 20 27 ef ac 84 27 3a 20 27 66 66 6c 27 2c  ,  '...': 'ffl',
03d0: 20 20 27 ef ac 80 27 3a 20 27 66 66 27 2c 20 20    '...': 'ff',  
03e0: 27 ef ac 85 27 3a 20 27 66 74 27 2c 20 20 27 ef  '...': 'ft',  '.
03f0: ac 81 27 3a 20 27 66 69 27 2c 20 20 27 ef ac 82  ..': 'fi',  '...
0400: 27 3a 20 27 66 6c 27 2c 20 20 27 ef ac 86 27 3a  ': 'fl',  '...':
0410: 20 27 73 74 27 2c 0a 20 20 20 20 22 e2 81 b0 22   'st',.    "..."
0420: 3a 20 22 30 22 2c 20 22 c2 b9 22 3a 20 22 31 22  : "0", "..": "1"
0430: 2c 20 22 c2 b2 22 3a 20 22 32 22 2c 20 22 c2 b3  , "..": "2", "..
0440: 22 3a 20 22 33 22 2c 20 22 e2 81 b4 22 3a 20 22  ": "3", "...": "
0450: 34 22 2c 20 22 e2 81 b5 22 3a 20 22 35 22 2c 20  4", "...": "5", 
0460: 22 e2 81 b6 22 3a 20 22 36 22 2c 20 22 e2 81 b7  "...": "6", "...
0470: 22 3a 20 22 37 22 2c 20 22 e2 81 b8 22 3a 20 22  ": "7", "...": "
0480: 38 22 2c 20 22 e2 81 b9 22 3a 20 22 39 22 0a 7d  8", "...": "9".}
0490: 29 0a 0a 64 65 66 20 73 69 6d 70 6c 69 66 79 57  )..def simplifyW
04a0: 6f 72 64 20 28 73 57 6f 72 64 29 3a 0a 20 20 20  ord (sWord):.   
04b0: 20 22 77 6f 72 64 20 73 69 6d 70 6c 69 63 61 74   "word simplicat
04c0: 69 6f 6e 20 62 65 66 6f 72 65 20 63 61 6c 63 75  ion before calcu
04d0: 6c 61 74 69 6e 67 20 64 69 73 74 61 6e 63 65 20  lating distance 
04e0: 62 65 74 77 65 65 6e 20 77 6f 72 64 73 22 0a 20  between words". 
04f0: 20 20 20 73 57 6f 72 64 20 3d 20 73 57 6f 72 64     sWord = sWord
0500: 2e 6c 6f 77 65 72 28 29 2e 74 72 61 6e 73 6c 61  .lower().transla
0510: 74 65 28 5f 78 54 72 61 6e 73 43 68 61 72 73 46  te(_xTransCharsF
0520: 6f 72 53 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e  orSimplification
0530: 29 0a 20 20 20 20 73 4e 65 77 57 6f 72 64 20 3d  ).    sNewWord =
0540: 20 22 22 0a 20 20 20 20 66 6f 72 20 69 2c 20 63   "".    for i, c
0550: 20 69 6e 20 65 6e 75 6d 65 72 61 74 65 28 73 57   in enumerate(sW
0560: 6f 72 64 2c 20 31 29 3a 0a 20 20 20 20 20 20 20  ord, 1):.       
0570: 20 69 66 20 63 20 3d 3d 20 27 65 27 20 6f 72 20   if c == 'e' or 
0580: 63 20 21 3d 20 73 57 6f 72 64 5b 69 3a 69 2b 31  c != sWord[i:i+1
0590: 5d 3a 20 20 23 20 65 78 63 65 70 74 69 6f 6e 20  ]:  # exception 
05a0: 66 6f 72 20 3c 65 3e 20 74 6f 20 61 76 6f 69 64  for <e> to avoid
05b0: 20 63 6f 6e 66 75 73 69 6f 6e 20 62 65 74 77 65   confusion betwe
05c0: 65 6e 20 63 72 c3 a9 65 20 2f 20 63 72 c3 a9 61  en cr..e / cr..a
05d0: 69 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 4e  i.            sN
05e0: 65 77 57 6f 72 64 20 2b 3d 20 63 0a 20 20 20 20  ewWord += c.    
05f0: 72 65 74 75 72 6e 20 73 4e 65 77 57 6f 72 64 2e  return sNewWord.
0600: 72 65 70 6c 61 63 65 28 22 65 61 75 22 2c 20 22  replace("eau", "
0610: 6f 22 29 2e 72 65 70 6c 61 63 65 28 22 61 75 22  o").replace("au"
0620: 2c 20 22 6f 22 29 2e 72 65 70 6c 61 63 65 28 22  , "o").replace("
0630: 61 69 22 2c 20 22 e1 ba bd 22 29 2e 72 65 70 6c  ai", "...").repl
0640: 61 63 65 28 22 65 69 22 2c 20 22 e1 ba bd 22 29  ace("ei", "...")
0650: 2e 72 65 70 6c 61 63 65 28 22 70 68 22 2c 20 22  .replace("ph", "
0660: 66 22 29 0a 0a 0a 5f 78 54 72 61 6e 73 4e 75 6d  f")..._xTransNum
0670: 62 65 72 73 54 6f 45 78 70 6f 6e 65 6e 74 20 3d  bersToExponent =
0680: 20 73 74 72 2e 6d 61 6b 65 74 72 61 6e 73 28 7b   str.maketrans({
0690: 0a 20 20 20 20 22 30 22 3a 20 22 e2 81 b0 22 2c  .    "0": "...",
06a0: 20 22 31 22 3a 20 22 c2 b9 22 2c 20 22 32 22 3a   "1": "..", "2":
06b0: 20 22 c2 b2 22 2c 20 22 33 22 3a 20 22 c2 b3 22   "..", "3": ".."
06c0: 2c 20 22 34 22 3a 20 22 e2 81 b4 22 2c 20 22 35  , "4": "...", "5
06d0: 22 3a 20 22 e2 81 b5 22 2c 20 22 36 22 3a 20 22  ": "...", "6": "
06e0: e2 81 b6 22 2c 20 22 37 22 3a 20 22 e2 81 b7 22  ...", "7": "..."
06f0: 2c 20 22 38 22 3a 20 22 e2 81 b8 22 2c 20 22 39  , "8": "...", "9
0700: 22 3a 20 22 e2 81 b9 22 0a 7d 29 0a 0a 64 65 66  ": "...".})..def
0710: 20 6e 75 6d 62 65 72 73 54 6f 45 78 70 6f 6e 65   numbersToExpone
0720: 6e 74 20 28 73 57 6f 72 64 29 3a 0a 20 20 20 20  nt (sWord):.    
0730: 22 63 6f 6e 76 65 72 74 20 6e 75 6d 65 72 61 6c  "convert numeral
0740: 20 63 68 61 72 73 20 74 6f 20 65 78 70 6f 6e 61   chars to expona
0750: 6e 74 20 63 68 61 72 73 22 0a 20 20 20 20 72 65  nt chars".    re
0760: 74 75 72 6e 20 73 57 6f 72 64 2e 74 72 61 6e 73  turn sWord.trans
0770: 6c 61 74 65 28 5f 78 54 72 61 6e 73 4e 75 6d 62  late(_xTransNumb
0780: 65 72 73 54 6f 45 78 70 6f 6e 65 6e 74 29 0a 0a  ersToExponent)..
0790: 0a 61 56 6f 77 65 6c 20 3d 20 73 65 74 28 22 61  .aVowel = set("a
07a0: c3 a1 c3 a0 c3 a2 c3 a4 c4 81 65 c3 a9 c3 a8 c3  ..........e.....
07b0: aa c3 ab c4 93 69 c3 ad c3 ac c3 ae c3 af c4 ab  .....i..........
07c0: 6f c3 b3 c3 b2 c3 b4 c3 b6 c5 8d 75 c3 ba c3 b9  o..........u....
07d0: c3 bb c3 bc c5 ab 79 c3 bd e1 bb b3 c5 b7 c3 bf  ......y.........
07e0: c8 b3 c5 93 c3 a6 41 c3 81 c3 80 c3 82 c3 84 c4  ......A.........
07f0: 80 45 c3 89 c3 88 c3 8a c3 8b c4 92 49 c3 8d c3  .E..........I...
0800: 8c c3 8e c3 8f c4 aa 4f c3 93 c3 92 c3 94 c3 96  .......O........
0810: c5 8c 55 c3 9a c3 99 c3 9b c3 9c c5 aa 59 c3 9d  ..U..........Y..
0820: e1 bb b2 c5 b6 c5 b8 c8 b2 c5 92 c3 86 22 29 0a  .............").
0830: 61 43 6f 6e 73 6f 6e 61 6e 74 20 3d 20 73 65 74  aConsonant = set
0840: 28 22 62 63 c3 a7 64 66 67 68 6a 6b 6c 6d 6e c3  ("bc..dfghjklmn.
0850: b1 70 71 72 73 74 76 77 78 7a 42 43 c3 87 44 46  .pqrstvwxzBC..DF
0860: 47 48 4a 4b 4c 4d 4e c3 91 50 51 52 53 54 56 57  GHJKLMN..PQRSTVW
0870: 58 5a 22 29 0a 61 44 6f 75 62 6c 65 20 3d 20 73  XZ").aDouble = s
0880: 65 74 28 22 62 63 64 66 6a 6b 6c 6d 6e 70 72 73  et("bcdfjklmnprs
0890: 74 7a 42 43 44 46 4a 4b 4c 4d 4e 50 52 53 54 5a  tzBCDFJKLMNPRSTZ
08a0: 22 29 20 20 23 20 6c 65 74 74 65 72 73 20 74 68  ")  # letters th
08b0: 61 74 20 6d 61 79 20 62 65 20 75 73 65 64 20 74  at may be used t
08c0: 77 69 63 65 20 73 75 63 63 65 73 73 69 76 65 6c  wice successivel
08d0: 79 0a 0a 0a 23 20 53 69 6d 69 6c 61 72 20 63 68  y...# Similar ch
08e0: 61 72 73 0a 0a 64 31 74 6f 31 20 3d 20 7b 0a 20  ars..d1to1 = {. 
08f0: 20 20 20 22 31 22 3a 20 22 6c 69 c3 ae 4c 49 c3     "1": "li..LI.
0900: 8e 22 2c 0a 20 20 20 20 22 32 22 3a 20 22 7a 5a  .",.    "2": "zZ
0910: 22 2c 0a 20 20 20 20 22 33 22 3a 20 22 65 c3 a9  ",.    "3": "e..
0920: c3 a8 c3 aa 45 c3 89 c3 88 c3 8a 22 2c 0a 20 20  ....E......",.  
0930: 20 20 22 34 22 3a 20 22 61 c3 a0 c3 a2 41 c3 80    "4": "a....A..
0940: c3 82 22 2c 0a 20 20 20 20 22 35 22 3a 20 22 73  ..",.    "5": "s
0950: 67 53 47 22 2c 0a 20 20 20 20 22 36 22 3a 20 22  gSG",.    "6": "
0960: 62 64 67 42 44 47 22 2c 0a 20 20 20 20 22 37 22  bdgBDG",.    "7"
0970: 3a 20 22 6c 74 4c 54 22 2c 0a 20 20 20 20 22 38  : "ltLT",.    "8
0980: 22 3a 20 22 62 42 22 2c 0a 20 20 20 20 22 39 22  ": "bB",.    "9"
0990: 3a 20 22 67 62 64 47 42 44 22 2c 0a 20 20 20 20  : "gbdGBD",.    
09a0: 22 30 22 3a 20 22 6f c3 b4 4f c3 94 22 2c 0a 0a  "0": "o..O..",..
09b0: 20 20 20 20 22 61 22 3a 20 22 61 41 c3 a0 c3 80      "a": "aA....
09c0: c3 a2 c3 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80  ................
09d0: c3 a6 c3 86 22 2c 0a 20 20 20 20 22 41 22 3a 20  ....",.    "A": 
09e0: 22 41 61 c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3  "Aa.............
09f0: 84 c3 a4 c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20  ...........",.  
0a00: 20 20 22 c3 a0 22 3a 20 22 61 41 c3 a0 c3 80 c3    "..": "aA.....
0a10: a2 c3 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3  ................
0a20: a6 c3 86 22 2c 0a 20 20 20 20 22 c3 80 22 3a 20  ...",.    "..": 
0a30: 22 41 61 c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3  "Aa.............
0a40: 84 c3 a4 c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20  ...........",.  
0a50: 20 20 22 c3 a2 22 3a 20 22 61 41 c3 a0 c3 80 c3    "..": "aA.....
0a60: a2 c3 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3  ................
0a70: a6 c3 86 22 2c 0a 20 20 20 20 22 c3 82 22 3a 20  ...",.    "..": 
0a80: 22 41 61 c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3  "Aa.............
0a90: 84 c3 a4 c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20  ...........",.  
0aa0: 20 20 22 c3 a1 22 3a 20 22 61 41 c3 a0 c3 80 c3    "..": "aA.....
0ab0: a2 c3 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3  ................
0ac0: a6 c3 86 22 2c 0a 20 20 20 20 22 c3 81 22 3a 20  ...",.    "..": 
0ad0: 22 41 61 c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3  "Aa.............
0ae0: 84 c3 a4 c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20  ...........",.  
0af0: 20 20 22 c3 a4 22 3a 20 22 61 41 c3 a0 c3 80 c3    "..": "aA.....
0b00: a2 c3 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3  ................
0b10: a6 c3 86 22 2c 0a 20 20 20 20 22 c3 84 22 3a 20  ...",.    "..": 
0b20: 22 41 61 c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3  "Aa.............
0b30: 84 c3 a4 c4 80 c4 81 c3 86 c3 a6 22 2c 0a 0a 20  ...........",.. 
0b40: 20 20 20 22 c3 a6 22 3a 20 22 c3 a6 c3 86 c3 a9     "..": "......
0b50: c3 89 61 41 22 2c 0a 20 20 20 20 22 c3 86 22 3a  ..aA",.    "..":
0b60: 20 22 c3 86 c3 a6 c3 89 c3 a9 41 61 22 2c 0a 0a   "........Aa",..
0b70: 20 20 20 20 22 62 22 3a 20 22 62 42 22 2c 0a 20      "b": "bB",. 
0b80: 20 20 20 22 42 22 3a 20 22 42 62 22 2c 0a 0a 20     "B": "Bb",.. 
0b90: 20 20 20 22 63 22 3a 20 22 63 43 c3 a7 c3 87 73     "c": "cC....s
0ba0: 53 6b 4b 71 51 c5 9b c5 9a c5 9d c5 9c 22 2c 0a  SkKqQ........",.
0bb0: 20 20 20 20 22 43 22 3a 20 22 43 63 c3 87 c3 a7      "C": "Cc....
0bc0: 53 73 4b 6b 51 71 c5 9a c5 9b c5 9c c5 9d 22 2c  SsKkQq........",
0bd0: 0a 20 20 20 20 22 c3 a7 22 3a 20 22 63 43 c3 a7  .    "..": "cC..
0be0: c3 87 73 53 6b 4b 71 51 c5 9b c5 9a c5 9d c5 9c  ..sSkKqQ........
0bf0: 22 2c 0a 20 20 20 20 22 c3 87 22 3a 20 22 43 63  ",.    "..": "Cc
0c00: c3 87 c3 a7 53 73 4b 6b 51 71 c5 9a c5 9b c5 9c  ....SsKkQq......
0c10: c5 9d 22 2c 0a 0a 20 20 20 20 22 64 22 3a 20 22  ..",..    "d": "
0c20: 64 44 c3 b0 c3 90 22 2c 0a 20 20 20 20 22 44 22  dD....",.    "D"
0c30: 3a 20 22 44 64 c3 90 c3 b0 22 2c 0a 0a 20 20 20  : "Dd....",..   
0c40: 20 22 65 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3   "e": "eE.......
0c50: 88 c3 aa c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5  ................
0c60: 92 22 2c 0a 20 20 20 20 22 45 22 3a 20 22 45 65  .",.    "E": "Ee
0c70: c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab  ................
0c80: c4 92 c4 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22  ........",.    "
0c90: c3 a9 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88  ..": "eE........
0ca0: c3 aa c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92  ................
0cb0: 22 2c 0a 20 20 20 20 22 c3 89 22 3a 20 22 45 65  ",.    "..": "Ee
0cc0: c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab  ................
0cd0: c4 92 c4 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22  ........",.    "
0ce0: c3 aa 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88  ..": "eE........
0cf0: c3 aa c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92  ................
0d00: 22 2c 0a 20 20 20 20 22 c3 8a 22 3a 20 22 45 65  ",.    "..": "Ee
0d10: c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab  ................
0d20: c4 92 c4 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22  ........",.    "
0d30: c3 a8 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88  ..": "eE........
0d40: c3 aa c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92  ................
0d50: 22 2c 0a 20 20 20 20 22 c3 88 22 3a 20 22 45 65  ",.    "..": "Ee
0d60: c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab  ................
0d70: c4 92 c4 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22  ........",.    "
0d80: c3 ab 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88  ..": "eE........
0d90: c3 aa c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92  ................
0da0: 22 2c 0a 20 20 20 20 22 c3 8b 22 3a 20 22 45 65  ",.    "..": "Ee
0db0: c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab  ................
0dc0: c4 92 c4 93 c5 92 c5 93 22 2c 0a 0a 20 20 20 20  ........",..    
0dd0: 22 66 22 3a 20 22 66 46 22 2c 0a 20 20 20 20 22  "f": "fF",.    "
0de0: 46 22 3a 20 22 46 66 22 2c 0a 0a 20 20 20 20 22  F": "Ff",..    "
0df0: 67 22 3a 20 22 67 47 6a 4a c4 b5 c4 b4 22 2c 0a  g": "gGjJ....",.
0e00: 20 20 20 20 22 47 22 3a 20 22 47 67 4a 6a c4 b4      "G": "GgJj..
0e10: c4 b5 22 2c 0a 0a 20 20 20 20 22 68 22 3a 20 22  ..",..    "h": "
0e20: 68 48 22 2c 0a 20 20 20 20 22 48 22 3a 20 22 48  hH",.    "H": "H
0e30: 68 22 2c 0a 0a 20 20 20 20 22 69 22 3a 20 22 69  h",..    "i": "i
0e40: 49 c3 ae c3 8e c3 af c3 8f 79 59 c3 ad c3 8d c3  I........yY.....
0e50: ac c3 8c c4 ab c4 aa c3 bf c5 b8 22 2c 0a 20 20  ...........",.  
0e60: 20 20 22 49 22 3a 20 22 49 69 c3 8e c3 ae c3 8f    "I": "Ii......
0e70: c3 af 59 79 c3 8d c3 ad c3 8c c3 ac c4 aa c4 ab  ..Yy............
0e80: c5 b8 c3 bf 22 2c 0a 20 20 20 20 22 c3 ae 22 3a  ....",.    "..":
0e90: 20 22 69 49 c3 ae c3 8e c3 af c3 8f 79 59 c3 ad   "iI........yY..
0ea0: c3 8d c3 ac c3 8c c4 ab c4 aa c3 bf c5 b8 22 2c  ..............",
0eb0: 0a 20 20 20 20 22 c3 8e 22 3a 20 22 49 69 c3 8e  .    "..": "Ii..
0ec0: c3 ae c3 8f c3 af 59 79 c3 8d c3 ad c3 8c c3 ac  ......Yy........
0ed0: c4 aa c4 ab c5 b8 c3 bf 22 2c 0a 20 20 20 20 22  ........",.    "
0ee0: c3 af 22 3a 20 22 69 49 c3 ae c3 8e c3 af c3 8f  ..": "iI........
0ef0: 79 59 c3 ad c3 8d c3 ac c3 8c c4 ab c4 aa c3 bf  yY..............
0f00: c5 b8 22 2c 0a 20 20 20 20 22 c3 8f 22 3a 20 22  ..",.    "..": "
0f10: 49 69 c3 8e c3 ae c3 8f c3 af 59 79 c3 8d c3 ad  Ii........Yy....
0f20: c3 8c c3 ac c4 aa c4 ab c5 b8 c3 bf 22 2c 0a 20  ............",. 
0f30: 20 20 20 22 c3 ad 22 3a 20 22 69 49 c3 ae c3 8e     "..": "iI....
0f40: c3 af c3 8f 79 59 c3 ad c3 8d c3 ac c3 8c c4 ab  ....yY..........
0f50: c4 aa c3 bf c5 b8 22 2c 0a 20 20 20 20 22 c3 8d  ......",.    "..
0f60: 22 3a 20 22 49 69 c3 8e c3 ae c3 8f c3 af 59 79  ": "Ii........Yy
0f70: c3 8d c3 ad c3 8c c3 ac c4 aa c4 ab c5 b8 c3 bf  ................
0f80: 22 2c 0a 20 20 20 20 22 c3 ac 22 3a 20 22 69 49  ",.    "..": "iI
0f90: c3 ae c3 8e c3 af c3 8f 79 59 c3 ad c3 8d c3 ac  ........yY......
0fa0: c3 8c c4 ab c4 aa c3 bf c5 b8 22 2c 0a 20 20 20  ..........",.   
0fb0: 20 22 c3 8c 22 3a 20 22 49 69 c3 8e c3 ae c3 8f   "..": "Ii......
0fc0: c3 af 59 79 c3 8d c3 ad c3 8c c3 ac c4 aa c4 ab  ..Yy............
0fd0: c5 b8 c3 bf 22 2c 0a 0a 20 20 20 20 22 6a 22 3a  ....",..    "j":
0fe0: 20 22 6a 4a 67 47 c4 b5 c4 b4 22 2c 0a 20 20 20   "jJgG....",.   
0ff0: 20 22 4a 22 3a 20 22 4a 6a 47 67 c4 b4 c4 b5 22   "J": "JjGg...."
1000: 2c 0a 0a 20 20 20 20 22 6b 22 3a 20 22 6b 4b 63  ,..    "k": "kKc
1010: 43 71 51 22 2c 0a 20 20 20 20 22 4b 22 3a 20 22  CqQ",.    "K": "
1020: 4b 6b 43 63 51 71 22 2c 0a 0a 20 20 20 20 22 6c  KkCcQq",..    "l
1030: 22 3a 20 22 6c 4c c5 82 c5 81 22 2c 0a 20 20 20  ": "lL....",.   
1040: 20 22 4c 22 3a 20 22 4c 6c c5 81 c5 82 22 2c 0a   "L": "Ll....",.
1050: 0a 20 20 20 20 22 6d 22 3a 20 22 6d 4d e1 b8 bf  .    "m": "mM...
1060: e1 b8 be 22 2c 0a 20 20 20 20 22 4d 22 3a 20 22  ...",.    "M": "
1070: 4d 6d e1 b8 be e1 b8 bf 22 2c 0a 0a 20 20 20 20  Mm......",..    
1080: 22 6e 22 3a 20 22 6e 4e c3 b1 c3 91 c5 84 c5 83  "n": "nN........
1090: c7 b9 c7 b8 22 2c 0a 20 20 20 20 22 4e 22 3a 20  ....",.    "N": 
10a0: 22 4e 6e c3 91 c3 b1 c5 83 c5 84 c7 b8 c7 b9 22  "Nn............"
10b0: 2c 0a 0a 20 20 20 20 22 6f 22 3a 20 22 6f 4f c3  ,..    "o": "oO.
10c0: b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5  ................
10d0: 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 4f  .......",.    "O
10e0: 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3 92  ": "Oo..........
10f0: c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22 2c  ..............",
1100: 0a 20 20 20 20 22 c3 b4 22 3a 20 22 6f 4f c3 b4  .    "..": "oO..
1110: c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5 8d  ................
1120: c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3 94  ......",.    "..
1130: 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3 92  ": "Oo..........
1140: c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22 2c  ..............",
1150: 0a 20 20 20 20 22 c3 b3 22 3a 20 22 6f 4f c3 b4  .    "..": "oO..
1160: c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5 8d  ................
1170: c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3 93  ......",.    "..
1180: 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3 92  ": "Oo..........
1190: c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22 2c  ..............",
11a0: 0a 20 20 20 20 22 c3 b2 22 3a 20 22 6f 4f c3 b4  .    "..": "oO..
11b0: c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5 8d  ................
11c0: c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3 92  ......",.    "..
11d0: 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3 92  ": "Oo..........
11e0: c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22 2c  ..............",
11f0: 0a 20 20 20 20 22 c3 b6 22 3a 20 22 6f 4f c3 b4  .    "..": "oO..
1200: c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5 8d  ................
1210: c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3 96  ......",.    "..
1220: 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3 92  ": "Oo..........
1230: c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22 2c  ..............",
1240: 0a 0a 20 20 20 20 22 c5 93 22 3a 20 22 c5 93 c5  ..    "..": "...
1250: 92 6f 4f c3 b4 c3 94 65 45 c3 a9 c3 89 c3 a8 c3  .oO....eE.......
1260: 88 c3 aa c3 8a c3 ab c3 8b 22 2c 0a 20 20 20 20  .........",.    
1270: 22 c5 92 22 3a 20 22 c5 92 c5 93 4f 6f c3 94 c3  "..": "....Oo...
1280: b4 45 65 c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa c3  .Ee.............
1290: 8b c3 ab 22 2c 0a 0a 20 20 20 20 22 70 22 3a 20  ...",..    "p": 
12a0: 22 70 50 e1 b9 95 e1 b9 94 22 2c 0a 20 20 20 20  "pP......",.    
12b0: 22 50 22 3a 20 22 50 70 e1 b9 94 e1 b9 95 22 2c  "P": "Pp......",
12c0: 0a 0a 20 20 20 20 22 71 22 3a 20 22 71 51 63 43  ..    "q": "qQcC
12d0: 6b 4b 22 2c 0a 20 20 20 20 22 51 22 3a 20 22 51  kK",.    "Q": "Q
12e0: 71 43 63 4b 6b 22 2c 0a 0a 20 20 20 20 22 72 22  qCcKk",..    "r"
12f0: 3a 20 22 72 52 c5 95 c5 94 22 2c 0a 20 20 20 20  : "rR....",.    
1300: 22 52 22 3a 20 22 52 72 c5 94 c5 95 22 2c 0a 0a  "R": "Rr....",..
1310: 20 20 20 20 22 73 22 3a 20 22 73 53 63 43 c3 a7      "s": "sScC..
1320: c3 87 c5 9b c5 9a c5 9d c5 9c 22 2c 0a 20 20 20  ..........",.   
1330: 20 22 53 22 3a 20 22 53 73 43 63 c3 87 c3 a7 c5   "S": "SsCc.....
1340: 9a c5 9b c5 9c c5 9d 22 2c 0a 20 20 20 20 22 c5  .......",.    ".
1350: 9b 22 3a 20 22 73 53 63 43 c3 a7 c3 87 c5 9b c5  .": "sScC.......
1360: 9a c5 9d c5 9c 22 2c 0a 20 20 20 20 22 c5 9a 22  .....",.    ".."
1370: 3a 20 22 53 73 43 63 c3 87 c3 a7 c5 9a c5 9b c5  : "SsCc.........
1380: 9c c5 9d 22 2c 0a 20 20 20 20 22 c5 9d 22 3a 20  ...",.    "..": 
1390: 22 73 53 63 43 c3 a7 c3 87 c5 9b c5 9a c5 9d c5  "sScC...........
13a0: 9c 22 2c 0a 20 20 20 20 22 c5 9c 22 3a 20 22 53  .",.    "..": "S
13b0: 73 43 63 c3 87 c3 a7 c5 9a c5 9b c5 9c c5 9d 22  sCc............"
13c0: 2c 0a 0a 20 20 20 20 22 74 22 3a 20 22 74 54 22  ,..    "t": "tT"
13d0: 2c 0a 20 20 20 20 22 54 22 3a 20 22 54 74 22 2c  ,.    "T": "Tt",
13e0: 0a 0a 20 20 20 20 22 75 22 3a 20 22 75 55 c3 bb  ..    "u": "uU..
13f0: c3 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5 ab  ................
1400: c5 aa 22 2c 0a 20 20 20 20 22 55 22 3a 20 22 55  ..",.    "U": "U
1410: 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a c3  u...............
1420: ba c5 aa c5 ab 22 2c 0a 20 20 20 20 22 c3 bb 22  .....",.    ".."
1430: 3a 20 22 75 55 c3 bb c3 9b c3 b9 c3 99 c3 bc c3  : "uU...........
1440: 9c c3 ba c3 9a c5 ab c5 aa 22 2c 0a 20 20 20 20  .........",.    
1450: 22 c3 9b 22 3a 20 22 55 75 c3 9b c3 bb c3 99 c3  "..": "Uu.......
1460: b9 c3 9c c3 bc c3 9a c3 ba c5 aa c5 ab 22 2c 0a  .............",.
1470: 20 20 20 20 22 c3 b9 22 3a 20 22 75 55 c3 bb c3      "..": "uU...
1480: 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5 ab c5  ................
1490: aa 22 2c 0a 20 20 20 20 22 c3 99 22 3a 20 22 55  .",.    "..": "U
14a0: 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a c3  u...............
14b0: ba c5 aa c5 ab 22 2c 0a 20 20 20 20 22 c3 bc 22  .....",.    ".."
14c0: 3a 20 22 75 55 c3 bb c3 9b c3 b9 c3 99 c3 bc c3  : "uU...........
14d0: 9c c3 ba c3 9a c5 ab c5 aa 22 2c 0a 20 20 20 20  .........",.    
14e0: 22 c3 9c 22 3a 20 22 55 75 c3 9b c3 bb c3 99 c3  "..": "Uu.......
14f0: b9 c3 9c c3 bc c3 9a c3 ba c5 aa c5 ab 22 2c 0a  .............",.
1500: 20 20 20 20 22 c3 ba 22 3a 20 22 75 55 c3 bb c3      "..": "uU...
1510: 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5 ab c5  ................
1520: aa 22 2c 0a 20 20 20 20 22 c3 9a 22 3a 20 22 55  .",.    "..": "U
1530: 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a c3  u...............
1540: ba c5 aa c5 ab 22 2c 0a 0a 20 20 20 20 22 76 22  .....",..    "v"
1550: 3a 20 22 76 56 77 57 22 2c 0a 20 20 20 20 22 56  : "vVwW",.    "V
1560: 22 3a 20 22 56 76 57 77 22 2c 0a 0a 20 20 20 20  ": "VvWw",..    
1570: 22 77 22 3a 20 22 77 57 76 56 22 2c 0a 20 20 20  "w": "wWvV",.   
1580: 20 22 57 22 3a 20 22 57 77 56 76 22 2c 0a 0a 20   "W": "WwVv",.. 
1590: 20 20 20 22 78 22 3a 20 22 78 58 63 43 6b 4b 22     "x": "xXcCkK"
15a0: 2c 0a 20 20 20 20 22 58 22 3a 20 22 58 78 43 63  ,.    "X": "XxCc
15b0: 4b 6b 22 2c 0a 0a 20 20 20 20 22 79 22 3a 20 22  Kk",..    "y": "
15c0: 79 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5 b6  yYiI............
15d0: c3 bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22 2c  ..............",
15e0: 0a 20 20 20 20 22 59 22 3a 20 22 59 79 49 69 c3  .    "Y": "YyIi.
15f0: 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d c3 bd e1  ................
1600: bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 20 20 20 20  .........",.    
1610: 22 c3 bf 22 3a 20 22 79 59 69 49 c3 ae c3 8e c3  "..": "yYiI.....
1620: bf c5 b8 c5 b7 c5 b6 c3 bd c3 9d e1 bb b3 e1 bb  ................
1630: b2 c8 b3 c8 b2 22 2c 0a 20 20 20 20 22 c5 b8 22  .....",.    ".."
1640: 3a 20 22 59 79 49 69 c3 8e c3 ae c5 b8 c3 bf c5  : "YyIi.........
1650: b6 c5 b7 c3 9d c3 bd e1 bb b2 e1 bb b3 c8 b2 c8  ................
1660: b3 22 2c 0a 20 20 20 20 22 c5 b7 22 3a 20 22 79  .",.    "..": "y
1670: 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5 b6 c3  YiI.............
1680: bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22 2c 0a  .............",.
1690: 20 20 20 20 22 c5 b6 22 3a 20 22 59 79 49 69 c3      "..": "YyIi.
16a0: 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d c3 bd e1  ................
16b0: bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 20 20 20 20  .........",.    
16c0: 22 c3 bd 22 3a 20 22 79 59 69 49 c3 ae c3 8e c3  "..": "yYiI.....
16d0: bf c5 b8 c5 b7 c5 b6 c3 bd c3 9d e1 bb b3 e1 bb  ................
16e0: b2 c8 b3 c8 b2 22 2c 0a 20 20 20 20 22 c3 9d 22  .....",.    ".."
16f0: 3a 20 22 59 79 49 69 c3 8e c3 ae c5 b8 c3 bf c5  : "YyIi.........
1700: b6 c5 b7 c3 9d c3 bd e1 bb b2 e1 bb b3 c8 b2 c8  ................
1710: b3 22 2c 0a 20 20 20 20 22 e1 bb b3 22 3a 20 22  .",.    "...": "
1720: 79 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5 b6  yYiI............
1730: c3 bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22 2c  ..............",
1740: 0a 20 20 20 20 22 e1 bb b2 22 3a 20 22 59 79 49  .    "...": "YyI
1750: 69 c3 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d c3  i...............
1760: bd e1 bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 0a 20  ...........",.. 
1770: 20 20 20 22 7a 22 3a 20 22 7a 5a 73 53 e1 ba 91     "z": "zZsS...
1780: e1 ba 90 c5 ba c5 b9 22 2c 0a 20 20 20 20 22 5a  .......",.    "Z
1790: 22 3a 20 22 5a 7a 53 73 e1 ba 90 e1 ba 91 c5 b9  ": "ZzSs........
17a0: c5 ba 22 2c 0a 7d 0a 0a 64 31 74 6f 58 20 3d 20  ..",.}..d1toX = 
17b0: 7b 0a 20 20 20 20 22 c3 a6 22 3a 20 28 22 61 65  {.    "..": ("ae
17c0: 22 2c 29 2c 0a 20 20 20 20 22 c3 86 22 3a 20 28  ",),.    "..": (
17d0: 22 41 45 22 2c 29 2c 0a 20 20 20 20 22 62 22 3a  "AE",),.    "b":
17e0: 20 28 22 62 62 22 2c 29 2c 0a 20 20 20 20 22 42   ("bb",),.    "B
17f0: 22 3a 20 28 22 42 42 22 2c 29 2c 0a 20 20 20 20  ": ("BB",),.    
1800: 22 63 22 3a 20 28 22 63 63 22 2c 20 22 73 73 22  "c": ("cc", "ss"
1810: 2c 20 22 71 75 22 2c 20 22 63 68 22 29 2c 0a 20  , "qu", "ch"),. 
1820: 20 20 20 22 43 22 3a 20 28 22 43 43 22 2c 20 22     "C": ("CC", "
1830: 53 53 22 2c 20 22 51 55 22 2c 20 22 43 48 22 29  SS", "QU", "CH")
1840: 2c 0a 20 20 20 20 22 64 22 3a 20 28 22 64 64 22  ,.    "d": ("dd"
1850: 2c 29 2c 0a 20 20 20 20 22 44 22 3a 20 28 22 44  ,),.    "D": ("D
1860: 44 22 2c 29 2c 0a 20 20 20 20 22 c3 a9 22 3a 20  D",),.    "..": 
1870: 28 22 61 69 22 2c 20 22 65 69 22 29 2c 0a 20 20  ("ai", "ei"),.  
1880: 20 20 22 c3 89 22 3a 20 28 22 41 49 22 2c 20 22    "..": ("AI", "
1890: 45 49 22 29 2c 0a 20 20 20 20 22 66 22 3a 20 28  EI"),.    "f": (
18a0: 22 66 66 22 2c 20 22 70 68 22 29 2c 0a 20 20 20  "ff", "ph"),.   
18b0: 20 22 46 22 3a 20 28 22 46 46 22 2c 20 22 50 48   "F": ("FF", "PH
18c0: 22 29 2c 0a 20 20 20 20 22 67 22 3a 20 28 22 67  "),.    "g": ("g
18d0: 75 22 2c 20 22 67 65 22 2c 20 22 67 67 22 2c 20  u", "ge", "gg", 
18e0: 22 67 68 22 29 2c 0a 20 20 20 20 22 47 22 3a 20  "gh"),.    "G": 
18f0: 28 22 47 55 22 2c 20 22 47 45 22 2c 20 22 47 47  ("GU", "GE", "GG
1900: 22 2c 20 22 47 48 22 29 2c 0a 20 20 20 20 22 6a  ", "GH"),.    "j
1910: 22 3a 20 28 22 6a 6a 22 2c 20 22 64 6a 22 29 2c  ": ("jj", "dj"),
1920: 0a 20 20 20 20 22 4a 22 3a 20 28 22 4a 4a 22 2c  .    "J": ("JJ",
1930: 20 22 44 4a 22 29 2c 0a 20 20 20 20 22 6b 22 3a   "DJ"),.    "k":
1940: 20 28 22 71 75 22 2c 20 22 63 6b 22 2c 20 22 63   ("qu", "ck", "c
1950: 68 22 2c 20 22 63 75 22 2c 20 22 6b 6b 22 2c 20  h", "cu", "kk", 
1960: 22 6b 68 22 29 2c 0a 20 20 20 20 22 4b 22 3a 20  "kh"),.    "K": 
1970: 28 22 51 55 22 2c 20 22 43 4b 22 2c 20 22 43 48  ("QU", "CK", "CH
1980: 22 2c 20 22 43 55 22 2c 20 22 4b 4b 22 2c 20 22  ", "CU", "KK", "
1990: 4b 48 22 29 2c 0a 20 20 20 20 22 6c 22 3a 20 28  KH"),.    "l": (
19a0: 22 6c 6c 22 2c 29 2c 0a 20 20 20 20 22 4c 22 3a  "ll",),.    "L":
19b0: 20 28 22 4c 4c 22 2c 29 2c 0a 20 20 20 20 22 6d   ("LL",),.    "m
19c0: 22 3a 20 28 22 6d 6d 22 2c 20 22 6d 6e 22 29 2c  ": ("mm", "mn"),
19d0: 0a 20 20 20 20 22 4d 22 3a 20 28 22 4d 4d 22 2c  .    "M": ("MM",
19e0: 20 22 4d 4e 22 29 2c 0a 20 20 20 20 22 6e 22 3a   "MN"),.    "n":
19f0: 20 28 22 6e 6e 22 2c 20 22 6e 6d 22 2c 20 22 6d   ("nn", "nm", "m
1a00: 6e 22 29 2c 0a 20 20 20 20 22 4e 22 3a 20 28 22  n"),.    "N": ("
1a10: 4e 4e 22 2c 20 22 4e 4d 22 2c 20 22 4d 4e 22 29  NN", "NM", "MN")
1a20: 2c 0a 20 20 20 20 22 6f 22 3a 20 28 22 61 75 22  ,.    "o": ("au"
1a30: 2c 20 22 65 61 75 22 29 2c 0a 20 20 20 20 22 4f  , "eau"),.    "O
1a40: 22 3a 20 28 22 41 55 22 2c 20 22 45 41 55 22 29  ": ("AU", "EAU")
1a50: 2c 0a 20 20 20 20 22 c5 93 22 3a 20 28 22 6f 65  ,.    "..": ("oe
1a60: 22 2c 20 22 65 75 22 29 2c 0a 20 20 20 20 22 c5  ", "eu"),.    ".
1a70: 92 22 3a 20 28 22 4f 45 22 2c 20 22 45 55 22 29  .": ("OE", "EU")
1a80: 2c 0a 20 20 20 20 22 70 22 3a 20 28 22 70 70 22  ,.    "p": ("pp"
1a90: 2c 20 22 70 68 22 29 2c 0a 20 20 20 20 22 50 22  , "ph"),.    "P"
1aa0: 3a 20 28 22 50 50 22 2c 20 22 50 48 22 29 2c 0a  : ("PP", "PH"),.
1ab0: 20 20 20 20 22 71 22 3a 20 28 22 71 75 22 2c 20      "q": ("qu", 
1ac0: 22 63 68 22 2c 20 22 63 71 22 2c 20 22 63 6b 22  "ch", "cq", "ck"
1ad0: 2c 20 22 6b 6b 22 29 2c 0a 20 20 20 20 22 51 22  , "kk"),.    "Q"
1ae0: 3a 20 28 22 51 55 22 2c 20 22 43 48 22 2c 20 22  : ("QU", "CH", "
1af0: 43 51 22 2c 20 22 43 4b 22 2c 20 22 4b 4b 22 29  CQ", "CK", "KK")
1b00: 2c 0a 20 20 20 20 22 72 22 3a 20 28 22 72 72 22  ,.    "r": ("rr"
1b10: 2c 29 2c 0a 20 20 20 20 22 52 22 3a 20 28 22 52  ,),.    "R": ("R
1b20: 52 22 2c 29 2c 0a 20 20 20 20 22 73 22 3a 20 28  R",),.    "s": (
1b30: 22 73 73 22 2c 20 22 73 68 22 29 2c 0a 20 20 20  "ss", "sh"),.   
1b40: 20 22 53 22 3a 20 28 22 53 53 22 2c 20 22 53 48   "S": ("SS", "SH
1b50: 22 29 2c 0a 20 20 20 20 22 74 22 3a 20 28 22 74  "),.    "t": ("t
1b60: 74 22 2c 20 22 74 68 22 29 2c 0a 20 20 20 20 22  t", "th"),.    "
1b70: 54 22 3a 20 28 22 54 54 22 2c 20 22 54 48 22 29  T": ("TT", "TH")
1b80: 2c 0a 20 20 20 20 22 78 22 3a 20 28 22 63 63 22  ,.    "x": ("cc"
1b90: 2c 20 22 63 74 22 2c 20 22 78 78 22 29 2c 0a 20  , "ct", "xx"),. 
1ba0: 20 20 20 22 58 22 3a 20 28 22 43 43 22 2c 20 22     "X": ("CC", "
1bb0: 43 54 22 2c 20 22 58 58 22 29 2c 0a 20 20 20 20  CT", "XX"),.    
1bc0: 22 7a 22 3a 20 28 22 73 73 22 2c 20 22 7a 68 22  "z": ("ss", "zh"
1bd0: 29 2c 0a 20 20 20 20 22 5a 22 3a 20 28 22 53 53  ),.    "Z": ("SS
1be0: 22 2c 20 22 5a 48 22 29 2c 0a 7d 0a 0a 0a 64 65  ", "ZH"),.}...de
1bf0: 66 20 67 65 74 31 74 6f 58 52 65 70 6c 61 63 65  f get1toXReplace
1c00: 6d 65 6e 74 20 28 63 50 72 65 76 2c 20 63 43 75  ment (cPrev, cCu
1c10: 72 2c 20 63 4e 65 78 74 29 3a 0a 20 20 20 20 22  r, cNext):.    "
1c20: 72 65 74 75 72 6e 20 74 75 70 6c 65 20 6f 66 20  return tuple of 
1c30: 72 65 70 6c 61 63 65 6d 65 6e 74 73 20 66 6f 72  replacements for
1c40: 20 3c 63 43 75 72 3e 22 0a 20 20 20 20 69 66 20   <cCur>".    if 
1c50: 63 43 75 72 20 69 6e 20 61 43 6f 6e 73 6f 6e 61  cCur in aConsona
1c60: 6e 74 20 20 61 6e 64 20 20 28 63 50 72 65 76 20  nt  and  (cPrev 
1c70: 69 6e 20 61 43 6f 6e 73 6f 6e 61 6e 74 20 20 6f  in aConsonant  o
1c80: 72 20 20 63 4e 65 78 74 20 69 6e 20 61 43 6f 6e  r  cNext in aCon
1c90: 73 6f 6e 61 6e 74 29 3a 0a 20 20 20 20 20 20 20  sonant):.       
1ca0: 20 72 65 74 75 72 6e 20 28 29 0a 20 20 20 20 72   return ().    r
1cb0: 65 74 75 72 6e 20 64 31 74 6f 58 2e 67 65 74 28  eturn d1toX.get(
1cc0: 63 43 75 72 2c 20 28 29 29 0a 0a 0a 64 32 74 6f  cCur, ())...d2to
1cd0: 58 20 3d 20 7b 0a 20 20 20 20 22 61 6d 22 3a 20  X = {.    "am": 
1ce0: 28 22 61 6e 22 2c 20 22 65 6e 22 2c 20 22 65 6d  ("an", "en", "em
1cf0: 22 29 2c 0a 20 20 20 20 22 41 4d 22 3a 20 28 22  "),.    "AM": ("
1d00: 41 4e 22 2c 20 22 45 4e 22 2c 20 22 45 4d 22 29  AN", "EN", "EM")
1d10: 2c 0a 20 20 20 20 22 61 6e 22 3a 20 28 22 61 6d  ,.    "an": ("am
1d20: 22 2c 20 22 65 6e 22 2c 20 22 65 6d 22 29 2c 0a  ", "en", "em"),.
1d30: 20 20 20 20 22 41 4e 22 3a 20 28 22 41 4d 22 2c      "AN": ("AM",
1d40: 20 22 45 4e 22 2c 20 22 45 4d 22 29 2c 0a 20 20   "EN", "EM"),.  
1d50: 20 20 22 61 75 22 3a 20 28 22 65 61 75 22 2c 20    "au": ("eau", 
1d60: 22 6f 22 2c 20 22 c3 b4 22 29 2c 0a 20 20 20 20  "o", ".."),.    
1d70: 22 41 55 22 3a 20 28 22 45 41 55 22 2c 20 22 4f  "AU": ("EAU", "O
1d80: 22 2c 20 22 c3 94 22 29 2c 0a 20 20 20 20 22 65  ", ".."),.    "e
1d90: 6d 22 3a 20 28 22 61 6e 22 2c 20 22 61 6d 22 2c  m": ("an", "am",
1da0: 20 22 65 6e 22 29 2c 0a 20 20 20 20 22 45 4d 22   "en"),.    "EM"
1db0: 3a 20 28 22 41 4e 22 2c 20 22 41 4d 22 2c 20 22  : ("AN", "AM", "
1dc0: 45 4e 22 29 2c 0a 20 20 20 20 22 65 6e 22 3a 20  EN"),.    "en": 
1dd0: 28 22 61 6e 22 2c 20 22 61 6d 22 2c 20 22 65 6d  ("an", "am", "em
1de0: 22 29 2c 0a 20 20 20 20 22 45 4e 22 3a 20 28 22  "),.    "EN": ("
1df0: 41 4e 22 2c 20 22 41 4d 22 2c 20 22 45 4d 22 29  AN", "AM", "EM")
1e00: 2c 0a 20 20 20 20 22 61 65 22 3a 20 28 22 c3 a6  ,.    "ae": ("..
1e10: 22 2c 20 22 c3 a9 22 29 2c 0a 20 20 20 20 22 41  ", ".."),.    "A
1e20: 45 22 3a 20 28 22 c3 86 22 2c 20 22 c3 89 22 29  E": ("..", "..")
1e30: 2c 0a 20 20 20 20 22 61 69 22 3a 20 28 22 65 69  ,.    "ai": ("ei
1e40: 22 2c 20 22 c3 a9 22 2c 20 22 c3 a8 22 2c 20 22  ", "..", "..", "
1e50: c3 aa 22 2c 20 22 c3 ab 22 29 2c 0a 20 20 20 20  ..", ".."),.    
1e60: 22 41 49 22 3a 20 28 22 45 49 22 2c 20 22 c3 89  "AI": ("EI", "..
1e70: 22 2c 20 22 c3 88 22 2c 20 22 c3 8a 22 2c 20 22  ", "..", "..", "
1e80: c3 8b 22 29 2c 0a 20 20 20 20 22 65 69 22 3a 20  .."),.    "ei": 
1e90: 28 22 61 69 22 2c 20 22 c3 a9 22 2c 20 22 c3 a8  ("ai", "..", "..
1ea0: 22 2c 20 22 c3 aa 22 2c 20 22 c3 ab 22 29 2c 0a  ", "..", ".."),.
1eb0: 20 20 20 20 22 45 49 22 3a 20 28 22 41 49 22 2c      "EI": ("AI",
1ec0: 20 22 c3 89 22 2c 20 22 c3 88 22 2c 20 22 c3 8a   "..", "..", "..
1ed0: 22 2c 20 22 c3 8b 22 29 2c 0a 20 20 20 20 22 63  ", ".."),.    "c
1ee0: 68 22 3a 20 28 22 73 68 22 2c 20 22 63 22 2c 20  h": ("sh", "c", 
1ef0: 22 73 73 22 29 2c 0a 20 20 20 20 22 43 48 22 3a  "ss"),.    "CH":
1f00: 20 28 22 53 48 22 2c 20 22 43 22 2c 20 22 53 53   ("SH", "C", "SS
1f10: 22 29 2c 0a 20 20 20 20 22 63 74 22 3a 20 28 22  "),.    "ct": ("
1f20: 78 22 2c 20 22 63 63 22 29 2c 0a 20 20 20 20 22  x", "cc"),.    "
1f30: 43 54 22 3a 20 28 22 58 22 2c 20 22 43 43 22 29  CT": ("X", "CC")
1f40: 2c 0a 20 20 20 20 22 67 67 22 3a 20 28 22 67 75  ,.    "gg": ("gu
1f50: 22 2c 29 2c 0a 20 20 20 20 22 47 47 22 3a 20 28  ",),.    "GG": (
1f60: 22 47 55 22 2c 29 2c 0a 20 20 20 20 22 67 75 22  "GU",),.    "gu"
1f70: 3a 20 28 22 67 67 22 2c 29 2c 0a 20 20 20 20 22  : ("gg",),.    "
1f80: 47 55 22 3a 20 28 22 47 47 22 2c 29 2c 0a 20 20  GU": ("GG",),.  
1f90: 20 20 22 6f 61 22 3a 20 28 22 6f 69 22 2c 29 2c    "oa": ("oi",),
1fa0: 0a 20 20 20 20 22 4f 41 22 3a 20 28 22 4f 49 22  .    "OA": ("OI"
1fb0: 2c 29 2c 0a 20 20 20 20 22 6f 65 22 3a 20 28 22  ,),.    "oe": ("
1fc0: c5 93 22 2c 29 2c 0a 20 20 20 20 22 4f 45 22 3a  ..",),.    "OE":
1fd0: 20 28 22 c5 92 22 2c 29 2c 0a 20 20 20 20 22 6f   ("..",),.    "o
1fe0: 69 22 3a 20 28 22 6f 61 22 2c 20 22 6f 69 65 22  i": ("oa", "oie"
1ff0: 29 2c 0a 20 20 20 20 22 4f 49 22 3a 20 28 22 4f  ),.    "OI": ("O
2000: 41 22 2c 20 22 4f 49 45 22 29 2c 0a 20 20 20 20  A", "OIE"),.    
2010: 22 70 68 22 3a 20 28 22 66 22 2c 29 2c 0a 20 20  "ph": ("f",),.  
2020: 20 20 22 50 48 22 3a 20 28 22 46 22 2c 29 2c 0a    "PH": ("F",),.
2030: 20 20 20 20 22 71 75 22 3a 20 28 22 71 22 2c 20      "qu": ("q", 
2040: 22 63 71 22 2c 20 22 63 6b 22 2c 20 22 63 22 2c  "cq", "ck", "c",
2050: 20 22 6b 22 29 2c 0a 20 20 20 20 22 51 55 22 3a   "k"),.    "QU":
2060: 20 28 22 51 22 2c 20 22 43 51 22 2c 20 22 43 4b   ("Q", "CQ", "CK
2070: 22 2c 20 22 43 22 2c 20 22 4b 22 29 2c 0a 20 20  ", "C", "K"),.  
2080: 20 20 22 73 73 22 3a 20 28 22 63 22 2c 20 22 c3    "ss": ("c", ".
2090: a7 22 29 2c 0a 20 20 20 20 22 53 53 22 3a 20 28  ."),.    "SS": (
20a0: 22 43 22 2c 20 22 c3 87 22 29 2c 0a 20 20 20 20  "C", ".."),.    
20b0: 22 75 6e 22 3a 20 28 22 65 69 6e 22 2c 29 2c 0a  "un": ("ein",),.
20c0: 20 20 20 20 22 55 4e 22 3a 20 28 22 45 49 4e 22      "UN": ("EIN"
20d0: 2c 29 2c 0a 7d 0a 0a 0a 23 20 45 6e 64 20 6f 66  ,),.}...# End of
20e0: 20 77 6f 72 64 0a 0a 64 46 69 6e 61 6c 31 20 3d   word..dFinal1 =
20f0: 20 7b 0a 20 20 20 20 22 61 22 3a 20 28 22 61 73   {.    "a": ("as
2100: 22 2c 20 22 61 74 22 2c 20 22 61 6e 74 22 2c 20  ", "at", "ant", 
2110: 22 61 68 22 29 2c 0a 20 20 20 20 22 41 22 3a 20  "ah"),.    "A": 
2120: 28 22 41 53 22 2c 20 22 41 54 22 2c 20 22 41 4e  ("AS", "AT", "AN
2130: 54 22 2c 20 22 41 48 22 29 2c 0a 20 20 20 20 22  T", "AH"),.    "
2140: 63 22 3a 20 28 22 63 68 22 2c 29 2c 0a 20 20 20  c": ("ch",),.   
2150: 20 22 43 22 3a 20 28 22 43 48 22 2c 29 2c 0a 20   "C": ("CH",),. 
2160: 20 20 20 22 65 22 3a 20 28 22 65 74 22 2c 20 22     "e": ("et", "
2170: 65 72 22 2c 20 22 65 74 73 22 2c 20 22 c3 a9 65  er", "ets", "..e
2180: 22 2c 20 22 65 7a 22 2c 20 22 61 69 22 2c 20 22  ", "ez", "ai", "
2190: 61 69 73 22 2c 20 22 61 69 74 22 2c 20 22 65 6e  ais", "ait", "en
21a0: 74 22 2c 20 22 65 68 22 29 2c 0a 20 20 20 20 22  t", "eh"),.    "
21b0: 45 22 3a 20 28 22 45 54 22 2c 20 22 45 52 22 2c  E": ("ET", "ER",
21c0: 20 22 45 54 53 22 2c 20 22 c3 89 45 22 2c 20 22   "ETS", "..E", "
21d0: 45 5a 22 2c 20 22 41 49 22 2c 20 22 41 49 53 22  EZ", "AI", "AIS"
21e0: 2c 20 22 41 49 54 22 2c 20 22 45 4e 54 22 2c 20  , "AIT", "ENT", 
21f0: 22 45 48 22 29 2c 0a 20 20 20 20 22 c3 a9 22 3a  "EH"),.    "..":
2200: 20 28 22 65 74 22 2c 20 22 65 72 22 2c 20 22 65   ("et", "er", "e
2210: 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22 65 7a 22  ts", "..e", "ez"
2220: 2c 20 22 61 69 22 2c 20 22 61 69 73 22 2c 20 22  , "ai", "ais", "
2230: 61 69 74 22 29 2c 0a 20 20 20 20 22 c3 89 22 3a  ait"),.    "..":
2240: 20 28 22 45 54 22 2c 20 22 45 52 22 2c 20 22 45   ("ET", "ER", "E
2250: 54 53 22 2c 20 22 c3 89 45 22 2c 20 22 45 5a 22  TS", "..E", "EZ"
2260: 2c 20 22 41 49 22 2c 20 22 41 49 53 22 2c 20 22  , "AI", "AIS", "
2270: 41 49 54 22 29 2c 0a 20 20 20 20 22 c3 a8 22 3a  AIT"),.    "..":
2280: 20 28 22 65 74 22 2c 20 22 65 72 22 2c 20 22 65   ("et", "er", "e
2290: 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22 65 7a 22  ts", "..e", "ez"
22a0: 2c 20 22 61 69 22 2c 20 22 61 69 73 22 2c 20 22  , "ai", "ais", "
22b0: 61 69 74 22 29 2c 0a 20 20 20 20 22 c3 88 22 3a  ait"),.    "..":
22c0: 20 28 22 45 54 22 2c 20 22 45 52 22 2c 20 22 45   ("ET", "ER", "E
22d0: 54 53 22 2c 20 22 c3 89 45 22 2c 20 22 45 5a 22  TS", "..E", "EZ"
22e0: 2c 20 22 41 49 22 2c 20 22 41 49 53 22 2c 20 22  , "AI", "AIS", "
22f0: 41 49 54 22 29 2c 0a 20 20 20 20 22 c3 aa 22 3a  AIT"),.    "..":
2300: 20 28 22 65 74 22 2c 20 22 65 72 22 2c 20 22 65   ("et", "er", "e
2310: 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22 65 7a 22  ts", "..e", "ez"
2320: 2c 20 22 61 69 22 2c 20 22 61 69 73 22 2c 20 22  , "ai", "ais", "
2330: 61 69 74 22 29 2c 0a 20 20 20 20 22 c3 8a 22 3a  ait"),.    "..":
2340: 20 28 22 45 54 22 2c 20 22 45 52 22 2c 20 22 45   ("ET", "ER", "E
2350: 54 53 22 2c 20 22 c3 89 45 22 2c 20 22 45 5a 22  TS", "..E", "EZ"
2360: 2c 20 22 41 49 22 2c 20 22 41 49 53 22 2c 20 22  , "AI", "AIS", "
2370: 41 49 54 22 29 2c 0a 20 20 20 20 22 c3 ab 22 3a  AIT"),.    "..":
2380: 20 28 22 65 74 22 2c 20 22 65 72 22 2c 20 22 65   ("et", "er", "e
2390: 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22 65 7a 22  ts", "..e", "ez"
23a0: 2c 20 22 61 69 22 2c 20 22 61 69 73 22 2c 20 22  , "ai", "ais", "
23b0: 61 69 74 22 29 2c 0a 20 20 20 20 22 c3 8b 22 3a  ait"),.    "..":
23c0: 20 28 22 45 54 22 2c 20 22 45 52 22 2c 20 22 45   ("ET", "ER", "E
23d0: 54 53 22 2c 20 22 c3 89 45 22 2c 20 22 45 5a 22  TS", "..E", "EZ"
23e0: 2c 20 22 41 49 22 2c 20 22 41 49 53 22 2c 20 22  , "AI", "AIS", "
23f0: 41 49 54 22 29 2c 0a 20 20 20 20 22 67 22 3a 20  AIT"),.    "g": 
2400: 28 22 67 68 22 2c 29 2c 0a 20 20 20 20 22 47 22  ("gh",),.    "G"
2410: 3a 20 28 22 47 48 22 2c 29 2c 0a 20 20 20 20 22  : ("GH",),.    "
2420: 69 22 3a 20 28 22 69 73 22 2c 20 22 69 74 22 2c  i": ("is", "it",
2430: 20 22 69 65 22 2c 20 22 69 6e 22 29 2c 0a 20 20   "ie", "in"),.  
2440: 20 20 22 49 22 3a 20 28 22 49 53 22 2c 20 22 49    "I": ("IS", "I
2450: 54 22 2c 20 22 49 45 22 2c 20 22 49 4e 22 29 2c  T", "IE", "IN"),
2460: 0a 20 20 20 20 22 6e 22 3a 20 28 22 6e 74 22 2c  .    "n": ("nt",
2470: 20 22 6e 64 22 2c 20 22 6e 73 22 2c 20 22 6e 68   "nd", "ns", "nh
2480: 22 29 2c 0a 20 20 20 20 22 4e 22 3a 20 28 22 4e  "),.    "N": ("N
2490: 54 22 2c 20 22 4e 44 22 2c 20 22 4e 53 22 2c 20  T", "ND", "NS", 
24a0: 22 4e 48 22 29 2c 0a 20 20 20 20 22 6f 22 3a 20  "NH"),.    "o": 
24b0: 28 22 61 75 74 22 2c 20 22 6f 74 22 2c 20 22 6f  ("aut", "ot", "o
24c0: 73 22 29 2c 0a 20 20 20 20 22 4f 22 3a 20 28 22  s"),.    "O": ("
24d0: 41 55 54 22 2c 20 22 4f 54 22 2c 20 22 4f 53 22  AUT", "OT", "OS"
24e0: 29 2c 0a 20 20 20 20 22 c3 b4 22 3a 20 28 22 61  ),.    "..": ("a
24f0: 75 74 22 2c 20 22 6f 74 22 2c 20 22 6f 73 22 29  ut", "ot", "os")
2500: 2c 0a 20 20 20 20 22 c3 94 22 3a 20 28 22 41 55  ,.    "..": ("AU
2510: 54 22 2c 20 22 4f 54 22 2c 20 22 4f 53 22 29 2c  T", "OT", "OS"),
2520: 0a 20 20 20 20 22 c3 b6 22 3a 20 28 22 61 75 74  .    "..": ("aut
2530: 22 2c 20 22 6f 74 22 2c 20 22 6f 73 22 29 2c 0a  ", "ot", "os"),.
2540: 20 20 20 20 22 c3 96 22 3a 20 28 22 41 55 54 22      "..": ("AUT"
2550: 2c 20 22 4f 54 22 2c 20 22 4f 53 22 29 2c 0a 20  , "OT", "OS"),. 
2560: 20 20 20 22 70 22 3a 20 28 22 70 68 22 2c 29 2c     "p": ("ph",),
2570: 0a 20 20 20 20 22 50 22 3a 20 28 22 50 48 22 2c  .    "P": ("PH",
2580: 29 2c 0a 20 20 20 20 22 73 22 3a 20 28 22 73 68  ),.    "s": ("sh
2590: 22 2c 29 2c 0a 20 20 20 20 22 53 22 3a 20 28 22  ",),.    "S": ("
25a0: 53 48 22 2c 29 2c 0a 20 20 20 20 22 74 22 3a 20  SH",),.    "t": 
25b0: 28 22 74 68 22 2c 29 2c 0a 20 20 20 20 22 54 22  ("th",),.    "T"
25c0: 3a 20 28 22 54 48 22 2c 29 2c 0a 20 20 20 20 22  : ("TH",),.    "
25d0: 75 22 3a 20 28 22 75 74 22 2c 20 22 75 73 22 2c  u": ("ut", "us",
25e0: 20 22 75 68 22 29 2c 0a 20 20 20 20 22 55 22 3a   "uh"),.    "U":
25f0: 20 28 22 55 54 22 2c 20 22 55 53 22 2c 20 22 55   ("UT", "US", "U
2600: 48 22 29 2c 0a 7d 0a 0a 64 46 69 6e 61 6c 32 20  H"),.}..dFinal2 
2610: 3d 20 7b 0a 20 20 20 20 22 61 69 22 3a 20 28 22  = {.    "ai": ("
2620: 61 69 65 6e 74 22 2c 20 22 61 69 73 22 2c 20 22  aient", "ais", "
2630: 65 74 22 29 2c 0a 20 20 20 20 22 41 49 22 3a 20  et"),.    "AI": 
2640: 28 22 41 49 45 4e 54 22 2c 20 22 41 49 53 22 2c  ("AIENT", "AIS",
2650: 20 22 45 54 22 29 2c 0a 20 20 20 20 22 61 6e 22   "ET"),.    "an"
2660: 3a 20 28 22 61 6e 74 22 2c 20 22 65 6e 74 22 29  : ("ant", "ent")
2670: 2c 0a 20 20 20 20 22 41 4e 22 3a 20 28 22 41 4e  ,.    "AN": ("AN
2680: 54 22 2c 20 22 45 4e 54 22 29 2c 0a 20 20 20 20  T", "ENT"),.    
2690: 22 65 6e 22 3a 20 28 22 65 6e 74 22 2c 20 22 61  "en": ("ent", "a
26a0: 6e 74 22 29 2c 0a 20 20 20 20 22 45 4e 22 3a 20  nt"),.    "EN": 
26b0: 28 22 45 4e 54 22 2c 20 22 41 4e 54 22 29 2c 0a  ("ENT", "ANT"),.
26c0: 20 20 20 20 22 65 69 22 3a 20 28 22 61 69 74 22      "ei": ("ait"
26d0: 2c 20 22 61 69 73 22 29 2c 0a 20 20 20 20 22 45  , "ais"),.    "E
26e0: 49 22 3a 20 28 22 41 49 54 22 2c 20 22 41 49 53  I": ("AIT", "AIS
26f0: 22 29 2c 0a 20 20 20 20 22 6f 6e 22 3a 20 28 22  "),.    "on": ("
2700: 6f 6e 73 22 2c 20 22 6f 6e 74 22 29 2c 0a 20 20  ons", "ont"),.  
2710: 20 20 22 4f 4e 22 3a 20 28 22 4f 4e 53 22 2c 20    "ON": ("ONS", 
2720: 22 4f 4e 54 22 29 2c 0a 20 20 20 20 22 6f 69 22  "ONT"),.    "oi"
2730: 3a 20 28 22 6f 69 73 22 2c 20 22 6f 69 74 22 2c  : ("ois", "oit",
2740: 20 22 6f 69 78 22 29 2c 0a 20 20 20 20 22 4f 49   "oix"),.    "OI
2750: 22 3a 20 28 22 4f 49 53 22 2c 20 22 4f 49 54 22  ": ("OIS", "OIT"
2760: 2c 20 22 4f 49 58 22 29 2c 0a 7d 0a 0a 0a 23 20  , "OIX"),.}...# 
2770: 50 72 c3 a9 66 69 78 65 73 20 65 74 20 73 75 66  Pr..fixes et suf
2780: 66 69 78 65 73 0a 0a 61 50 66 78 31 20 3d 20 66  fixes..aPfx1 = f
2790: 72 6f 7a 65 6e 73 65 74 28 5b 0a 20 20 20 20 22  rozenset([.    "
27a0: 61 6e 74 69 22 2c 20 22 61 72 63 68 69 22 2c 20  anti", "archi", 
27b0: 22 63 6f 6e 74 72 65 22 2c 20 22 68 79 70 65 72  "contre", "hyper
27c0: 22 2c 20 22 6d c3 a9 22 2c 20 22 6d c3 a9 74 61  ", "m..", "m..ta
27d0: 22 2c 20 22 69 6d 22 2c 20 22 69 6e 22 2c 20 22  ", "im", "in", "
27e0: 69 72 22 2c 20 22 70 61 72 22 2c 20 22 70 72 6f  ir", "par", "pro
27f0: 74 6f 22 2c 0a 20 20 20 20 22 70 73 65 75 64 6f  to",.    "pseudo
2800: 22 2c 20 22 70 72 c3 a9 22 2c 20 22 72 65 22 2c  ", "pr..", "re",
2810: 20 22 72 c3 a9 22 2c 20 22 73 61 6e 73 22 2c 20   "r..", "sans", 
2820: 22 73 6f 75 73 22 2c 20 22 73 75 70 72 61 22 2c  "sous", "supra",
2830: 20 22 73 75 72 22 2c 20 22 75 6c 74 72 61 22 0a   "sur", "ultra".
2840: 5d 29 0a 61 50 66 78 32 20 3d 20 66 72 6f 7a 65  ]).aPfx2 = froze
2850: 6e 73 65 74 28 5b 0a 20 20 20 20 22 62 65 6c 67  nset([.    "belg
2860: 6f 22 2c 20 22 66 72 61 6e 63 6f 22 2c 20 22 67  o", "franco", "g
2870: c3 a9 6e 69 74 6f 22 2c 20 22 67 79 6e c3 a9 63  ..nito", "gyn..c
2880: 6f 22 2c 20 22 6d c3 a9 64 69 63 6f 22 2c 20 22  o", "m..dico", "
2890: 72 75 73 73 6f 22 0a 5d 29 0a 0a 0a 5f 7a 57 6f  russo".])..._zWo
28a0: 72 64 50 72 65 66 69 78 65 73 20 3d 20 72 65 2e  rdPrefixes = re.
28b0: 63 6f 6d 70 69 6c 65 28 22 28 3f 69 29 5e 28 5b  compile("(?i)^([
28c0: 6c 64 6d 74 73 6e 6a 63 c3 a7 5d 7c 6c 6f 72 73  ldmtsnjc..]|lors
28d0: 71 75 7c 70 72 65 73 71 75 7c 6a 75 73 71 75 7c  qu|presqu|jusqu|
28e0: 70 75 69 73 71 75 7c 71 75 6f 69 71 75 7c 71 75  puisqu|quoiqu|qu
28f0: 65 6c 71 75 7c 71 75 29 5b e2 80 99 27 e2 80 98  elqu|qu)[...'...
2900: 60 5d 28 5b 5c 5c 77 2d 5d 2b 29 22 29 0a 5f 7a  `]([\\w-]+)")._z
2910: 57 6f 72 64 53 75 66 66 69 78 65 73 20 3d 20 72  WordSuffixes = r
2920: 65 2e 63 6f 6d 70 69 6c 65 28 22 28 3f 69 29 5e  e.compile("(?i)^
2930: 28 5c 5c 77 2b 29 28 2d 28 3f 3a 74 2d 7c 29 28  (\\w+)(-(?:t-|)(
2940: 3f 3a 69 6c 73 3f 7c 65 6c 6c 65 73 3f 7c 6f 6e  ?:ils?|elles?|on
2950: 7c 6a 65 7c 74 75 7c 6e 6f 75 73 7c 76 6f 75 73  |je|tu|nous|vous
2960: 7c 63 65 29 29 24 22 29 0a 0a 64 65 66 20 63 75  |ce))$")..def cu
2970: 74 20 28 73 57 6f 72 64 29 3a 0a 20 20 20 20 22  t (sWord):.    "
2980: 72 65 74 75 72 6e 73 20 61 20 74 75 70 6c 65 20  returns a tuple 
2990: 6f 66 20 73 74 72 69 6e 67 73 20 28 70 72 65 66  of strings (pref
29a0: 69 78 2c 20 74 72 69 6d 65 64 5f 77 6f 72 64 2c  ix, trimed_word,
29b0: 20 73 75 66 66 69 78 29 22 0a 20 20 20 20 73 50   suffix)".    sP
29c0: 72 65 66 69 78 20 3d 20 22 22 0a 20 20 20 20 73  refix = "".    s
29d0: 53 75 66 66 69 78 20 3d 20 22 22 0a 20 20 20 20  Suffix = "".    
29e0: 6d 20 3d 20 5f 7a 57 6f 72 64 50 72 65 66 69 78  m = _zWordPrefix
29f0: 65 73 2e 73 65 61 72 63 68 28 73 57 6f 72 64 29  es.search(sWord)
2a00: 0a 20 20 20 20 69 66 20 6d 3a 0a 20 20 20 20 20  .    if m:.     
2a10: 20 20 20 73 50 72 65 66 69 78 20 3d 20 6d 2e 67     sPrefix = m.g
2a20: 72 6f 75 70 28 31 29 20 2b 20 22 e2 80 99 22 0a  roup(1) + "...".
2a30: 20 20 20 20 20 20 20 20 73 57 6f 72 64 20 3d 20          sWord = 
2a40: 6d 2e 67 72 6f 75 70 28 32 29 0a 20 20 20 20 6d  m.group(2).    m
2a50: 20 3d 20 5f 7a 57 6f 72 64 53 75 66 66 69 78 65   = _zWordSuffixe
2a60: 73 2e 73 65 61 72 63 68 28 73 57 6f 72 64 29 0a  s.search(sWord).
2a70: 20 20 20 20 69 66 20 6d 3a 0a 20 20 20 20 20 20      if m:.      
2a80: 20 20 73 57 6f 72 64 20 3d 20 6d 2e 67 72 6f 75    sWord = m.grou
2a90: 70 28 31 29 0a 20 20 20 20 20 20 20 20 73 53 75  p(1).        sSu
2aa0: 66 66 69 78 20 3d 20 6d 2e 67 72 6f 75 70 28 32  ffix = m.group(2
2ab0: 29 0a 20 20 20 20 72 65 74 75 72 6e 20 28 73 50  ).    return (sP
2ac0: 72 65 66 69 78 2c 20 73 57 6f 72 64 2c 20 73 53  refix, sWord, sS
2ad0: 75 66 66 69 78 29 0a 0a 0a 23 20 4f 74 68 65 72  uffix)...# Other
2ae0: 20 66 75 6e 63 74 69 6f 6e 73 0a 0a 64 65 66 20   functions..def 
2af0: 66 69 6c 74 65 72 53 75 67 67 20 28 61 53 75 67  filterSugg (aSug
2b00: 67 29 3a 0a 20 20 20 20 22 65 78 63 6c 75 64 65  g):.    "exclude
2b10: 20 73 75 67 67 65 73 74 69 6f 6e 73 22 0a 20 20   suggestions".  
2b20: 20 20 72 65 74 75 72 6e 20 66 69 6c 74 65 72 28    return filter(
2b30: 6c 61 6d 62 64 61 20 73 53 75 67 67 3a 20 6e 6f  lambda sSugg: no
2b40: 74 20 73 53 75 67 67 2e 65 6e 64 73 77 69 74 68  t sSugg.endswith
2b50: 28 28 22 c3 a8 22 2c 20 22 c3 88 22 29 29 2c 20  (("..", "..")), 
2b60: 61 53 75 67 67 29 0a                             aSugg).