Grammalecte  Hex Artifact Content

Artifact 73eee3ee03142b80ee8cc50945481c30dc3e54df5943862088fec02480673a65:


0000: 23 20 6c 69 73 74 20 6f 66 20 73 69 6d 69 6c 61  # list of simila
0010: 72 20 63 68 61 72 73 0a 23 20 75 73 65 66 75 6c  r 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 0a 69 6d 70 6f 72  mechanism..impor
0040: 74 20 72 65 0a 69 6d 70 6f 72 74 20 75 6e 69 63  t re.import unic
0050: 6f 64 65 64 61 74 61 0a 0a 0a 5f 78 54 72 61 6e  odedata..._xTran
0060: 73 43 68 61 72 73 46 6f 72 53 70 65 6c 6c 69 6e  sCharsForSpellin
0070: 67 20 3d 20 73 74 72 2e 6d 61 6b 65 74 72 61 6e  g = str.maketran
0080: 73 28 7b 0a 20 20 20 20 27 c5 bf 27 3a 20 27 73  s({.    '..': 's
0090: 27 2c 20 20 27 ef ac 83 27 3a 20 27 66 66 69 27  ',  '...': 'ffi'
00a0: 2c 20 20 27 ef ac 84 27 3a 20 27 66 66 6c 27 2c  ,  '...': 'ffl',
00b0: 20 20 27 ef ac 80 27 3a 20 27 66 66 27 2c 20 20    '...': 'ff',  
00c0: 27 ef ac 85 27 3a 20 27 66 74 27 2c 20 20 27 ef  '...': 'ft',  '.
00d0: ac 81 27 3a 20 27 66 69 27 2c 20 20 27 ef ac 82  ..': 'fi',  '...
00e0: 27 3a 20 27 66 6c 27 2c 20 20 27 ef ac 86 27 3a  ': 'fl',  '...':
00f0: 20 27 73 74 27 0a 7d 29 0a 0a 64 65 66 20 73 70   'st'.})..def sp
0100: 65 6c 6c 69 6e 67 4e 6f 72 6d 61 6c 69 7a 61 74  ellingNormalizat
0110: 69 6f 6e 20 28 73 57 6f 72 64 29 3a 0a 20 20 20  ion (sWord):.   
0120: 20 72 65 74 75 72 6e 20 75 6e 69 63 6f 64 65 64   return unicoded
0130: 61 74 61 2e 6e 6f 72 6d 61 6c 69 7a 65 28 22 4e  ata.normalize("N
0140: 46 43 22 2c 20 73 57 6f 72 64 2e 74 72 61 6e 73  FC", sWord.trans
0150: 6c 61 74 65 28 5f 78 54 72 61 6e 73 43 68 61 72  late(_xTransChar
0160: 73 46 6f 72 53 70 65 6c 6c 69 6e 67 29 29 0a 0a  sForSpelling))..
0170: 0a 5f 78 54 72 61 6e 73 43 68 61 72 73 46 6f 72  ._xTransCharsFor
0180: 53 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e 20 3d  Simplification =
0190: 20 73 74 72 2e 6d 61 6b 65 74 72 61 6e 73 28 7b   str.maketrans({
01a0: 0a 20 20 20 20 27 c3 a0 27 3a 20 27 61 27 2c 20  .    '..': 'a', 
01b0: 20 27 c3 a9 27 3a 20 27 65 27 2c 20 20 27 c3 ae   '..': 'e',  '..
01c0: 27 3a 20 27 69 27 2c 20 20 27 c3 b4 27 3a 20 27  ': 'i',  '..': '
01d0: 6f 27 2c 20 20 27 c3 bb 27 3a 20 27 75 27 2c 20  o',  '..': 'u', 
01e0: 20 27 c3 bf 27 3a 20 27 69 27 2c 20 20 22 79 22   '..': 'i',  "y"
01f0: 3a 20 22 69 22 2c 0a 20 20 20 20 27 c3 a2 27 3a  : "i",.    '..':
0200: 20 27 61 27 2c 20 20 27 c3 a8 27 3a 20 27 65 27   'a',  '..': 'e'
0210: 2c 20 20 27 c3 af 27 3a 20 27 69 27 2c 20 20 27  ,  '..': 'i',  '
0220: c3 b6 27 3a 20 27 6f 27 2c 20 20 27 c3 b9 27 3a  ..': 'o',  '..':
0230: 20 27 75 27 2c 20 20 27 c5 b7 27 3a 20 27 69 27   'u',  '..': 'i'
0240: 2c 0a 20 20 20 20 27 c3 a4 27 3a 20 27 61 27 2c  ,.    '..': 'a',
0250: 20 20 27 c3 aa 27 3a 20 27 65 27 2c 20 20 27 c3    '..': 'e',  '.
0260: ad 27 3a 20 27 69 27 2c 20 20 27 c3 b3 27 3a 20  .': 'i',  '..': 
0270: 27 6f 27 2c 20 20 27 c3 bc 27 3a 20 27 75 27 2c  'o',  '..': 'u',
0280: 20 20 27 c3 bd 27 3a 20 27 69 27 2c 0a 20 20 20    '..': 'i',.   
0290: 20 27 c3 a1 27 3a 20 27 61 27 2c 20 20 27 c3 ab   '..': 'a',  '..
02a0: 27 3a 20 27 65 27 2c 20 20 27 c3 ac 27 3a 20 27  ': 'e',  '..': '
02b0: 69 27 2c 20 20 27 c3 b2 27 3a 20 27 6f 27 2c 20  i',  '..': 'o', 
02c0: 20 27 c3 ba 27 3a 20 27 75 27 2c 20 20 27 e1 bb   '..': 'u',  '..
02d0: b3 27 3a 20 27 69 27 2c 0a 20 20 20 20 27 c4 81  .': 'i',.    '..
02e0: 27 3a 20 27 61 27 2c 20 20 27 c4 93 27 3a 20 27  ': 'a',  '..': '
02f0: 65 27 2c 20 20 27 c4 ab 27 3a 20 27 69 27 2c 20  e',  '..': 'i', 
0300: 20 27 c5 8d 27 3a 20 27 6f 27 2c 20 20 27 c5 ab   '..': 'o',  '..
0310: 27 3a 20 27 75 27 2c 20 20 27 c8 b3 27 3a 20 27  ': 'u',  '..': '
0320: 69 27 2c 0a 20 20 20 20 27 c3 a7 27 3a 20 27 63  i',.    '..': 'c
0330: 27 2c 20 20 27 c3 b1 27 3a 20 27 6e 27 2c 20 20  ',  '..': 'n',  
0340: 27 6b 27 3a 20 27 71 27 2c 20 20 27 77 27 3a 20  'k': 'q',  'w': 
0350: 27 76 27 2c 0a 20 20 20 20 27 c5 93 27 3a 20 27  'v',.    '..': '
0360: 6f 65 27 2c 20 20 27 c3 a6 27 3a 20 27 61 65 27  oe',  '..': 'ae'
0370: 2c 0a 20 20 20 20 27 c5 bf 27 3a 20 27 73 27 2c  ,.    '..': 's',
0380: 20 20 27 ef ac 83 27 3a 20 27 66 66 69 27 2c 20    '...': 'ffi', 
0390: 20 27 ef ac 84 27 3a 20 27 66 66 6c 27 2c 20 20   '...': 'ffl',  
03a0: 27 ef ac 80 27 3a 20 27 66 66 27 2c 20 20 27 ef  '...': 'ff',  '.
03b0: ac 85 27 3a 20 27 66 74 27 2c 20 20 27 ef ac 81  ..': 'ft',  '...
03c0: 27 3a 20 27 66 69 27 2c 20 20 27 ef ac 82 27 3a  ': 'fi',  '...':
03d0: 20 27 66 6c 27 2c 20 20 27 ef ac 86 27 3a 20 27   'fl',  '...': '
03e0: 73 74 27 2c 20 0a 7d 29 0a 0a 64 65 66 20 73 69  st', .})..def si
03f0: 6d 70 6c 69 66 79 57 6f 72 64 20 28 73 57 6f 72  mplifyWord (sWor
0400: 64 29 3a 0a 20 20 20 20 22 77 6f 72 64 20 73 69  d):.    "word si
0410: 6d 70 6c 69 63 61 74 69 6f 6e 20 62 65 66 6f 72  mplication befor
0420: 65 20 63 61 6c 63 75 6c 61 74 69 6e 67 20 64 69  e calculating di
0430: 73 74 61 6e 63 65 20 62 65 74 77 65 65 6e 20 77  stance between w
0440: 6f 72 64 73 22 0a 20 20 20 20 73 57 6f 72 64 20  ords".    sWord 
0450: 3d 20 73 57 6f 72 64 2e 6c 6f 77 65 72 28 29 2e  = sWord.lower().
0460: 74 72 61 6e 73 6c 61 74 65 28 5f 78 54 72 61 6e  translate(_xTran
0470: 73 43 68 61 72 73 46 6f 72 53 69 6d 70 6c 69 66  sCharsForSimplif
0480: 69 63 61 74 69 6f 6e 29 0a 20 20 20 20 73 4e 65  ication).    sNe
0490: 77 57 6f 72 64 20 3d 20 22 22 0a 20 20 20 20 66  wWord = "".    f
04a0: 6f 72 20 69 2c 20 63 20 69 6e 20 65 6e 75 6d 65  or i, c in enume
04b0: 72 61 74 65 28 73 57 6f 72 64 2c 20 31 29 3a 0a  rate(sWord, 1):.
04c0: 20 20 20 20 20 20 20 20 69 66 20 63 20 21 3d 20          if c != 
04d0: 73 57 6f 72 64 5b 69 3a 69 2b 31 5d 3a 0a 20 20  sWord[i:i+1]:.  
04e0: 20 20 20 20 20 20 20 20 20 20 73 4e 65 77 57 6f            sNewWo
04f0: 72 64 20 2b 3d 20 63 0a 20 20 20 20 72 65 74 75  rd += c.    retu
0500: 72 6e 20 73 4e 65 77 57 6f 72 64 2e 72 65 70 6c  rn sNewWord.repl
0510: 61 63 65 28 22 65 61 75 22 2c 20 22 6f 22 29 2e  ace("eau", "o").
0520: 72 65 70 6c 61 63 65 28 22 61 75 22 2c 20 22 6f  replace("au", "o
0530: 22 29 2e 72 65 70 6c 61 63 65 28 22 61 69 22 2c  ").replace("ai",
0540: 20 22 65 22 29 2e 72 65 70 6c 61 63 65 28 22 65   "e").replace("e
0550: 69 22 2c 20 22 65 22 29 2e 72 65 70 6c 61 63 65  i", "e").replace
0560: 28 22 70 68 22 2c 20 22 66 22 29 0a 0a 0a 61 56  ("ph", "f")...aV
0570: 6f 77 65 6c 20 3d 20 73 65 74 28 22 61 c3 a1 c3  owel = set("a...
0580: a0 c3 a2 c3 a4 c4 81 65 c3 a9 c3 a8 c3 aa c3 ab  .......e........
0590: c4 93 69 c3 ad c3 ac c3 ae c3 af c4 ab 6f c3 b3  ..i..........o..
05a0: c3 b2 c3 b4 c3 b6 c5 8d 75 c3 ba c3 b9 c3 bb c3  ........u.......
05b0: bc c5 ab 79 c3 bd e1 bb b3 c5 b7 c3 bf c8 b3 c5  ...y............
05c0: 93 c3 a6 41 c3 81 c3 80 c3 82 c3 84 c4 80 45 c3  ...A..........E.
05d0: 89 c3 88 c3 8a c3 8b c4 92 49 c3 8d c3 8c c3 8e  .........I......
05e0: c3 8f c4 aa 4f c3 93 c3 92 c3 94 c3 96 c5 8c 55  ....O..........U
05f0: c3 9a c3 99 c3 9b c3 9c c5 aa 59 c3 9d e1 bb b2  ..........Y.....
0600: c5 b6 c5 b8 c8 b2 c5 92 c3 86 22 29 0a 61 43 6f  ..........").aCo
0610: 6e 73 6f 6e 61 6e 74 20 3d 20 73 65 74 28 22 62  nsonant = set("b
0620: 63 c3 a7 64 66 67 68 6a 6b 6c 6d 6e c3 b1 70 71  c..dfghjklmn..pq
0630: 72 73 74 76 77 78 7a 42 43 c3 87 44 46 47 48 4a  rstvwxzBC..DFGHJ
0640: 4b 4c 4d 4e c3 91 50 51 52 53 54 56 57 58 5a 22  KLMN..PQRSTVWXZ"
0650: 29 0a 61 44 6f 75 62 6c 65 20 3d 20 73 65 74 28  ).aDouble = set(
0660: 22 62 63 64 66 6a 6b 6c 6d 6e 70 72 73 74 7a 42  "bcdfjklmnprstzB
0670: 43 44 46 4a 4b 4c 4d 4e 50 52 53 54 5a 22 29 20  CDFJKLMNPRSTZ") 
0680: 20 23 20 6c 65 74 74 65 72 73 20 74 68 61 74 20   # letters that 
0690: 6d 61 79 20 62 65 20 75 73 65 64 20 74 77 69 63  may be used twic
06a0: 65 20 73 75 63 63 65 73 73 69 76 65 6c 79 0a 0a  e successively..
06b0: 0a 23 20 53 69 6d 69 6c 61 72 20 63 68 61 72 73  .# Similar chars
06c0: 0a 0a 64 31 74 6f 31 20 3d 20 7b 0a 20 20 20 20  ..d1to1 = {.    
06d0: 22 31 22 3a 20 22 6c 69 c3 ae 4c 49 c3 8e 22 2c  "1": "li..LI..",
06e0: 0a 20 20 20 20 22 32 22 3a 20 22 7a 5a 22 2c 0a  .    "2": "zZ",.
06f0: 20 20 20 20 22 33 22 3a 20 22 65 c3 a9 c3 a8 c3      "3": "e.....
0700: aa 45 c3 89 c3 88 c3 8a 22 2c 0a 20 20 20 20 22  .E......",.    "
0710: 34 22 3a 20 22 61 c3 a0 c3 a2 41 c3 80 c3 82 22  4": "a....A...."
0720: 2c 0a 20 20 20 20 22 35 22 3a 20 22 73 67 53 47  ,.    "5": "sgSG
0730: 22 2c 0a 20 20 20 20 22 36 22 3a 20 22 62 64 67  ",.    "6": "bdg
0740: 42 44 47 22 2c 0a 20 20 20 20 22 37 22 3a 20 22  BDG",.    "7": "
0750: 6c 74 4c 54 22 2c 0a 20 20 20 20 22 38 22 3a 20  ltLT",.    "8": 
0760: 22 62 42 22 2c 0a 20 20 20 20 22 39 22 3a 20 22  "bB",.    "9": "
0770: 67 62 64 47 42 44 22 2c 0a 20 20 20 20 22 30 22  gbdGBD",.    "0"
0780: 3a 20 22 6f c3 b4 4f c3 94 22 2c 0a 0a 20 20 20  : "o..O..",..   
0790: 20 22 61 22 3a 20 22 61 41 c3 a0 c3 80 c3 a2 c3   "a": "aA.......
07a0: 82 c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3 a6 c3  ................
07b0: 86 22 2c 0a 20 20 20 20 22 41 22 3a 20 22 41 61  .",.    "A": "Aa
07c0: c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3 84 c3 a4  ................
07d0: c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20 20 20 22  ........",.    "
07e0: c3 a0 22 3a 20 22 61 41 c3 a0 c3 80 c3 a2 c3 82  ..": "aA........
07f0: c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3 a6 c3 86  ................
0800: 22 2c 0a 20 20 20 20 22 c3 80 22 3a 20 22 41 61  ",.    "..": "Aa
0810: c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3 84 c3 a4  ................
0820: c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20 20 20 22  ........",.    "
0830: c3 a2 22 3a 20 22 61 41 c3 a0 c3 80 c3 a2 c3 82  ..": "aA........
0840: c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3 a6 c3 86  ................
0850: 22 2c 0a 20 20 20 20 22 c3 82 22 3a 20 22 41 61  ",.    "..": "Aa
0860: c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3 84 c3 a4  ................
0870: c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20 20 20 22  ........",.    "
0880: c3 a1 22 3a 20 22 61 41 c3 a0 c3 80 c3 a2 c3 82  ..": "aA........
0890: c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3 a6 c3 86  ................
08a0: 22 2c 0a 20 20 20 20 22 c3 81 22 3a 20 22 41 61  ",.    "..": "Aa
08b0: c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3 84 c3 a4  ................
08c0: c4 80 c4 81 c3 86 c3 a6 22 2c 0a 20 20 20 20 22  ........",.    "
08d0: c3 a4 22 3a 20 22 61 41 c3 a0 c3 80 c3 a2 c3 82  ..": "aA........
08e0: c3 a1 c3 81 c3 a4 c3 84 c4 81 c4 80 c3 a6 c3 86  ................
08f0: 22 2c 0a 20 20 20 20 22 c3 84 22 3a 20 22 41 61  ",.    "..": "Aa
0900: c3 80 c3 a0 c3 82 c3 a2 c3 81 c3 a1 c3 84 c3 a4  ................
0910: c4 80 c4 81 c3 86 c3 a6 22 2c 0a 0a 20 20 20 20  ........",..    
0920: 22 c3 a6 22 3a 20 22 c3 a6 c3 86 c3 a9 c3 89 61  "..": "........a
0930: 41 22 2c 0a 20 20 20 20 22 c3 86 22 3a 20 22 c3  A",.    "..": ".
0940: 86 c3 a6 c3 89 c3 a9 41 61 22 2c 0a 0a 20 20 20  .......Aa",..   
0950: 20 22 62 22 3a 20 22 62 42 22 2c 0a 20 20 20 20   "b": "bB",.    
0960: 22 42 22 3a 20 22 42 62 22 2c 0a 0a 20 20 20 20  "B": "Bb",..    
0970: 22 63 22 3a 20 22 63 43 c3 a7 c3 87 73 53 6b 4b  "c": "cC....sSkK
0980: 71 51 c5 9b c5 9a c5 9d c5 9c 22 2c 0a 20 20 20  qQ........",.   
0990: 20 22 43 22 3a 20 22 43 63 c3 87 c3 a7 53 73 4b   "C": "Cc....SsK
09a0: 6b 51 71 c5 9a c5 9b c5 9c c5 9d 22 2c 0a 20 20  kQq........",.  
09b0: 20 20 22 c3 a7 22 3a 20 22 63 43 c3 a7 c3 87 73    "..": "cC....s
09c0: 53 6b 4b 71 51 c5 9b c5 9a c5 9d c5 9c 22 2c 0a  SkKqQ........",.
09d0: 20 20 20 20 22 c3 87 22 3a 20 22 43 63 c3 87 c3      "..": "Cc...
09e0: a7 53 73 4b 6b 51 71 c5 9a c5 9b c5 9c c5 9d 22  .SsKkQq........"
09f0: 2c 0a 0a 20 20 20 20 22 64 22 3a 20 22 64 44 c3  ,..    "d": "dD.
0a00: b0 c3 90 22 2c 0a 20 20 20 20 22 44 22 3a 20 22  ...",.    "D": "
0a10: 44 64 c3 90 c3 b0 22 2c 0a 0a 20 20 20 20 22 65  Dd....",..    "e
0a20: 22 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88 c3 aa  ": "eE..........
0a30: c3 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92 22 2c  ..............",
0a40: 0a 20 20 20 20 22 45 22 3a 20 22 45 65 c3 89 c3  .    "E": "Ee...
0a50: a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab c4 92 c4  ................
0a60: 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22 c3 a9 22  .....",.    ".."
0a70: 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88 c3 aa c3  : "eE...........
0a80: 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92 22 2c 0a  .............",.
0a90: 20 20 20 20 22 c3 89 22 3a 20 22 45 65 c3 89 c3      "..": "Ee...
0aa0: a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab c4 92 c4  ................
0ab0: 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22 c3 aa 22  .....",.    ".."
0ac0: 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88 c3 aa c3  : "eE...........
0ad0: 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92 22 2c 0a  .............",.
0ae0: 20 20 20 20 22 c3 8a 22 3a 20 22 45 65 c3 89 c3      "..": "Ee...
0af0: a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab c4 92 c4  ................
0b00: 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22 c3 a8 22  .....",.    ".."
0b10: 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88 c3 aa c3  : "eE...........
0b20: 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92 22 2c 0a  .............",.
0b30: 20 20 20 20 22 c3 88 22 3a 20 22 45 65 c3 89 c3      "..": "Ee...
0b40: a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab c4 92 c4  ................
0b50: 93 c5 92 c5 93 22 2c 0a 20 20 20 20 22 c3 ab 22  .....",.    ".."
0b60: 3a 20 22 65 45 c3 a9 c3 89 c3 a8 c3 88 c3 aa c3  : "eE...........
0b70: 8a c3 ab c3 8b c4 93 c4 92 c5 93 c5 92 22 2c 0a  .............",.
0b80: 20 20 20 20 22 c3 8b 22 3a 20 22 45 65 c3 89 c3      "..": "Ee...
0b90: a9 c3 88 c3 a8 c3 8a c3 aa c3 8b c3 ab c4 92 c4  ................
0ba0: 93 c5 92 c5 93 22 2c 0a 0a 20 20 20 20 22 66 22  .....",..    "f"
0bb0: 3a 20 22 66 46 22 2c 0a 20 20 20 20 22 46 22 3a  : "fF",.    "F":
0bc0: 20 22 46 66 22 2c 0a 0a 20 20 20 20 22 67 22 3a   "Ff",..    "g":
0bd0: 20 22 67 47 6a 4a c4 b5 c4 b4 22 2c 0a 20 20 20   "gGjJ....",.   
0be0: 20 22 47 22 3a 20 22 47 67 4a 6a c4 b4 c4 b5 22   "G": "GgJj...."
0bf0: 2c 0a 20 20 20 20 0a 20 20 20 20 22 68 22 3a 20  ,.    .    "h": 
0c00: 22 68 48 22 2c 0a 20 20 20 20 22 48 22 3a 20 22  "hH",.    "H": "
0c10: 48 68 22 2c 0a 0a 20 20 20 20 22 69 22 3a 20 22  Hh",..    "i": "
0c20: 69 49 c3 ae c3 8e c3 af c3 8f 79 59 c3 ad c3 8d  iI........yY....
0c30: c3 ac c3 8c c4 ab c4 aa c3 bf c5 b8 22 2c 0a 20  ............",. 
0c40: 20 20 20 22 49 22 3a 20 22 49 69 c3 8e c3 ae c3     "I": "Ii.....
0c50: 8f c3 af 59 79 c3 8d c3 ad c3 8c c3 ac c4 aa c4  ...Yy...........
0c60: ab c5 b8 c3 bf 22 2c 0a 20 20 20 20 22 c3 ae 22  .....",.    ".."
0c70: 3a 20 22 69 49 c3 ae c3 8e c3 af c3 8f 79 59 c3  : "iI........yY.
0c80: ad c3 8d c3 ac c3 8c c4 ab c4 aa c3 bf c5 b8 22  ..............."
0c90: 2c 0a 20 20 20 20 22 c3 8e 22 3a 20 22 49 69 c3  ,.    "..": "Ii.
0ca0: 8e c3 ae c3 8f c3 af 59 79 c3 8d c3 ad c3 8c c3  .......Yy.......
0cb0: ac c4 aa c4 ab c5 b8 c3 bf 22 2c 0a 20 20 20 20  .........",.    
0cc0: 22 c3 af 22 3a 20 22 69 49 c3 ae c3 8e c3 af c3  "..": "iI.......
0cd0: 8f 79 59 c3 ad c3 8d c3 ac c3 8c c4 ab c4 aa c3  .yY.............
0ce0: bf c5 b8 22 2c 0a 20 20 20 20 22 c3 8f 22 3a 20  ...",.    "..": 
0cf0: 22 49 69 c3 8e c3 ae c3 8f c3 af 59 79 c3 8d c3  "Ii........Yy...
0d00: ad c3 8c c3 ac c4 aa c4 ab c5 b8 c3 bf 22 2c 0a  .............",.
0d10: 20 20 20 20 22 c3 ad 22 3a 20 22 69 49 c3 ae c3      "..": "iI...
0d20: 8e c3 af c3 8f 79 59 c3 ad c3 8d c3 ac c3 8c c4  .....yY.........
0d30: ab c4 aa c3 bf c5 b8 22 2c 0a 20 20 20 20 22 c3  .......",.    ".
0d40: 8d 22 3a 20 22 49 69 c3 8e c3 ae c3 8f c3 af 59  .": "Ii........Y
0d50: 79 c3 8d c3 ad c3 8c c3 ac c4 aa c4 ab c5 b8 c3  y...............
0d60: bf 22 2c 0a 20 20 20 20 22 c3 ac 22 3a 20 22 69  .",.    "..": "i
0d70: 49 c3 ae c3 8e c3 af c3 8f 79 59 c3 ad c3 8d c3  I........yY.....
0d80: ac c3 8c c4 ab c4 aa c3 bf c5 b8 22 2c 0a 20 20  ...........",.  
0d90: 20 20 22 c3 8c 22 3a 20 22 49 69 c3 8e c3 ae c3    "..": "Ii.....
0da0: 8f c3 af 59 79 c3 8d c3 ad c3 8c c3 ac c4 aa c4  ...Yy...........
0db0: ab c5 b8 c3 bf 22 2c 0a 0a 20 20 20 20 22 6a 22  .....",..    "j"
0dc0: 3a 20 22 6a 4a 67 47 c4 b5 c4 b4 22 2c 0a 20 20  : "jJgG....",.  
0dd0: 20 20 22 4a 22 3a 20 22 4a 6a 47 67 c4 b4 c4 b5    "J": "JjGg....
0de0: 22 2c 0a 0a 20 20 20 20 22 6b 22 3a 20 22 6b 4b  ",..    "k": "kK
0df0: 63 43 71 51 22 2c 0a 20 20 20 20 22 4b 22 3a 20  cCqQ",.    "K": 
0e00: 22 4b 6b 43 63 51 71 22 2c 0a 0a 20 20 20 20 22  "KkCcQq",..    "
0e10: 6c 22 3a 20 22 6c 4c c5 82 c5 81 22 2c 0a 20 20  l": "lL....",.  
0e20: 20 20 22 4c 22 3a 20 22 4c 6c c5 81 c5 82 22 2c    "L": "Ll....",
0e30: 0a 0a 20 20 20 20 22 6d 22 3a 20 22 6d 4d e1 b8  ..    "m": "mM..
0e40: bf e1 b8 be 22 2c 0a 20 20 20 20 22 4d 22 3a 20  ....",.    "M": 
0e50: 22 4d 6d e1 b8 be e1 b8 bf 22 2c 0a 0a 20 20 20  "Mm......",..   
0e60: 20 22 6e 22 3a 20 22 6e 4e c3 b1 c3 91 c5 84 c5   "n": "nN.......
0e70: 83 c7 b9 c7 b8 22 2c 0a 20 20 20 20 22 4e 22 3a  .....",.    "N":
0e80: 20 22 4e 6e c3 91 c3 b1 c5 83 c5 84 c7 b8 c7 b9   "Nn............
0e90: 22 2c 0a 0a 20 20 20 20 22 6f 22 3a 20 22 6f 4f  ",..    "o": "oO
0ea0: c3 b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96  ................
0eb0: c5 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22  ........",.    "
0ec0: 4f 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3  O": "Oo.........
0ed0: 92 c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22  ..............."
0ee0: 2c 0a 20 20 20 20 22 c3 b4 22 3a 20 22 6f 4f c3  ,.    "..": "oO.
0ef0: b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5  ................
0f00: 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3  .......",.    ".
0f10: 94 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3  .": "Oo.........
0f20: 92 c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22  ..............."
0f30: 2c 0a 20 20 20 20 22 c3 b3 22 3a 20 22 6f 4f c3  ,.    "..": "oO.
0f40: b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5  ................
0f50: 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3  .......",.    ".
0f60: 93 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3  .": "Oo.........
0f70: 92 c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22  ..............."
0f80: 2c 0a 20 20 20 20 22 c3 b2 22 3a 20 22 6f 4f c3  ,.    "..": "oO.
0f90: b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5  ................
0fa0: 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3  .......",.    ".
0fb0: 92 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3  .": "Oo.........
0fc0: 92 c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22  ..............."
0fd0: 2c 0a 20 20 20 20 22 c3 b6 22 3a 20 22 6f 4f c3  ,.    "..": "oO.
0fe0: b4 c3 94 c3 b3 c3 93 c3 b2 c3 92 c3 b6 c3 96 c5  ................
0ff0: 8d c5 8c c5 93 c5 92 22 2c 0a 20 20 20 20 22 c3  .......",.    ".
1000: 96 22 3a 20 22 4f 6f c3 94 c3 b4 c3 93 c3 b3 c3  .": "Oo.........
1010: 92 c3 b2 c3 96 c3 b6 c5 8c c5 8d c5 92 c5 93 22  ..............."
1020: 2c 0a 0a 20 20 20 20 22 c5 93 22 3a 20 22 c5 93  ,..    "..": "..
1030: c5 92 6f 4f c3 b4 c3 94 65 45 c3 a9 c3 89 c3 a8  ..oO....eE......
1040: c3 88 c3 aa c3 8a c3 ab c3 8b 22 2c 0a 20 20 20  ..........",.   
1050: 20 22 c5 92 22 3a 20 22 c5 92 c5 93 4f 6f c3 94   "..": "....Oo..
1060: c3 b4 45 65 c3 89 c3 a9 c3 88 c3 a8 c3 8a c3 aa  ..Ee............
1070: c3 8b c3 ab 22 2c 0a 0a 20 20 20 20 22 70 22 3a  ....",..    "p":
1080: 20 22 70 50 e1 b9 95 e1 b9 94 22 2c 0a 20 20 20   "pP......",.   
1090: 20 22 50 22 3a 20 22 50 70 e1 b9 94 e1 b9 95 22   "P": "Pp......"
10a0: 2c 0a 0a 20 20 20 20 22 71 22 3a 20 22 71 51 63  ,..    "q": "qQc
10b0: 43 6b 4b 22 2c 0a 20 20 20 20 22 51 22 3a 20 22  CkK",.    "Q": "
10c0: 51 71 43 63 4b 6b 22 2c 0a 0a 20 20 20 20 22 72  QqCcKk",..    "r
10d0: 22 3a 20 22 72 52 c5 95 c5 94 22 2c 0a 20 20 20  ": "rR....",.   
10e0: 20 22 52 22 3a 20 22 52 72 c5 94 c5 95 22 2c 0a   "R": "Rr....",.
10f0: 0a 20 20 20 20 22 73 22 3a 20 22 73 53 63 43 c3  .    "s": "sScC.
1100: a7 c3 87 c5 9b c5 9a c5 9d c5 9c 22 2c 0a 20 20  ...........",.  
1110: 20 20 22 53 22 3a 20 22 53 73 43 63 c3 87 c3 a7    "S": "SsCc....
1120: c5 9a c5 9b c5 9c c5 9d 22 2c 0a 20 20 20 20 22  ........",.    "
1130: c5 9b 22 3a 20 22 73 53 63 43 c3 a7 c3 87 c5 9b  ..": "sScC......
1140: c5 9a c5 9d c5 9c 22 2c 0a 20 20 20 20 22 c5 9a  ......",.    "..
1150: 22 3a 20 22 53 73 43 63 c3 87 c3 a7 c5 9a c5 9b  ": "SsCc........
1160: c5 9c c5 9d 22 2c 0a 20 20 20 20 22 c5 9d 22 3a  ....",.    "..":
1170: 20 22 73 53 63 43 c3 a7 c3 87 c5 9b c5 9a c5 9d   "sScC..........
1180: c5 9c 22 2c 0a 20 20 20 20 22 c5 9c 22 3a 20 22  ..",.    "..": "
1190: 53 73 43 63 c3 87 c3 a7 c5 9a c5 9b c5 9c c5 9d  SsCc............
11a0: 22 2c 0a 0a 20 20 20 20 22 74 22 3a 20 22 74 54  ",..    "t": "tT
11b0: 22 2c 0a 20 20 20 20 22 54 22 3a 20 22 54 74 22  ",.    "T": "Tt"
11c0: 2c 0a 0a 20 20 20 20 22 75 22 3a 20 22 75 55 c3  ,..    "u": "uU.
11d0: bb c3 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5  ................
11e0: ab c5 aa 22 2c 0a 20 20 20 20 22 55 22 3a 20 22  ...",.    "U": "
11f0: 55 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a  Uu..............
1200: c3 ba c5 aa c5 ab 22 2c 0a 20 20 20 20 22 c3 bb  ......",.    "..
1210: 22 3a 20 22 75 55 c3 bb c3 9b c3 b9 c3 99 c3 bc  ": "uU..........
1220: c3 9c c3 ba c3 9a c5 ab c5 aa 22 2c 0a 20 20 20  ..........",.   
1230: 20 22 c3 9b 22 3a 20 22 55 75 c3 9b c3 bb c3 99   "..": "Uu......
1240: c3 b9 c3 9c c3 bc c3 9a c3 ba c5 aa c5 ab 22 2c  ..............",
1250: 0a 20 20 20 20 22 c3 b9 22 3a 20 22 75 55 c3 bb  .    "..": "uU..
1260: c3 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5 ab  ................
1270: c5 aa 22 2c 0a 20 20 20 20 22 c3 99 22 3a 20 22  ..",.    "..": "
1280: 55 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a  Uu..............
1290: c3 ba c5 aa c5 ab 22 2c 0a 20 20 20 20 22 c3 bc  ......",.    "..
12a0: 22 3a 20 22 75 55 c3 bb c3 9b c3 b9 c3 99 c3 bc  ": "uU..........
12b0: c3 9c c3 ba c3 9a c5 ab c5 aa 22 2c 0a 20 20 20  ..........",.   
12c0: 20 22 c3 9c 22 3a 20 22 55 75 c3 9b c3 bb c3 99   "..": "Uu......
12d0: c3 b9 c3 9c c3 bc c3 9a c3 ba c5 aa c5 ab 22 2c  ..............",
12e0: 0a 20 20 20 20 22 c3 ba 22 3a 20 22 75 55 c3 bb  .    "..": "uU..
12f0: c3 9b c3 b9 c3 99 c3 bc c3 9c c3 ba c3 9a c5 ab  ................
1300: c5 aa 22 2c 0a 20 20 20 20 22 c3 9a 22 3a 20 22  ..",.    "..": "
1310: 55 75 c3 9b c3 bb c3 99 c3 b9 c3 9c c3 bc c3 9a  Uu..............
1320: c3 ba c5 aa c5 ab 22 2c 0a 0a 20 20 20 20 22 76  ......",..    "v
1330: 22 3a 20 22 76 56 77 57 22 2c 0a 20 20 20 20 22  ": "vVwW",.    "
1340: 56 22 3a 20 22 56 76 57 77 22 2c 0a 0a 20 20 20  V": "VvWw",..   
1350: 20 22 77 22 3a 20 22 77 57 76 56 22 2c 0a 20 20   "w": "wWvV",.  
1360: 20 20 22 57 22 3a 20 22 57 77 56 76 22 2c 0a 0a    "W": "WwVv",..
1370: 20 20 20 20 22 78 22 3a 20 22 78 58 63 43 6b 4b      "x": "xXcCkK
1380: 22 2c 0a 20 20 20 20 22 58 22 3a 20 22 58 78 43  ",.    "X": "XxC
1390: 63 4b 6b 22 2c 0a 0a 20 20 20 20 22 79 22 3a 20  cKk",..    "y": 
13a0: 22 79 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5  "yYiI...........
13b0: b6 c3 bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22  ..............."
13c0: 2c 0a 20 20 20 20 22 59 22 3a 20 22 59 79 49 69  ,.    "Y": "YyIi
13d0: c3 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d c3 bd  ................
13e0: e1 bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 20 20 20  ..........",.   
13f0: 20 22 c3 bf 22 3a 20 22 79 59 69 49 c3 ae c3 8e   "..": "yYiI....
1400: c3 bf c5 b8 c5 b7 c5 b6 c3 bd c3 9d e1 bb b3 e1  ................
1410: bb b2 c8 b3 c8 b2 22 2c 0a 20 20 20 20 22 c5 b8  ......",.    "..
1420: 22 3a 20 22 59 79 49 69 c3 8e c3 ae c5 b8 c3 bf  ": "YyIi........
1430: c5 b6 c5 b7 c3 9d c3 bd e1 bb b2 e1 bb b3 c8 b2  ................
1440: c8 b3 22 2c 0a 20 20 20 20 22 c5 b7 22 3a 20 22  ..",.    "..": "
1450: 79 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5 b6  yYiI............
1460: c3 bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22 2c  ..............",
1470: 0a 20 20 20 20 22 c5 b6 22 3a 20 22 59 79 49 69  .    "..": "YyIi
1480: c3 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d c3 bd  ................
1490: e1 bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 20 20 20  ..........",.   
14a0: 20 22 c3 bd 22 3a 20 22 79 59 69 49 c3 ae c3 8e   "..": "yYiI....
14b0: c3 bf c5 b8 c5 b7 c5 b6 c3 bd c3 9d e1 bb b3 e1  ................
14c0: bb b2 c8 b3 c8 b2 22 2c 0a 20 20 20 20 22 c3 9d  ......",.    "..
14d0: 22 3a 20 22 59 79 49 69 c3 8e c3 ae c5 b8 c3 bf  ": "YyIi........
14e0: c5 b6 c5 b7 c3 9d c3 bd e1 bb b2 e1 bb b3 c8 b2  ................
14f0: c8 b3 22 2c 0a 20 20 20 20 22 e1 bb b3 22 3a 20  ..",.    "...": 
1500: 22 79 59 69 49 c3 ae c3 8e c3 bf c5 b8 c5 b7 c5  "yYiI...........
1510: b6 c3 bd c3 9d e1 bb b3 e1 bb b2 c8 b3 c8 b2 22  ..............."
1520: 2c 0a 20 20 20 20 22 e1 bb b2 22 3a 20 22 59 79  ,.    "...": "Yy
1530: 49 69 c3 8e c3 ae c5 b8 c3 bf c5 b6 c5 b7 c3 9d  Ii..............
1540: c3 bd e1 bb b2 e1 bb b3 c8 b2 c8 b3 22 2c 0a 0a  ............",..
1550: 20 20 20 20 22 7a 22 3a 20 22 7a 5a 73 53 e1 ba      "z": "zZsS..
1560: 91 e1 ba 90 c5 ba c5 b9 22 2c 0a 20 20 20 20 22  ........",.    "
1570: 5a 22 3a 20 22 5a 7a 53 73 e1 ba 90 e1 ba 91 c5  Z": "ZzSs.......
1580: b9 c5 ba 22 2c 0a 7d 0a 0a 64 31 74 6f 58 20 3d  ...",.}..d1toX =
1590: 20 7b 0a 20 20 20 20 22 c3 a6 22 3a 20 28 22 61   {.    "..": ("a
15a0: 65 22 2c 29 2c 0a 20 20 20 20 22 c3 86 22 3a 20  e",),.    "..": 
15b0: 28 22 41 45 22 2c 29 2c 0a 20 20 20 20 22 62 22  ("AE",),.    "b"
15c0: 3a 20 28 22 62 62 22 2c 29 2c 0a 20 20 20 20 22  : ("bb",),.    "
15d0: 42 22 3a 20 28 22 42 42 22 2c 29 2c 0a 20 20 20  B": ("BB",),.   
15e0: 20 22 63 22 3a 20 28 22 63 63 22 2c 20 22 73 73   "c": ("cc", "ss
15f0: 22 2c 20 22 71 75 22 2c 20 22 63 68 22 29 2c 0a  ", "qu", "ch"),.
1600: 20 20 20 20 22 43 22 3a 20 28 22 43 43 22 2c 20      "C": ("CC", 
1610: 22 53 53 22 2c 20 22 51 55 22 2c 20 22 43 48 22  "SS", "QU", "CH"
1620: 29 2c 0a 20 20 20 20 22 64 22 3a 20 28 22 64 64  ),.    "d": ("dd
1630: 22 2c 29 2c 0a 20 20 20 20 22 44 22 3a 20 28 22  ",),.    "D": ("
1640: 44 44 22 2c 29 2c 0a 20 20 20 20 22 c3 a9 22 3a  DD",),.    "..":
1650: 20 28 22 61 69 22 2c 20 22 65 69 22 29 2c 0a 20   ("ai", "ei"),. 
1660: 20 20 20 22 c3 89 22 3a 20 28 22 41 49 22 2c 20     "..": ("AI", 
1670: 22 45 49 22 29 2c 0a 20 20 20 20 22 66 22 3a 20  "EI"),.    "f": 
1680: 28 22 66 66 22 2c 20 22 70 68 22 29 2c 0a 20 20  ("ff", "ph"),.  
1690: 20 20 22 46 22 3a 20 28 22 46 46 22 2c 20 22 50    "F": ("FF", "P
16a0: 48 22 29 2c 0a 20 20 20 20 22 67 22 3a 20 28 22  H"),.    "g": ("
16b0: 67 75 22 2c 20 22 67 65 22 2c 20 22 67 67 22 2c  gu", "ge", "gg",
16c0: 20 22 67 68 22 29 2c 0a 20 20 20 20 22 47 22 3a   "gh"),.    "G":
16d0: 20 28 22 47 55 22 2c 20 22 47 45 22 2c 20 22 47   ("GU", "GE", "G
16e0: 47 22 2c 20 22 47 48 22 29 2c 0a 20 20 20 20 22  G", "GH"),.    "
16f0: 6a 22 3a 20 28 22 6a 6a 22 2c 20 22 64 6a 22 29  j": ("jj", "dj")
1700: 2c 0a 20 20 20 20 22 4a 22 3a 20 28 22 4a 4a 22  ,.    "J": ("JJ"
1710: 2c 20 22 44 4a 22 29 2c 0a 20 20 20 20 22 6b 22  , "DJ"),.    "k"
1720: 3a 20 28 22 71 75 22 2c 20 22 63 6b 22 2c 20 22  : ("qu", "ck", "
1730: 63 68 22 2c 20 22 63 75 22 2c 20 22 6b 6b 22 2c  ch", "cu", "kk",
1740: 20 22 6b 68 22 29 2c 0a 20 20 20 20 22 4b 22 3a   "kh"),.    "K":
1750: 20 28 22 51 55 22 2c 20 22 43 4b 22 2c 20 22 43   ("QU", "CK", "C
1760: 48 22 2c 20 22 43 55 22 2c 20 22 4b 4b 22 2c 20  H", "CU", "KK", 
1770: 22 4b 48 22 29 2c 0a 20 20 20 20 22 6c 22 3a 20  "KH"),.    "l": 
1780: 28 22 6c 6c 22 2c 29 2c 0a 20 20 20 20 22 4c 22  ("ll",),.    "L"
1790: 3a 20 28 22 4c 4c 22 2c 29 2c 0a 20 20 20 20 22  : ("LL",),.    "
17a0: 6d 22 3a 20 28 22 6d 6d 22 2c 20 22 6d 6e 22 29  m": ("mm", "mn")
17b0: 2c 0a 20 20 20 20 22 4d 22 3a 20 28 22 4d 4d 22  ,.    "M": ("MM"
17c0: 2c 20 22 4d 4e 22 29 2c 0a 20 20 20 20 22 6e 22  , "MN"),.    "n"
17d0: 3a 20 28 22 6e 6e 22 2c 20 22 6e 6d 22 2c 20 22  : ("nn", "nm", "
17e0: 6d 6e 22 29 2c 0a 20 20 20 20 22 4e 22 3a 20 28  mn"),.    "N": (
17f0: 22 4e 4e 22 2c 20 22 4e 4d 22 2c 20 22 4d 4e 22  "NN", "NM", "MN"
1800: 29 2c 0a 20 20 20 20 22 6f 22 3a 20 28 22 61 75  ),.    "o": ("au
1810: 22 2c 20 22 65 61 75 22 29 2c 0a 20 20 20 20 22  ", "eau"),.    "
1820: 4f 22 3a 20 28 22 41 55 22 2c 20 22 45 41 55 22  O": ("AU", "EAU"
1830: 29 2c 0a 20 20 20 20 22 c5 93 22 3a 20 28 22 6f  ),.    "..": ("o
1840: 65 22 2c 20 22 65 75 22 29 2c 0a 20 20 20 20 22  e", "eu"),.    "
1850: c5 92 22 3a 20 28 22 4f 45 22 2c 20 22 45 55 22  ..": ("OE", "EU"
1860: 29 2c 0a 20 20 20 20 22 70 22 3a 20 28 22 70 70  ),.    "p": ("pp
1870: 22 2c 20 22 70 68 22 29 2c 0a 20 20 20 20 22 50  ", "ph"),.    "P
1880: 22 3a 20 28 22 50 50 22 2c 20 22 50 48 22 29 2c  ": ("PP", "PH"),
1890: 0a 20 20 20 20 22 71 22 3a 20 28 22 71 75 22 2c  .    "q": ("qu",
18a0: 20 22 63 68 22 2c 20 22 63 71 22 2c 20 22 63 6b   "ch", "cq", "ck
18b0: 22 2c 20 22 6b 6b 22 29 2c 0a 20 20 20 20 22 51  ", "kk"),.    "Q
18c0: 22 3a 20 28 22 51 55 22 2c 20 22 43 48 22 2c 20  ": ("QU", "CH", 
18d0: 22 43 51 22 2c 20 22 43 4b 22 2c 20 22 4b 4b 22  "CQ", "CK", "KK"
18e0: 29 2c 0a 20 20 20 20 22 72 22 3a 20 28 22 72 72  ),.    "r": ("rr
18f0: 22 2c 29 2c 0a 20 20 20 20 22 52 22 3a 20 28 22  ",),.    "R": ("
1900: 52 52 22 2c 29 2c 0a 20 20 20 20 22 73 22 3a 20  RR",),.    "s": 
1910: 28 22 73 73 22 2c 20 22 73 68 22 29 2c 0a 20 20  ("ss", "sh"),.  
1920: 20 20 22 53 22 3a 20 28 22 53 53 22 2c 20 22 53    "S": ("SS", "S
1930: 48 22 29 2c 0a 20 20 20 20 22 74 22 3a 20 28 22  H"),.    "t": ("
1940: 74 74 22 2c 20 22 74 68 22 29 2c 0a 20 20 20 20  tt", "th"),.    
1950: 22 54 22 3a 20 28 22 54 54 22 2c 20 22 54 48 22  "T": ("TT", "TH"
1960: 29 2c 0a 20 20 20 20 22 78 22 3a 20 28 22 63 63  ),.    "x": ("cc
1970: 22 2c 20 22 63 74 22 2c 20 22 78 78 22 29 2c 0a  ", "ct", "xx"),.
1980: 20 20 20 20 22 58 22 3a 20 28 22 43 43 22 2c 20      "X": ("CC", 
1990: 22 43 54 22 2c 20 22 58 58 22 29 2c 0a 20 20 20  "CT", "XX"),.   
19a0: 20 22 7a 22 3a 20 28 22 73 73 22 2c 20 22 7a 68   "z": ("ss", "zh
19b0: 22 29 2c 0a 20 20 20 20 22 5a 22 3a 20 28 22 53  "),.    "Z": ("S
19c0: 53 22 2c 20 22 5a 48 22 29 2c 0a 7d 0a 0a 0a 64  S", "ZH"),.}...d
19d0: 65 66 20 67 65 74 31 74 6f 58 52 65 70 6c 61 63  ef get1toXReplac
19e0: 65 6d 65 6e 74 20 28 63 50 72 65 76 2c 20 63 43  ement (cPrev, cC
19f0: 75 72 2c 20 63 4e 65 78 74 29 3a 0a 20 20 20 20  ur, cNext):.    
1a00: 69 66 20 63 43 75 72 20 69 6e 20 61 43 6f 6e 73  if cCur in aCons
1a10: 6f 6e 61 6e 74 20 20 61 6e 64 20 20 28 63 50 72  onant  and  (cPr
1a20: 65 76 20 69 6e 20 61 43 6f 6e 73 6f 6e 61 6e 74  ev in aConsonant
1a30: 20 20 6f 72 20 20 63 4e 65 78 74 20 69 6e 20 61    or  cNext in a
1a40: 43 6f 6e 73 6f 6e 61 6e 74 29 3a 0a 20 20 20 20  Consonant):.    
1a50: 20 20 20 20 72 65 74 75 72 6e 20 28 29 0a 20 20      return ().  
1a60: 20 20 72 65 74 75 72 6e 20 64 31 74 6f 58 2e 67    return d1toX.g
1a70: 65 74 28 63 43 75 72 2c 20 28 29 29 0a 0a 0a 64  et(cCur, ())...d
1a80: 32 74 6f 58 20 3d 20 7b 0a 20 20 20 20 22 61 6d  2toX = {.    "am
1a90: 22 3a 20 28 22 61 6e 22 2c 20 22 65 6e 22 2c 20  ": ("an", "en", 
1aa0: 22 65 6d 22 29 2c 0a 20 20 20 20 22 41 4d 22 3a  "em"),.    "AM":
1ab0: 20 28 22 41 4e 22 2c 20 22 45 4e 22 2c 20 22 45   ("AN", "EN", "E
1ac0: 4d 22 29 2c 0a 20 20 20 20 22 61 6e 22 3a 20 28  M"),.    "an": (
1ad0: 22 61 6d 22 2c 20 22 65 6e 22 2c 20 22 65 6d 22  "am", "en", "em"
1ae0: 29 2c 0a 20 20 20 20 22 41 4e 22 3a 20 28 22 41  ),.    "AN": ("A
1af0: 4d 22 2c 20 22 45 4e 22 2c 20 22 45 4d 22 29 2c  M", "EN", "EM"),
1b00: 0a 20 20 20 20 22 61 75 22 3a 20 28 22 65 61 75  .    "au": ("eau
1b10: 22 2c 20 22 6f 22 2c 20 22 c3 b4 22 29 2c 0a 20  ", "o", ".."),. 
1b20: 20 20 20 22 41 55 22 3a 20 28 22 45 41 55 22 2c     "AU": ("EAU",
1b30: 20 22 4f 22 2c 20 22 c3 94 22 29 2c 0a 20 20 20   "O", ".."),.   
1b40: 20 22 65 6d 22 3a 20 28 22 61 6e 22 2c 20 22 61   "em": ("an", "a
1b50: 6d 22 2c 20 22 65 6e 22 29 2c 0a 20 20 20 20 22  m", "en"),.    "
1b60: 45 4d 22 3a 20 28 22 41 4e 22 2c 20 22 41 4d 22  EM": ("AN", "AM"
1b70: 2c 20 22 45 4e 22 29 2c 0a 20 20 20 20 22 65 6e  , "EN"),.    "en
1b80: 22 3a 20 28 22 61 6e 22 2c 20 22 61 6d 22 2c 20  ": ("an", "am", 
1b90: 22 65 6d 22 29 2c 0a 20 20 20 20 22 45 4e 22 3a  "em"),.    "EN":
1ba0: 20 28 22 41 4e 22 2c 20 22 41 4d 22 2c 20 22 45   ("AN", "AM", "E
1bb0: 4d 22 29 2c 0a 20 20 20 20 22 61 65 22 3a 20 28  M"),.    "ae": (
1bc0: 22 c3 a6 22 2c 20 22 c3 a9 22 29 2c 0a 20 20 20  "..", ".."),.   
1bd0: 20 22 41 45 22 3a 20 28 22 c3 86 22 2c 20 22 c3   "AE": ("..", ".
1be0: 89 22 29 2c 0a 20 20 20 20 22 61 69 22 3a 20 28  ."),.    "ai": (
1bf0: 22 65 69 22 2c 20 22 c3 a9 22 2c 20 22 c3 a8 22  "ei", "..", ".."
1c00: 2c 20 22 c3 aa 22 2c 20 22 c3 ab 22 29 2c 0a 20  , "..", ".."),. 
1c10: 20 20 20 22 41 49 22 3a 20 28 22 45 49 22 2c 20     "AI": ("EI", 
1c20: 22 c3 89 22 2c 20 22 c3 88 22 2c 20 22 c3 8a 22  "..", "..", ".."
1c30: 2c 20 22 c3 8b 22 29 2c 0a 20 20 20 20 22 65 69  , ".."),.    "ei
1c40: 22 3a 20 28 22 61 69 22 2c 20 22 c3 a9 22 2c 20  ": ("ai", "..", 
1c50: 22 c3 a8 22 2c 20 22 c3 aa 22 2c 20 22 c3 ab 22  "..", "..", ".."
1c60: 29 2c 0a 20 20 20 20 22 45 49 22 3a 20 28 22 41  ),.    "EI": ("A
1c70: 49 22 2c 20 22 c3 89 22 2c 20 22 c3 88 22 2c 20  I", "..", "..", 
1c80: 22 c3 8a 22 2c 20 22 c3 8b 22 29 2c 0a 20 20 20  "..", ".."),.   
1c90: 20 22 63 68 22 3a 20 28 22 73 68 22 2c 20 22 63   "ch": ("sh", "c
1ca0: 22 2c 20 22 73 73 22 29 2c 0a 20 20 20 20 22 43  ", "ss"),.    "C
1cb0: 48 22 3a 20 28 22 53 48 22 2c 20 22 43 22 2c 20  H": ("SH", "C", 
1cc0: 22 53 53 22 29 2c 0a 20 20 20 20 22 63 74 22 3a  "SS"),.    "ct":
1cd0: 20 28 22 78 22 2c 20 22 63 63 22 29 2c 0a 20 20   ("x", "cc"),.  
1ce0: 20 20 22 43 54 22 3a 20 28 22 58 22 2c 20 22 43    "CT": ("X", "C
1cf0: 43 22 29 2c 0a 20 20 20 20 22 67 67 22 3a 20 28  C"),.    "gg": (
1d00: 22 67 75 22 2c 29 2c 0a 20 20 20 20 22 47 47 22  "gu",),.    "GG"
1d10: 3a 20 28 22 47 55 22 2c 29 2c 0a 20 20 20 20 22  : ("GU",),.    "
1d20: 67 75 22 3a 20 28 22 67 67 22 2c 29 2c 0a 20 20  gu": ("gg",),.  
1d30: 20 20 22 47 55 22 3a 20 28 22 47 47 22 2c 29 2c    "GU": ("GG",),
1d40: 0a 20 20 20 20 22 6f 61 22 3a 20 28 22 6f 69 22  .    "oa": ("oi"
1d50: 2c 29 2c 0a 20 20 20 20 22 4f 41 22 3a 20 28 22  ,),.    "OA": ("
1d60: 4f 49 22 2c 29 2c 0a 20 20 20 20 22 6f 65 22 3a  OI",),.    "oe":
1d70: 20 28 22 c5 93 22 2c 29 2c 0a 20 20 20 20 22 4f   ("..",),.    "O
1d80: 45 22 3a 20 28 22 c5 92 22 2c 29 2c 0a 20 20 20  E": ("..",),.   
1d90: 20 22 6f 69 22 3a 20 28 22 6f 61 22 2c 20 22 6f   "oi": ("oa", "o
1da0: 69 65 22 29 2c 0a 20 20 20 20 22 4f 49 22 3a 20  ie"),.    "OI": 
1db0: 28 22 4f 41 22 2c 20 22 4f 49 45 22 29 2c 0a 20  ("OA", "OIE"),. 
1dc0: 20 20 20 22 70 68 22 3a 20 28 22 66 22 2c 29 2c     "ph": ("f",),
1dd0: 0a 20 20 20 20 22 50 48 22 3a 20 28 22 46 22 2c  .    "PH": ("F",
1de0: 29 2c 0a 20 20 20 20 22 71 75 22 3a 20 28 22 71  ),.    "qu": ("q
1df0: 22 2c 20 22 63 71 22 2c 20 22 63 6b 22 2c 20 22  ", "cq", "ck", "
1e00: 63 22 2c 20 22 6b 22 29 2c 0a 20 20 20 20 22 51  c", "k"),.    "Q
1e10: 55 22 3a 20 28 22 51 22 2c 20 22 43 51 22 2c 20  U": ("Q", "CQ", 
1e20: 22 43 4b 22 2c 20 22 43 22 2c 20 22 4b 22 29 2c  "CK", "C", "K"),
1e30: 0a 20 20 20 20 22 73 73 22 3a 20 28 22 63 22 2c  .    "ss": ("c",
1e40: 20 22 c3 a7 22 29 2c 0a 20 20 20 20 22 53 53 22   ".."),.    "SS"
1e50: 3a 20 28 22 43 22 2c 20 22 c3 87 22 29 2c 0a 20  : ("C", ".."),. 
1e60: 20 20 20 22 75 6e 22 3a 20 28 22 65 69 6e 22 2c     "un": ("ein",
1e70: 29 2c 0a 20 20 20 20 22 55 4e 22 3a 20 28 22 45  ),.    "UN": ("E
1e80: 49 4e 22 2c 29 2c 0a 7d 0a 0a 0a 23 20 45 6e 64  IN",),.}...# End
1e90: 20 6f 66 20 77 6f 72 64 0a 0a 64 46 69 6e 61 6c   of word..dFinal
1ea0: 31 20 3d 20 7b 0a 20 20 20 20 22 61 22 3a 20 28  1 = {.    "a": (
1eb0: 22 61 73 22 2c 20 22 61 74 22 2c 20 22 61 6e 74  "as", "at", "ant
1ec0: 22 2c 20 22 61 68 22 29 2c 0a 20 20 20 20 22 41  ", "ah"),.    "A
1ed0: 22 3a 20 28 22 41 53 22 2c 20 22 41 54 22 2c 20  ": ("AS", "AT", 
1ee0: 22 41 4e 54 22 2c 20 22 41 48 22 29 2c 0a 20 20  "ANT", "AH"),.  
1ef0: 20 20 22 63 22 3a 20 28 22 63 68 22 2c 29 2c 0a    "c": ("ch",),.
1f00: 20 20 20 20 22 43 22 3a 20 28 22 43 48 22 2c 29      "C": ("CH",)
1f10: 2c 0a 20 20 20 20 22 65 22 3a 20 28 22 65 74 22  ,.    "e": ("et"
1f20: 2c 20 22 65 72 22 2c 20 22 65 74 73 22 2c 20 22  , "er", "ets", "
1f30: c3 a9 65 22 2c 20 22 65 7a 22 2c 20 22 61 69 22  ..e", "ez", "ai"
1f40: 2c 20 22 61 69 73 22 2c 20 22 61 69 74 22 2c 20  , "ais", "ait", 
1f50: 22 65 6e 74 22 2c 20 22 65 68 22 29 2c 0a 20 20  "ent", "eh"),.  
1f60: 20 20 22 45 22 3a 20 28 22 45 54 22 2c 20 22 45    "E": ("ET", "E
1f70: 52 22 2c 20 22 45 54 53 22 2c 20 22 c3 89 45 22  R", "ETS", "..E"
1f80: 2c 20 22 45 5a 22 2c 20 22 41 49 22 2c 20 22 41  , "EZ", "AI", "A
1f90: 49 53 22 2c 20 22 41 49 54 22 2c 20 22 45 4e 54  IS", "AIT", "ENT
1fa0: 22 2c 20 22 45 48 22 29 2c 0a 20 20 20 20 22 c3  ", "EH"),.    ".
1fb0: a9 22 3a 20 28 22 65 74 22 2c 20 22 65 72 22 2c  .": ("et", "er",
1fc0: 20 22 65 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22   "ets", "..e", "
1fd0: 65 7a 22 2c 20 22 61 69 22 2c 20 22 61 69 73 22  ez", "ai", "ais"
1fe0: 2c 20 22 61 69 74 22 29 2c 0a 20 20 20 20 22 c3  , "ait"),.    ".
1ff0: 89 22 3a 20 28 22 45 54 22 2c 20 22 45 52 22 2c  .": ("ET", "ER",
2000: 20 22 45 54 53 22 2c 20 22 c3 89 45 22 2c 20 22   "ETS", "..E", "
2010: 45 5a 22 2c 20 22 41 49 22 2c 20 22 41 49 53 22  EZ", "AI", "AIS"
2020: 2c 20 22 41 49 54 22 29 2c 0a 20 20 20 20 22 c3  , "AIT"),.    ".
2030: a8 22 3a 20 28 22 65 74 22 2c 20 22 65 72 22 2c  .": ("et", "er",
2040: 20 22 65 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22   "ets", "..e", "
2050: 65 7a 22 2c 20 22 61 69 22 2c 20 22 61 69 73 22  ez", "ai", "ais"
2060: 2c 20 22 61 69 74 22 29 2c 0a 20 20 20 20 22 c3  , "ait"),.    ".
2070: 88 22 3a 20 28 22 45 54 22 2c 20 22 45 52 22 2c  .": ("ET", "ER",
2080: 20 22 45 54 53 22 2c 20 22 c3 89 45 22 2c 20 22   "ETS", "..E", "
2090: 45 5a 22 2c 20 22 41 49 22 2c 20 22 41 49 53 22  EZ", "AI", "AIS"
20a0: 2c 20 22 41 49 54 22 29 2c 0a 20 20 20 20 22 c3  , "AIT"),.    ".
20b0: aa 22 3a 20 28 22 65 74 22 2c 20 22 65 72 22 2c  .": ("et", "er",
20c0: 20 22 65 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22   "ets", "..e", "
20d0: 65 7a 22 2c 20 22 61 69 22 2c 20 22 61 69 73 22  ez", "ai", "ais"
20e0: 2c 20 22 61 69 74 22 29 2c 0a 20 20 20 20 22 c3  , "ait"),.    ".
20f0: 8a 22 3a 20 28 22 45 54 22 2c 20 22 45 52 22 2c  .": ("ET", "ER",
2100: 20 22 45 54 53 22 2c 20 22 c3 89 45 22 2c 20 22   "ETS", "..E", "
2110: 45 5a 22 2c 20 22 41 49 22 2c 20 22 41 49 53 22  EZ", "AI", "AIS"
2120: 2c 20 22 41 49 54 22 29 2c 0a 20 20 20 20 22 c3  , "AIT"),.    ".
2130: ab 22 3a 20 28 22 65 74 22 2c 20 22 65 72 22 2c  .": ("et", "er",
2140: 20 22 65 74 73 22 2c 20 22 c3 a9 65 22 2c 20 22   "ets", "..e", "
2150: 65 7a 22 2c 20 22 61 69 22 2c 20 22 61 69 73 22  ez", "ai", "ais"
2160: 2c 20 22 61 69 74 22 29 2c 0a 20 20 20 20 22 c3  , "ait"),.    ".
2170: 8b 22 3a 20 28 22 45 54 22 2c 20 22 45 52 22 2c  .": ("ET", "ER",
2180: 20 22 45 54 53 22 2c 20 22 c3 89 45 22 2c 20 22   "ETS", "..E", "
2190: 45 5a 22 2c 20 22 41 49 22 2c 20 22 41 49 53 22  EZ", "AI", "AIS"
21a0: 2c 20 22 41 49 54 22 29 2c 0a 20 20 20 20 22 67  , "AIT"),.    "g
21b0: 22 3a 20 28 22 67 68 22 2c 29 2c 0a 20 20 20 20  ": ("gh",),.    
21c0: 22 47 22 3a 20 28 22 47 48 22 2c 29 2c 0a 20 20  "G": ("GH",),.  
21d0: 20 20 22 69 22 3a 20 28 22 69 73 22 2c 20 22 69    "i": ("is", "i
21e0: 74 22 2c 20 22 69 65 22 2c 20 22 69 6e 22 29 2c  t", "ie", "in"),
21f0: 0a 20 20 20 20 22 49 22 3a 20 28 22 49 53 22 2c  .    "I": ("IS",
2200: 20 22 49 54 22 2c 20 22 49 45 22 2c 20 22 49 4e   "IT", "IE", "IN
2210: 22 29 2c 0a 20 20 20 20 22 6e 22 3a 20 28 22 6e  "),.    "n": ("n
2220: 74 22 2c 20 22 6e 64 22 2c 20 22 6e 73 22 2c 20  t", "nd", "ns", 
2230: 22 6e 68 22 29 2c 0a 20 20 20 20 22 4e 22 3a 20  "nh"),.    "N": 
2240: 28 22 4e 54 22 2c 20 22 4e 44 22 2c 20 22 4e 53  ("NT", "ND", "NS
2250: 22 2c 20 22 4e 48 22 29 2c 0a 20 20 20 20 22 6f  ", "NH"),.    "o
2260: 22 3a 20 28 22 61 75 74 22 2c 20 22 6f 74 22 2c  ": ("aut", "ot",
2270: 20 22 6f 73 22 29 2c 0a 20 20 20 20 22 4f 22 3a   "os"),.    "O":
2280: 20 28 22 41 55 54 22 2c 20 22 4f 54 22 2c 20 22   ("AUT", "OT", "
2290: 4f 53 22 29 2c 0a 20 20 20 20 22 c3 b4 22 3a 20  OS"),.    "..": 
22a0: 28 22 61 75 74 22 2c 20 22 6f 74 22 2c 20 22 6f  ("aut", "ot", "o
22b0: 73 22 29 2c 0a 20 20 20 20 22 c3 94 22 3a 20 28  s"),.    "..": (
22c0: 22 41 55 54 22 2c 20 22 4f 54 22 2c 20 22 4f 53  "AUT", "OT", "OS
22d0: 22 29 2c 0a 20 20 20 20 22 c3 b6 22 3a 20 28 22  "),.    "..": ("
22e0: 61 75 74 22 2c 20 22 6f 74 22 2c 20 22 6f 73 22  aut", "ot", "os"
22f0: 29 2c 0a 20 20 20 20 22 c3 96 22 3a 20 28 22 41  ),.    "..": ("A
2300: 55 54 22 2c 20 22 4f 54 22 2c 20 22 4f 53 22 29  UT", "OT", "OS")
2310: 2c 0a 20 20 20 20 22 70 22 3a 20 28 22 70 68 22  ,.    "p": ("ph"
2320: 2c 29 2c 0a 20 20 20 20 22 50 22 3a 20 28 22 50  ,),.    "P": ("P
2330: 48 22 2c 29 2c 0a 20 20 20 20 22 73 22 3a 20 28  H",),.    "s": (
2340: 22 73 68 22 2c 29 2c 0a 20 20 20 20 22 53 22 3a  "sh",),.    "S":
2350: 20 28 22 53 48 22 2c 29 2c 0a 20 20 20 20 22 74   ("SH",),.    "t
2360: 22 3a 20 28 22 74 68 22 2c 29 2c 0a 20 20 20 20  ": ("th",),.    
2370: 22 54 22 3a 20 28 22 54 48 22 2c 29 2c 0a 20 20  "T": ("TH",),.  
2380: 20 20 22 75 22 3a 20 28 22 75 74 22 2c 20 22 75    "u": ("ut", "u
2390: 73 22 2c 20 22 75 68 22 29 2c 0a 20 20 20 20 22  s", "uh"),.    "
23a0: 55 22 3a 20 28 22 55 54 22 2c 20 22 55 53 22 2c  U": ("UT", "US",
23b0: 20 22 55 48 22 29 2c 0a 7d 0a 0a 64 46 69 6e 61   "UH"),.}..dFina
23c0: 6c 32 20 3d 20 7b 0a 20 20 20 20 22 61 69 22 3a  l2 = {.    "ai":
23d0: 20 28 22 61 69 65 6e 74 22 2c 20 22 61 69 73 22   ("aient", "ais"
23e0: 2c 20 22 65 74 22 29 2c 0a 20 20 20 20 22 41 49  , "et"),.    "AI
23f0: 22 3a 20 28 22 41 49 45 4e 54 22 2c 20 22 41 49  ": ("AIENT", "AI
2400: 53 22 2c 20 22 45 54 22 29 2c 0a 20 20 20 20 22  S", "ET"),.    "
2410: 61 6e 22 3a 20 28 22 61 6e 74 22 2c 20 22 65 6e  an": ("ant", "en
2420: 74 22 29 2c 0a 20 20 20 20 22 41 4e 22 3a 20 28  t"),.    "AN": (
2430: 22 41 4e 54 22 2c 20 22 45 4e 54 22 29 2c 0a 20  "ANT", "ENT"),. 
2440: 20 20 20 22 65 6e 22 3a 20 28 22 65 6e 74 22 2c     "en": ("ent",
2450: 20 22 61 6e 74 22 29 2c 0a 20 20 20 20 22 45 4e   "ant"),.    "EN
2460: 22 3a 20 28 22 45 4e 54 22 2c 20 22 41 4e 54 22  ": ("ENT", "ANT"
2470: 29 2c 0a 20 20 20 20 22 65 69 22 3a 20 28 22 61  ),.    "ei": ("a
2480: 69 74 22 2c 20 22 61 69 73 22 29 2c 0a 20 20 20  it", "ais"),.   
2490: 20 22 45 49 22 3a 20 28 22 41 49 54 22 2c 20 22   "EI": ("AIT", "
24a0: 41 49 53 22 29 2c 0a 20 20 20 20 22 6f 6e 22 3a  AIS"),.    "on":
24b0: 20 28 22 6f 6e 73 22 2c 20 22 6f 6e 74 22 29 2c   ("ons", "ont"),
24c0: 0a 20 20 20 20 22 4f 4e 22 3a 20 28 22 4f 4e 53  .    "ON": ("ONS
24d0: 22 2c 20 22 4f 4e 54 22 29 2c 0a 20 20 20 20 22  ", "ONT"),.    "
24e0: 6f 69 22 3a 20 28 22 6f 69 73 22 2c 20 22 6f 69  oi": ("ois", "oi
24f0: 74 22 2c 20 22 6f 69 78 22 29 2c 0a 20 20 20 20  t", "oix"),.    
2500: 22 4f 49 22 3a 20 28 22 4f 49 53 22 2c 20 22 4f  "OI": ("OIS", "O
2510: 49 54 22 2c 20 22 4f 49 58 22 29 2c 0a 7d 0a 0a  IT", "OIX"),.}..
2520: 0a 23 20 50 72 c3 a9 66 69 78 65 73 20 65 74 20  .# Pr..fixes et 
2530: 73 75 66 66 69 78 65 73 0a 0a 61 50 66 78 31 20  suffixes..aPfx1 
2540: 3d 20 66 72 6f 7a 65 6e 73 65 74 28 5b 0a 20 20  = frozenset([.  
2550: 20 20 22 61 6e 74 69 22 2c 20 22 61 72 63 68 69    "anti", "archi
2560: 22 2c 20 22 63 6f 6e 74 72 65 22 2c 20 22 68 79  ", "contre", "hy
2570: 70 65 72 22 2c 20 22 6d c3 a9 22 2c 20 22 6d c3  per", "m..", "m.
2580: a9 74 61 22 2c 20 22 69 6d 22 2c 20 22 69 6e 22  .ta", "im", "in"
2590: 2c 20 22 69 72 22 2c 20 22 70 61 72 22 2c 20 22  , "ir", "par", "
25a0: 70 72 6f 74 6f 22 2c 0a 20 20 20 20 22 70 73 65  proto",.    "pse
25b0: 75 64 6f 22 2c 20 22 70 72 c3 a9 22 2c 20 22 72  udo", "pr..", "r
25c0: 65 22 2c 20 22 72 c3 a9 22 2c 20 22 73 61 6e 73  e", "r..", "sans
25d0: 22 2c 20 22 73 6f 75 73 22 2c 20 22 73 75 70 72  ", "sous", "supr
25e0: 61 22 2c 20 22 73 75 72 22 2c 20 22 75 6c 74 72  a", "sur", "ultr
25f0: 61 22 0a 5d 29 0a 61 50 66 78 32 20 3d 20 66 72  a".]).aPfx2 = fr
2600: 6f 7a 65 6e 73 65 74 28 5b 0a 20 20 20 20 22 62  ozenset([.    "b
2610: 65 6c 67 6f 22 2c 20 22 66 72 61 6e 63 6f 22 2c  elgo", "franco",
2620: 20 22 67 c3 a9 6e 69 74 6f 22 2c 20 22 67 79 6e   "g..nito", "gyn
2630: c3 a9 63 6f 22 2c 20 22 6d c3 a9 64 69 63 6f 22  ..co", "m..dico"
2640: 2c 20 22 72 75 73 73 6f 22 0a 5d 29 0a 0a 0a 5f  , "russo".])..._
2650: 7a 57 6f 72 64 50 72 65 66 69 78 65 73 20 3d 20  zWordPrefixes = 
2660: 72 65 2e 63 6f 6d 70 69 6c 65 28 22 28 3f 69 29  re.compile("(?i)
2670: 5e 28 5b 6c 64 6d 74 73 6e 6a 63 c3 a7 5d 7c 6c  ^([ldmtsnjc..]|l
2680: 6f 72 73 71 75 7c 70 72 65 73 71 75 7c 6a 75 73  orsqu|presqu|jus
2690: 71 75 7c 70 75 69 73 71 75 7c 71 75 6f 69 71 75  qu|puisqu|quoiqu
26a0: 7c 71 75 65 6c 71 75 7c 71 75 29 5b e2 80 99 27  |quelqu|qu)[...'
26b0: e2 80 98 60 5d 28 5b 5c 5c 77 2d 5d 2b 29 22 29  ...`]([\\w-]+)")
26c0: 0a 5f 7a 57 6f 72 64 53 75 66 66 69 78 65 73 20  ._zWordSuffixes 
26d0: 3d 20 72 65 2e 63 6f 6d 70 69 6c 65 28 22 28 3f  = re.compile("(?
26e0: 69 29 5e 28 5c 5c 77 2b 29 28 2d 28 3f 3a 74 2d  i)^(\\w+)(-(?:t-
26f0: 7c 29 28 3f 3a 69 6c 73 3f 7c 65 6c 6c 65 73 3f  |)(?:ils?|elles?
2700: 7c 6f 6e 7c 6a 65 7c 74 75 7c 6e 6f 75 73 7c 76  |on|je|tu|nous|v
2710: 6f 75 73 7c 63 65 29 29 24 22 29 0a 0a 64 65 66  ous|ce))$")..def
2720: 20 63 75 74 20 28 73 57 6f 72 64 29 3a 0a 20 20   cut (sWord):.  
2730: 20 20 22 72 65 74 75 72 6e 73 20 61 20 74 75 70    "returns a tup
2740: 6c 65 20 6f 66 20 73 74 72 69 6e 67 73 20 28 70  le of strings (p
2750: 72 65 66 69 78 2c 20 74 72 69 6d 65 64 5f 77 6f  refix, trimed_wo
2760: 72 64 2c 20 73 75 66 66 69 78 29 22 0a 20 20 20  rd, suffix)".   
2770: 20 73 50 72 65 66 69 78 20 3d 20 22 22 0a 20 20   sPrefix = "".  
2780: 20 20 73 53 75 66 66 69 78 20 3d 20 22 22 0a 20    sSuffix = "". 
2790: 20 20 20 6d 20 3d 20 5f 7a 57 6f 72 64 50 72 65     m = _zWordPre
27a0: 66 69 78 65 73 2e 73 65 61 72 63 68 28 73 57 6f  fixes.search(sWo
27b0: 72 64 29 0a 20 20 20 20 69 66 20 6d 3a 0a 20 20  rd).    if m:.  
27c0: 20 20 20 20 20 20 73 50 72 65 66 69 78 20 3d 20        sPrefix = 
27d0: 6d 2e 67 72 6f 75 70 28 31 29 20 2b 20 22 e2 80  m.group(1) + "..
27e0: 99 22 0a 20 20 20 20 20 20 20 20 73 57 6f 72 64  .".        sWord
27f0: 20 3d 20 6d 2e 67 72 6f 75 70 28 32 29 0a 20 20   = m.group(2).  
2800: 20 20 6d 20 3d 20 5f 7a 57 6f 72 64 53 75 66 66    m = _zWordSuff
2810: 69 78 65 73 2e 73 65 61 72 63 68 28 73 57 6f 72  ixes.search(sWor
2820: 64 29 0a 20 20 20 20 69 66 20 6d 3a 0a 20 20 20  d).    if m:.   
2830: 20 20 20 20 20 73 57 6f 72 64 20 3d 20 6d 2e 67       sWord = m.g
2840: 72 6f 75 70 28 31 29 0a 20 20 20 20 20 20 20 20  roup(1).        
2850: 73 53 75 66 66 69 78 20 3d 20 6d 2e 67 72 6f 75  sSuffix = m.grou
2860: 70 28 32 29 0a 20 20 20 20 72 65 74 75 72 6e 20  p(2).    return 
2870: 28 73 50 72 65 66 69 78 2c 20 73 57 6f 72 64 2c  (sPrefix, sWord,
2880: 20 73 53 75 66 66 69 78 29 0a 0a 0a 23 20 4f 74   sSuffix)...# Ot
2890: 68 65 72 20 66 75 6e 63 74 69 6f 6e 73 0a 0a 64  her functions..d
28a0: 65 66 20 66 69 6c 74 65 72 53 75 67 67 20 28 61  ef filterSugg (a
28b0: 53 75 67 67 29 3a 0a 20 20 20 20 22 65 78 63 6c  Sugg):.    "excl
28c0: 75 64 65 20 73 75 67 67 65 73 74 69 6f 6e 73 22  ude suggestions"
28d0: 0a 20 20 20 20 72 65 74 75 72 6e 20 66 69 6c 74  .    return filt
28e0: 65 72 28 6c 61 6d 62 64 61 20 73 53 75 67 67 3a  er(lambda sSugg:
28f0: 20 6e 6f 74 20 73 53 75 67 67 2e 65 6e 64 73 77   not sSugg.endsw
2900: 69 74 68 28 28 22 c3 a8 22 2c 20 22 c3 88 22 29  ith(("..", "..")
2910: 29 2c 20 61 53 75 67 67 29 0a                    ), aSugg).