File: hunspell.5

package info (click to toggle)
hunspell 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 4,952 kB
  • sloc: cpp: 16,817; sh: 1,138; makefile: 712; perl: 522; ansic: 67; sed: 16
file content (1526 lines) | stat: -rw-r--r-- 37,832 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
.TH hunspell 5 "2017-09-20"
.LO 1
.SH NAME
hunspell \- format of Hunspell dictionaries and affix files
.SH DESCRIPTION
.IR Hunspell (1)
Hunspell requires two files to define the way a language is being spell
checked: a dictionary file containing words and applicable flags, and an
affix file that specifies how these flags will control spell checking.
An optional file is the personal dictionary file.

.SH Dictionary file
A dictionary file (*.dic) contains a list of words, one per line.
The first line of the dictionaries (except personal dictionaries)
contains the approximate word count (for optimal hash memory size). Each word
may optionally be followed by a slash ("/") and one or more flags, which
represents the word attributes, for example affixes.

Note: Dictionary words can contain also slashes when escaped like  "\/" syntax. 

It's worth to add not only words, but word pairs to the dictionary to get correct
suggestions for common misspellings with missing space, as in the
following example, for the bad "alot" and "inspite" (see also "REP" and field "ph:" about
correct suggestions for common misspellings):

.PP
.RS
.nf
3
word
a lot
in spite
.fi
.RE
.PP

.SH Personal dictionary file
Personal dictionaries are simple word lists. Asterisk at the first character
position signs prohibition.
A second word separated by a slash sets the affixation.

.PP
.RS
.nf
foo
Foo/Simpson
*bar
.fi
.RE
.PP

In this example, "foo" and "Foo" are personal words, plus Foo
will be recognized with affixes of Simpson (Foo's etc.) and
bar is a forbidden word.

.SH Short example

Dictionary file:
.PP
.RS
.nf
3
hello
try/B
work/AB
.fi
.RE
.PP
The flags B and A specify attributes of these words.

Affix file:

.PP
.RS
.nf
SET UTF-8
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'

REP 2
REP f ph
REP ph f

PFX A Y 1
PFX A 0 re .

SFX B Y 2
SFX B 0 ed [^y]
SFX B y ied y
.fi
.RE
.PP

In the affix file, prefix A and suffix B have been defined.
Flag A defines a `re-' prefix. Class B defines two `-ed'
suffixes. First B suffix can be added to a word if
the last character of the word isn't `y'.
Second suffix can be added to the words terminated with an `y'.

All accepted words with this dictionary and affix combination are:
"hello", "try", "tried", "work", "worked", "rework", "reworked".

.SH "AFFIX FILE GENERAL OPTIONS"

Hunspell source distribution contains more than 80 examples for
option usage.

.IP "SET encoding"
Set character encoding of words and morphemes in affix and dictionary files.
Possible values: UTF-8, ISO8859\-1 \- ISO8859\-10, 
ISO8859\-13 \- ISO8859\-15, KOI8-R, KOI8-U, cp1251, ISCII-DEVANAGARI.
.PP
.RS
.nf
SET UTF-8
.fi
.RE
.PP

.IP "FLAG value"
Set flag type. Default type is the extended ASCII (8-bit) character. 
`UTF-8' parameter sets UTF-8 encoded Unicode character flags.
The `long' value sets the double extended ASCII character flag type,
the `num' sets the decimal number flag type. Decimal flags numbered from 1 to
65000, and in flag fields are separated by comma.
BUG: UTF-8 flag type doesn't work on ARM platform.
.PP
.RS
.nf
FLAG long
.fi
.RE
.PP

.IP "COMPLEXPREFIXES"
Set twofold prefix stripping (but single suffix stripping) eg. for morphologically complex
languages with right-to-left writing system.

.IP "LANG langcode"
Set language code for language-specific functions of Hunspell. Use it to activate special casing
of Azeri (LANG az), Turkish (LANG tr) and Crimean Tatar (LANG crh), also not generalized
syllable-counting compounding rules of Hungarian (LANG hu).

.IP "IGNORE characters"
Sets characters to ignore dictionary words, affixes and
input words.
Useful for optional characters, as Arabic (harakat) or Hebrew (niqqud) diacritical marks (see
tests/ignore.* test dictionary in Hunspell distribution).

.IP "AF number_of_flag_vector_aliases"
.IP "AF flag_vector"
Hunspell can substitute affix flag sets with
ordinal numbers in affix rules (alias compression, see makealias tool). First
example with alias compression:
.PP
.RS
.nf
3
hello
try/1
work/2
.fi
.RE
.PP
AF definitions in the affix file:
.PP
.RS
.nf
AF 2
AF A
AF AB
...
.fi
.RE
.PP

It is equivalent of the following dic file:
.PP
.RS
.nf
3
hello
try/A
work/AB
.fi
.RE
.PP

See also tests/alias* examples of the source distribution.

Note I: If affix file contains the FLAG parameter, define it before the AF
definitions.

Note II: Use makealias utility in Hunspell distribution to compress 
aff and dic files.
.IP "AM number_of_morphological_aliases"
.IP "AM morphological_fields"
Hunspell can substitute also morphological data with
ordinal numbers in affix rules (alias compression). 
See tests/alias* examples.
.SH "AFFIX FILE OPTIONS FOR SUGGESTION"
Suggestion parameters can optimize the default n-gram (similarity search in
the dictionary words based on the common 1, 2, 3, 4-character length common
character-sequences), character swap and deletion suggestions of Hunspell. 
REP is suggested to fix the typical and especially bad language specific bugs,
because the REP suggestions have the highest priority in the suggestion list.
PHONE is for languages with not pronunciation based orthography.

For short common misspellings, it's important to use the ph:
field (see later) to give the best suggestions.
.IP "KEY characters_separated_by_vertical_line_optionally"
Hunspell searches and suggests words with one different
character replaced by a neighbor KEY character. Not neighbor
characters in KEY string separated by vertical line characters.
Suggested KEY parameters for QWERTY and Dvorak keyboard layouts:
.PP
.RS
.nf
KEY qwertyuiop|asdfghjkl|zxcvbnm
KEY pyfgcrl|aeouidhtns|qjkxbmwvz
.fi
.RE
.PP
Using the first QWERTY layout, Hunspell suggests "nude" and
"node" for "*nide". A character may have more neighbors, too:
.PP
.RS
.nf
KEY qwertzuop|yxcvbnm|qaw|say|wse|dsx|sy|edr|fdc|dx|rft|gfv|fc|tgz|hgb|gv|zhu|jhn|hb|uji|kjm|jn|iko|lkm
.fi
.RE
.PP
.IP "TRY characters"
Hunspell can suggest right word forms, when they differ from the
bad input word by one TRY character. The parameter of TRY is case sensitive.
.IP "NOSUGGEST flag"
Words signed with NOSUGGEST flag are not suggested (but still accepted when
typed correctly). Proposed flag
for vulgar and obscene words (see also SUBSTANDARD).
.IP "MAXCPDSUGS num"
Set max. number of suggested compound words generated by compound rules. The
number of the suggested compound words may be greater from the same 1-character
distance type.
.IP "MAXNGRAMSUGS num"
Set max. number of n-gram suggestions. Value 0 switches off the n-gram suggestions
(see also MAXDIFF).
.IP "MAXDIFF [0-10]"
Set the similarity factor for the n-gram based suggestions (5 = default value; 0 = fewer n-gram suggestions, but min. 1;
10 = MAXNGRAMSUGS n-gram suggestions).
.IP "ONLYMAXDIFF"
Remove all bad n-gram suggestions (default mode keeps one, see MAXDIFF).
.IP "NOSPLITSUGS"
Disable word suggestions with spaces.
.IP "SUGSWITHDOTS"
Add dot(s) to suggestions, if input word terminates in dot(s).
(Not for LibreOffice dictionaries, because LibreOffice
has an automatic dot expansion mechanism.)
.IP "REP number_of_replacement_definitions"
.IP "REP what replacement"
This table specifies modifications to try first.
First REP is the header of this table and one or more REP data
line are following it. 
With this table, Hunspell can suggest the right forms for the typical 
spelling mistakes when the incorrect form differs by more 
than 1 letter from the right form (see also "ph:").
The search string supports the regex boundary signs (^ and $).
For example a possible English replacement table definition
to handle misspelled consonants:
.PP
.RS
.nf
REP 5
REP f ph
REP ph f
REP tion$ shun
REP ^cooccurr co-occurr
REP ^alot$ a_lot
.fi
.RE
.PP

Note I: It's very useful to define replacements for the most typical one-character mistakes, too:
with REP you can add higher priority to a subset of the TRY suggestions (suggestion list
begins with the REP suggestions).

Note II: Suggesting separated words, specify spaces with underlines:

.PP
.RS
.nf
REP 1
REP onetwothree one_two_three
.fi
.RE
.PP

Note III: Replacement table can be used for a stricter compound word checking
with the option CHECKCOMPOUNDREP.

.IP "MAP number_of_map_definitions"
.IP "MAP string_of_related_chars_or_parenthesized_character_sequences"
We can define language-dependent information on characters and
character sequences that should be considered related (i.e. nearer than
other chars not in the set) in the affix file (.aff)  by a map table.
With this table, Hunspell can suggest the right forms for words, which
incorrectly choose the wrong letter or letter groups from a related
set more than once in a word (see REP).

For example a possible mapping could be for the German
umlauted ü versus the regular u; the word
Frühstück really should be written with umlauted u's and not regular ones 
.PP
.RS
.nf
MAP 1
MAP uü
.fi
.RE
.PP
Use parenthesized groups for character sequences (eg. for
composed Unicode characters):
.PP
.RS
.nf
MAP 3
MAP ß(ss)  (character sequence)
MAP fi(fi)  ("fi" compatibility characters for Unicode fi ligature)
MAP (ọ́)o   (composed Unicode character: ó with bottom dot)
.fi
.RE
.PP
.IP "PHONE number_of_phone_definitions"
.IP "PHONE what replacement"
PHONE uses a table-driven phonetic transcription
algorithm borrowed from Aspell. It is useful for languages with not
pronunciation based orthography. You can add a full
alphabet conversion and other rules for conversion of
special letter sequences. For detailed documentation see
http://aspell.net/man-html/Phonetic-Code.html.
Note: Multibyte UTF-8 characters have not worked with
bracket expression yet. Dash expression has signed bytes and not
UTF-8 characters yet.
.IP "WARN flag"
This flag is for rare words, which are also often spelling mistakes,
see option -r of command line Hunspell and FORBIDWARN.
.IP "FORBIDWARN"
Words with flag WARN aren't accepted by the spell checker using this parameter.
.SH "OPTIONS FOR COMPOUNDING"
.IP "BREAK number_of_break_definitions"
.IP "BREAK character_or_character_sequence"
Define new break points for breaking words and checking
word parts separately. Use ^ and $ to delete characters at end and
start of the word. Rationale: useful for compounding with joining character or strings (for example, hyphen in English and German or hyphen and n-dash in Hungarian). Dashes are often bad break points for tokenization, because compounds with
dashes may contain not valid parts, too.) 
With BREAK, Hunspell can check
both side of these compounds, breaking the words at dashes and n-dashes:
.PP
.RS
.nf
BREAK 2
BREAK -
BREAK \fB--\fR    # n-dash
.fi
.RE
.PP
Breaking are recursive, so foo-bar, bar-foo and foo-foo\fB--\fRbar-bar 
would be valid compounds.
Note: The default word break of Hunspell is equivalent of the following BREAK
definition:
.PP
.RS
.nf
BREAK 3
BREAK -
BREAK ^-
BREAK -$
.fi
.RE
.PP
Hunspell doesn't accept the "-word" and "word-" forms by this BREAK definition:
.PP
.RS
.nf
BREAK 1
BREAK -
.fi
.RE
.PP

Switching off the default values:
.PP
.RS
.nf
BREAK 0
.fi
.RE
.PP

Note II: COMPOUNDRULE is better for handling dashes and
other  compound joining characters or character strings. Use BREAK, if you
want to check words with dashes or other joining characters and there is no time
or possibility to describe precise compound rules with COMPOUNDRULE
(COMPOUNDRULE handles only the suffixation of the last word part of a
compound word).

Note III: For command line spell checking of words with extra characters,
set WORDCHARS parameters: WORDCHARS -\fB--\fR (see tests/break.*) example
.IP "COMPOUNDRULE number_of_compound_definitions"
.IP "COMPOUNDRULE compound_pattern"
Define custom compound patterns with a regex-like syntax.
The first COMPOUNDRULE is a header with the number of the following
COMPOUNDRULE definitions. Compound patterns consist compound flags,
parentheses, star and question mark meta characters. A flag followed by a `*' matches
a word sequence of 0 or more matches of words signed with this compound flag.
A flag followed by a `?' matches a word sequence of
0 or 1 matches of a word signed with this compound flag.
See tests/compound*.* examples.

Note: en_US dictionary of OpenOffice.org uses COMPOUNDRULE for ordinal number recognition
(1st, 2nd, 11th, 12th, 22nd, 112th, 1000122nd etc.).

Note II: In the case of long and numerical flag types use only parenthesized 
flags: (1500)*(2000)?

Note III: COMPOUNDRULE flags work completely separately from the
compounding mechanisms using COMPOUNDFLAG, COMPOUNDBEGIN, etc. compound
flags. (Use these flags on different entries for words).

.IP "COMPOUNDMIN num"
Minimum length of words used for compounding.
Default value is 3 letters.
.IP "COMPOUNDFLAG flag"
Words signed with COMPOUNDFLAG may be in compound words (except when
word shorter than COMPOUNDMIN). Affixes with COMPOUNDFLAG also permits
compounding of affixed words.
.IP "COMPOUNDBEGIN flag"
Words signed with COMPOUNDBEGIN (or with a signed affix) may
be first elements in compound words.
.IP "COMPOUNDLAST flag"
Words signed with COMPOUNDLAST (or with a signed affix) may be last elements in compound words.
.IP "COMPOUNDMIDDLE flag"
Words signed with COMPOUNDMIDDLE (or with a signed affix) may be middle elements in compound words.
.IP "ONLYINCOMPOUND flag"
Suffixes signed with ONLYINCOMPOUND flag may be only inside of compounds
(Fuge-elements in German, fogemorphemes in Swedish).
ONLYINCOMPOUND flag works also with words (see tests/onlyincompound.*).
Note: also valuable to flag compounding parts which are not correct as a word
by itself.
.IP "COMPOUNDPERMITFLAG flag"
Prefixes are allowed at the beginning of compounds,
suffixes are allowed at the end of compounds by default.
Affixes with COMPOUNDPERMITFLAG may be inside of compounds.
.IP "COMPOUNDFORBIDFLAG flag"
Suffixes with this flag forbid compounding of the affixed word.
Dictionary words with this flag are removed from the beginning and
middle of compound words, overriding the effect of COMPOUNDPERMITFLAG.
.IP "COMPOUNDMORESUFFIXES"
Allow twofold suffixes within compounds.
.IP "COMPOUNDROOT flag"
COMPOUNDROOT flag signs the compounds in the dictionary
(Now it is used only in the Hungarian language specific code).
.IP "COMPOUNDWORDMAX number"
Set maximum word count in a compound word. (Default is unlimited.)
.IP "CHECKCOMPOUNDDUP"
Forbid word duplication in compounds (e.g. foofoo).
.IP "CHECKCOMPOUNDREP"
Forbid compounding, if the (usually bad) compound word may be
a non-compound word with a REP fault. Useful for languages with
`compound friendly' orthography.
.IP "CHECKCOMPOUNDCASE"
Forbid upper case characters at word boundaries in compounds.
.IP "CHECKCOMPOUNDTRIPLE"
Forbid compounding, if compound word contains triple repeating letters
(e.g. foo|ox or xo|oof). Bug: missing multi-byte character support
in UTF-8 encoding (works only for 7-bit ASCII characters).
.IP "SIMPLIFIEDTRIPLE"
Allow simplified 2-letter forms of the compounds forbidden by CHECKCOMPOUNDTRIPLE.
It's useful for Swedish and Norwegian (and for
the old German orthography: Schiff|fahrt -> Schiffahrt).
.IP "CHECKCOMPOUNDPATTERN number_of_checkcompoundpattern_definitions"
.IP "CHECKCOMPOUNDPATTERN endchars[/flag] beginchars[/flag] [replacement]"
Forbid compounding, if the first word in the compound ends with endchars, and
next word begins with beginchars and (optionally) they have the requested flags.
The optional replacement parameter allows simplified compound form.

The special "endchars" pattern 0 (zero) limits the rule to the unmodified stems (stems
and stems with zero affixes):
.PP
.RS
.nf
CHECKCOMPOUNDPATTERN 0/x /y
.fi
.RE
.PP
Note: COMPOUNDMIN doesn't work correctly with the compound word alternation,
so it may need to set COMPOUNDMIN to lower value.
.IP "FORCEUCASE flag"
Last word part of a compound with flag FORCEUCASE forces capitalization of the whole
compound word. Eg. Dutch word "straat" (street) with FORCEUCASE flags will allowed only
in capitalized compound forms, according to the Dutch spelling rules for proper
names.
.IP "COMPOUNDSYLLABLE max_syllable vowels"
Need for special compounding rules in Hungarian.
First parameter is the maximum syllable number, that may be in a
compound, if words in compounds are more than COMPOUNDWORDMAX.
Second parameter is the list of vowels (for calculating syllables).
.IP "SYLLABLENUM flags"
Need for special compounding rules in Hungarian.
.SH "AFFIX FILE OPTIONS FOR AFFIX CREATION"
.IP "PFX flag cross_product number"
.IP "PFX flag stripping prefix [condition [morphological_fields...]]"
.IP "SFX flag cross_product number"
.IP "SFX flag stripping suffix [condition [morphological_fields...]]"
An affix is either a prefix or a suffix attached to root words to make 
other words. We can define affix classes with arbitrary number affix rules.
Affix classes are signed with affix flags. The first line of an affix class definition
is the header. The fields of an affix class header:

(0) Option name (PFX or SFX)

(1) Flag (name of the affix class)

(2) Cross product (permission to combine prefixes and suffixes).
Possible values: Y (yes) or N (no)

(3) Line count of the following rules.

Fields of an affix rules:

(0) Option name

(1) Flag

(2) stripping characters from beginning (at prefix rules) or
end (at suffix rules) of the word

(3) affix (optionally with flags of continuation classes, separated by a slash)

(4) condition.

Zero stripping or affix are indicated by zero. Zero condition is indicated by dot.
Condition is a simplified, regular expression-like pattern, which must be met
before the affix can be applied. (Dot signs an arbitrary character. Characters in braces
sign an arbitrary character from the character subset. Dash hasn't got special
meaning, but circumflex (^) next the first brace sets the complementer character set.)

(5) Optional morphological fields separated by spaces or tabulators.

.SH "AFFIX FILE OTHER OPTIONS"
.IP "CIRCUMFIX flag"
Affixes signed with CIRCUMFIX flag may be on a word when this word also has a
prefix with CIRCUMFIX flag and vice versa (see circumfix.* test files in the source distribution).
.IP "FORBIDDENWORD flag"
This flag signs forbidden word form. Because affixed forms
are also forbidden, we can subtract a subset from set of
the accepted affixed and compound words.
Note: usefull to forbid erroneous words, generated by the compounding mechanism.
.IP "FULLSTRIP"
With FULLSTRIP, affix rules can strip full words, not only one less characters, before
adding the affixes, see fullstrip.* test files in the source distribution).
Note: conditions may be word length without FULLSTRIP, too.
.IP "KEEPCASE flag"
Forbid uppercased and capitalized forms of words 
signed with KEEPCASE flags. Useful for special orthographies 
(measurements and currency often keep their case in uppercased
texts) and writing systems (e.g. keeping lower case of IPA characters).
Also valuable for words erroneously written in the wrong case.

Note: With CHECKSHARPS declaration, words with sharp s and KEEPCASE
flag may be capitalized and uppercased, but uppercased forms of these
words may not contain sharp s, only SS. See germancompounding
example in the tests directory of the Hunspell distribution.

.IP "ICONV number_of_ICONV_definitions"
.IP "ICONV pattern pattern2"
Define input conversion table.
Note: useful to convert one type of quote to another one, or change ligature.
.IP "OCONV number_of_OCONV_definitions"
.IP "OCONV pattern pattern2"
Define output conversion table.
.IP "LEMMA_PRESENT flag"
Deprecated. Use "st:" field instead of LEMMA_PRESENT.
.IP "NEEDAFFIX flag"
This flag signs virtual stems in the dictionary, words only valid when affixed.
Except, if the dictionary word has a homonym or a zero affix.
NEEDAFFIX works also with prefixes and prefix + suffix combinations
(see tests/needaffix5.*).
.IP "PSEUDOROOT flag"
Deprecated. (Former name of the NEEDAFFIX option.)
.IP "SUBSTANDARD flag"
SUBSTANDARD flag signs affix rules and dictionary words (allomorphs)
not used in morphological generation and root words removed from
suggestion. See also NOSUGGEST.
.IP "WORDCHARS characters"
WORDCHARS extends tokenizer of Hunspell command line interface with
additional word character. For example, dot, dash, n-dash, numbers, percent sign
are word character in Hungarian.
.IP "CHECKSHARPS"
SS letter pair in uppercased (German) words may be upper case sharp s (ß).
Hunspell can handle this special casing with the CHECKSHARPS
declaration (see also KEEPCASE flag and tests/germancompounding example)
in both spelling and suggestion.

.SH "Morphological analysis"

Hunspell's dictionary items and affix rules may have optional space or
tabulator separated morphological description fields, started with
3-character (two letters and a colon) field IDs:

.PP
.RS
.nf
 word/flags po:noun is:nom
.fi
.RE
.PP

Example: We define a simple resource with morphological informations,
a derivative suffix (ds:) and a part of speech category (po:):

Affix file:

.PP
.RS
.nf
 SFX X Y 1
 SFX X 0 able . ds:able
.fi
.RE
.PP

Dictionary file:

.PP
.RS
.nf
 drink/X po:verb
.fi
.RE
.PP

Test file:

.PP
.RS
.nf
 drink
 drinkable
.fi
.RE
.PP

Test:

.PP
.RS
.nf
 $ analyze test.aff test.dic test.txt
 > drink
 analyze(drink) = po:verb
 stem(drink) = po:verb
 > drinkable
 analyze(drinkable) = po:verb ds:able
 stem(drinkable) = drinkable
.fi
.RE
.PP

You can see in the example, that the analyzer concatenates the morphological fields in
\fIitem and arrangement\fR
style.

.SH "Optional data fields"
Default morphological and other IDs (used in suggestion,
stemming and morphological generation):
.IP "ph:"
Alternative transliteration for better suggestions, ie.
misspellings related to the special orthography
and pronunciation of the word. The best way to handle common
misspellings, so it's worth to add ph: field to the most
affected few thousand dictionary words (or word pairs etc.) to get
correct suggestions for their misspellings.


For example:

.PP
.RS
.nf
Wednesday ph:wendsay ph:wensday
Marseille ph:maarsayl
.fi
.RE
.PP

Hunspell adds all ph: transliterations to the inner REP table, so
it will always suggest the correct word for the specified
misspellings with the highest priority.

The previous example is equivalent of the following REP definition:

.PP
.RS
.nf
REP 6
REP wendsay Wednesday
REP Wendsay Wednesday
REP wensday Wednesday
REP Wensday Wednesday
REP maarsayl Marseille
REP Maarsayl Marseille
.fi
.RE
.PP

The asterisk at the end of the ph: pattern means stripping the
terminating character both from the pattern and the word in the
associated REP rule:

.PP
.RS
.nf
pretty ph:prity*
.fi
.RE
.PP

will result

.PP
.RS
.nf
REP 1
REP prit prett
.fi
.RE
.PP

REP rule, resulting the following correct suggestions

.PP
.RS
.nf
*prity -> pretty
*pritier -> prettier
*pritiest -> prettiest
.fi
.RE
.PP

Moreover, ph: fields can handle suggestions with more than
two words, also different suggestions for the same
misspelling:
.PP
.RS
.nf
do not know ph:dunno
don't know ph:dunno
.fi
.RE
.PP

results

.PP
.RS
.nf
*dunno -> do not know, don't know
.fi
.RE
.PP

Note: if available, ph: is used in n-gram similarity, too.

The ASCII arrow "->" in a ph: pattern means a REP rule (see REP),
creating arbitrary replacement rule associated to the dictionary
item:
.PP
.RS
.nf
happy/B ph:hepy ph:hepi->happi
.fi
.RE
.PP

results

.PP
.RS
.nf
*hepy -> happy
*hepiest -> happiest
.fi
.RE
.PP

.IP "st:"
Stem. Optional: default stem is the dictionary item in morphological
analysis. Stem field is useful for virtual stems (dictionary words
with NEEDAFFIX flag) and morphological
exceptions instead of new, single used morphological rules.
.PP
.RS
.nf
feet  st:foot  is:plural
mice  st:mouse is:plural
teeth st:tooth is:plural
.fi
.RE
.PP

Word forms with multiple stems need multiple dictionary items:

.PP
.RS
.nf
lay po:verb st:lie is:past_2
lay po:verb is:present
lay po:noun
.fi
.RE
.PP

.IP "al:"
Allomorph(s). A dictionary item is the stem of its allomorphs.
Morphological generation needs stem, allomorph and
affix fields.
.PP
.RS
.nf
sing al:sang al:sung
sang st:sing
sung st:sing
.fi
.RE
.PP
.IP "po:"
Part of speech category.
.IP "ds:"
Derivational suffix(es).
Stemming doesn't remove derivational suffixes.
Morphological generation depends on the order of the suffix fields.

In affix rules:

.PP
.RS
.nf
SFX Y Y 1
SFX Y 0 ly . ds:ly_adj
.fi
.RE
.PP

In the dictionary:

.PP
.RS
.nf
ably st:able ds:ly_adj
able al:ably
.fi
.RE
.PP

.IP "is:"
Inflectional suffix(es).
All inflectional suffixes are removed by stemming.
Morphological generation depends on the order of the suffix fields.

.PP
.RS
.nf
feet st:foot is:plural
.fi
.RE
.PP

.IP "ts:"
Terminal suffix(es).
Terminal suffix fields are inflectional suffix fields
"removed" by additional (not terminal) suffixes.

Useful for zero morphemes and affixes removed by splitting rules.

.PP
.RS
.nf
work/D ts:present
.fi
.RE
.PP


.PP
.RS
.nf
SFX D Y 2
SFX D   0 ed . is:past_1
SFX D   0 ed . is:past_2
.fi
.RE
.PP

Typical example of the terminal suffix is the zero morpheme
of the nominative case.

.IP "sp:"
Surface prefix. Temporary solution for adding prefixes to the
stems and generated word forms. See tests/morph.* example.

.IP "pa:"
Parts of the compound words. Output fields of morphological 
analysis for stemming.
.IP "dp:"
Planned: derivational prefix.
.IP "ip:"
Planned: inflectional prefix.
.IP "tp:"
Planned: terminal prefix.

.SH "Twofold suffix stripping"

Ispell's original algorithm strips only one suffix. Hunspell can strip another
one yet (or a plus prefix in COMPLEXPREFIXES mode).

The twofold suffix stripping is a significant improvement in
handling of immense number of suffixes, that characterize
agglutinative languages.

A second `s' suffix (affix class Y) will be the continuation class
of the suffix `able' in the following example:

.PP
.RS
.nf
 SFX Y Y 1
 SFX Y 0 s .

 SFX X Y 1
 SFX X 0 able/Y .
.fi
.RE
.PP

Dictionary file:

.PP
.RS
.nf
 drink/X
.fi
.RE
.PP

Test file:

.PP
.RS
.nf
 drink
 drinkable
 drinkables
.fi
.RE
.PP

Test:

.PP
.RS
.nf
 $ hunspell -m -d test <test.txt
 drink st:drink
 drinkable st:drink fl:X
 drinkables st:drink fl:X fl:Y
.fi
.RE
.PP

Theoretically with the twofold suffix stripping
needs only the square root of the number of suffix rules,
compared with a Hunspell implementation. In our practice, we could have
elaborated the Hungarian inflectional morphology with twofold
suffix stripping.

.SH "Extended affix classes"

Hunspell can handle more than 65000 affix classes.
There are three new syntax for giving flags in affix and dictionary files.

\fIFLAG long\fR command sets 2-character flags:

.PP
.RS
.nf
  FLAG long
  SFX Y1 Y 1
  SFX Y1 0 s 1
.fi
.RE
.PP

Dictionary record with the Y1, Z3, F? flags:

.PP
.RS
.nf
  foo/Y1Z3F?
.fi
.RE
.PP

\fIFLAG num\fR command sets numerical flags separated by comma:

.PP
.RS
.nf
  FLAG num
  SFX 65000 Y 1
  SFX 65000 0 s 1
.fi
.RE
.PP

Dictionary example:

.PP
.RS
.nf
  foo/65000,12,2756
.fi
.RE
.PP

The third one is the Unicode character flags.

.SH "Homonyms"

Hunspell's dictionary can contain repeating elements that are homonyms:

.PP
.RS
.nf
 work/A    po:verb
 work/B    po:noun
.fi
.RE
.PP

An affix file:

.PP
.RS
.nf
 SFX A Y 1
 SFX A 0 s . sf:sg3

 SFX B Y 1
 SFX B 0 s . is:plur
.fi
.RE
.PP

Test file:

.PP
.RS
.nf
 works
.fi
.RE
.PP

Test:

.PP
.RS
.nf
 $ hunspell -d test -m <testwords
 work st:work po:verb is:sg3
 work st:work po:noun is:plur
.fi
.RE
.PP

This feature also gives a way to forbid illegal prefix/suffix combinations.

.SH "Prefix--suffix dependencies"

An interesting side-effect of multi-step stripping is, that the
appropriate treatment of circumfixes now comes for free.  For
instance, in Hungarian, superlatives are formed by simultaneous
prefixation of \fIleg-\fR and suffixation of \fI-bb\fR to the
adjective base.  A problem with the one-level architecture is that
there is no way to render lexical licensing of particular prefixes and
suffixes interdependent, and therefore incorrect forms are recognized
as valid, i.e. *\fIlegvén\fR = \fIleg\fR + \fIvén\fR `old'. Until
the introduction of clusters, a special treatment of the superlative
had to be hardwired in the earlier \fBHunSpell\fR code. This may have
been legitimate for a single case, but in fact prefix--suffix
dependences are ubiquitous in category-changing derivational patterns
(cf. English \fIpayable\fR, \fInon-payable\fR but \fI*non-pay\fR or
\fIdrinkable\fR, \fIundrinkable\fR but \fI*undrink\fR). In simple
words, here, the prefix \fIun-\fR is legitimate only if the base 
\fIdrink\fR is suffixed with \fI-able\fR. If both these patters are
handled by on-line affix rules and affix rules are checked against the
base only, there is no way to express this dependency and the system
will necessarily over- or undergenerate.

In next example, suffix class R have got a prefix `continuation' class
(class P).

.PP
.RS
.nf
PFX P Y 1
PFX P   0 un . [prefix_un]+

SFX S Y 1
SFX S   0 s . +PL

SFX Q Y 1
SFX Q   0 s . +3SGV

SFX R Y 1
SFX R   0 able/PS . +DER_V_ADJ_ABLE
.fi
.RE
.PP

Dictionary:

.PP
.RS
.nf
2
drink/RQ	[verb]
drink/S	[noun]
.fi
.RE
.PP

Morphological analysis:

.PP
.RS
.nf
> drink
drink[verb]
drink[noun]
> drinks
drink[verb]+3SGV
drink[noun]+PL
> drinkable
drink[verb]+DER_V_ADJ_ABLE
> drinkables
drink[verb]+DER_V_ADJ_ABLE+PL
> undrinkable
[prefix_un]+drink[verb]+DER_V_ADJ_ABLE
> undrinkables
[prefix_un]+drink[verb]+DER_V_ADJ_ABLE+PL
> undrink
Unknown word.
> undrinks
Unknown word.
.fi
.RE
.PP

.SH "Circumfix"

Conditional affixes implemented by a continuation class are not enough for
circumfixes, because a circumfix is one affix
in morphology. We also need CIRCUMFIX option for correct
morphological analysis.

.PP
.RS
.nf
# circumfixes: ~ obligate prefix/suffix combinations
# superlative in Hungarian: leg- (prefix) AND -bb (suffix)
# nagy, nagyobb, legnagyobb, legeslegnagyobb
# (great, greater, greatest, most greatest)

CIRCUMFIX X

PFX A Y 1
PFX A 0 leg/X .

PFX B Y 1
PFX B 0 legesleg/X .

SFX C Y 3
SFX C 0 obb . +COMPARATIVE
SFX C 0 obb/AX . +SUPERLATIVE
SFX C 0 obb/BX . +SUPERSUPERLATIVE
.fi
.RE
.PP

Dictionary:

.PP
.RS
.nf
1
nagy/C	[MN]
.fi
.RE
.PP

Analysis:

.PP
.RS
.nf
> nagy
nagy[MN]
> nagyobb
nagy[MN]+COMPARATIVE
> legnagyobb
nagy[MN]+SUPERLATIVE
> legeslegnagyobb
nagy[MN]+SUPERSUPERLATIVE
.fi
.RE
.PP

.SH "Compounds"

Allowing free compounding yields decrease in precision of recognition,
not to mention stemming and morphological analysis.  Although lexical
switches are introduced to license compounding of bases by \fBIspell\fR,
this proves not to be restrictive enough. For example:

.PP
.RS
.nf
# affix file
COMPOUNDFLAG X
.fi
.RE
.PP

.PP
.RS
.nf
2
foo/X
bar/X
.fi
.RE
.PP

With this resource, \fIfoobar\fR and \fIbarfoo\fR also are accepted words.

This has been improved upon with the introduction of direction-sensitive
compounding, i.e., lexical features can specify separately whether a
base can occur as leftmost or rightmost constituent in compounds.
This, however, is still insufficient to handle the intricate patterns
of compounding, not to mention idiosyncratic (and language specific)
norms of hyphenation.

The \fBHunspell\fR algorithm currently allows any affixed form of words,
which are lexically marked as potential members of compounds. \fBHunspell\fR
improved this, and its recursive compound checking
rules makes it possible to implement the intricate spelling
conventions of Hungarian compounds. For example, using COMPOUNDWORDMAX,
COMPOUNDSYLLABLE, COMPOUNDROOT, SYLLABLENUM
options can be set the noteworthy Hungarian `6-3' rule.
Further example in Hungarian, derivate suffixes often modify compounding
properties. Hunspell allows the compounding flags on the
affixes, and there are two special flags (COMPOUNDPERMITFLAG and
(COMPOUNDFORBIDFLAG) to permit or prohibit compounding of the derivations.

Suffixes with this flag forbid compounding of the affixed word.

We also need several Hunspell features for handling German compounding:

.PP
.RS
.nf
# German compounding

# set language to handle special casing of German sharp s

LANG de_DE

# compound flags

COMPOUNDBEGIN U
COMPOUNDMIDDLE V
COMPOUNDEND W

# Prefixes are allowed at the beginning of compounds,
# suffixes are allowed at the end of compounds by default:
# (prefix)?(root)+(affix)?
# Affixes with COMPOUNDPERMITFLAG may be inside of compounds.
COMPOUNDPERMITFLAG P

# for German fogemorphemes (Fuge-element)
# Hint: ONLYINCOMPOUND is not required everywhere, but the
# checking will be a little faster with it.

ONLYINCOMPOUND X

# forbid uppercase characters at compound word bounds
CHECKCOMPOUNDCASE

# for handling Fuge-elements with dashes (Arbeits-) 
# dash will be a special word

COMPOUNDMIN 1
WORDCHARS -

# compound settings and fogemorpheme for `Arbeit'

SFX A Y 3
SFX A 0 s/UPX .
SFX A 0 s/VPDX .
SFX A 0 0/WXD .

SFX B Y 2
SFX B 0 0/UPX .
SFX B 0 0/VWXDP .

# a suffix for `Computer'

SFX C Y 1
SFX C 0 n/WD .

# for forbid exceptions (*Arbeitsnehmer)

FORBIDDENWORD Z

# dash prefix for compounds with dash (Arbeits-Computer)

PFX - Y 1
PFX - 0 -/P .

# decapitalizing prefix
# circumfix for positioning in compounds

PFX D Y 29
PFX D A a/PX A
PFX D Ä ä/PX Ä
 .
 .
PFX D Y y/PX Y
PFX D Z z/PX Z
.fi
.RE
.PP

Example dictionary: 

.PP
.RS
.nf
4
Arbeit/A-
Computer/BC-
-/W
Arbeitsnehmer/Z
.fi
.RE
.PP

Accepted compound compound words with the previous resource:

.PP
.RS
.nf
Computer
Computern
Arbeit
Arbeits-
Computerarbeit
Computerarbeits-
Arbeitscomputer
Arbeitscomputern
Computerarbeitscomputer
Computerarbeitscomputern
Arbeitscomputerarbeit
Computerarbeits-Computer
Computerarbeits-Computern
.fi
.RE
.PP

Not accepted compoundings:

.PP
.RS
.nf
computer
arbeit
Arbeits
arbeits
ComputerArbeit
ComputerArbeits
Arbeitcomputer
ArbeitsComputer
Computerarbeitcomputer
ComputerArbeitcomputer
ComputerArbeitscomputer
Arbeitscomputerarbeits
Computerarbeits-computer
Arbeitsnehmer
.fi
.RE
.PP

This solution is still not ideal, however, and will be replaced by a
pattern-based compound-checking algorithm which is closely integrated
with input buffer tokenization. Patterns describing compounds come as
a separate input resource that can refer to high-level properties of
constituent parts (e.g. the number of syllables, affix flags,
and containment of hyphens). The patterns are matched against potential
segmentations of compounds to assess wellformedness. 

.SH "Unicode character encoding"

Both \fBIspell\fR and \fBMyspell\fR use 8-bit ASCII character encoding,
which is a major deficiency when it comes to scalability.  Although a
language like Hungarian has a standard ASCII character set
(ISO 8859-2), it fails to allow a full implementation of Hungarian
orthographic conventions.  For instance, the '--' symbol (n-dash) is
missing from this character set contrary to the fact that it is not
only the official symbol to delimit parenthetic clauses in the language,
but it can be in compound words as a special 'big' hyphen.

MySpell has got some 8-bit encoding tables, but there are languages
without standard 8-bit encoding, too. For example, a lot of African
languages have non-latin or extended latin characters.

Similarly, using the original spelling of certain foreign names like
\fIÅngström\fR or \fIMolière\fR is encouraged by the Hungarian
spelling norm, and, since characters 'Å' and 'è' are not part of
ISO\ 8859-2, when they combine with inflections containing characters
only in ISO\ 8859-2 (like elative \fI-ből\fR, allative \fI-től\fR or
delative \fI-ről\fR with double acute), these result in words
(like \fIÅngströmről\fR or \fIMolière-től.\fR) that can not be encoded
using any single ASCII encoding scheme.

The problems raised in relation to 8-bit ASCII encoding have long been
recognized by proponents of Unicode. It is clear that trading efficiency
for encoding-independence has its advantages when it comes a truly
multi-lingual application. There is implemented a memory and time
efficient Unicode handling in Hunspell. In non-UTF-8 character
encodings Hunspell works with the original 8-bit strings. In UTF-8 encoding,
affixes and words are stored in UTF-8, during the analysis are handled
in mostly UTF-8, under condition checking and suggestion are converted to
UTF-16. Unicode text analysis and spell checking have a minimal (0-20%)
time overhead and minimal or reasonable memory overhead depends from
the language (its UTF-8 encoding and affixation).

.SH "Conversion of aspell dictionaries"
Aspell dictionaries can be easily converted into hunspell. Conversion steps:

\fBdictionary (xx.cwl -> xx.wl):\fR

.nf
preunzip xx.cwl
wc -l < xx.wl > xx.dic
cat xx.wl >> xx.dic
.fi

\fBaffix file\fR

If the affix file exists, copy it:
.nf
cp xx_affix.dat xx.aff
.fi
If not, create it with the suitable character encoding (see xx.dat)
.nf
echo "SET ISO8859-x" > xx.aff
.fi
or
.nf
echo "SET UTF-8" > xx.aff
.fi

It's useful to add a TRY option with the characters of the dictionary with
frequency order to set edit distance suggestions:
.nf
echo "TRY qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM" >>xx.aff
.fi

.SH "Conversion of aspell dictionaries"
Aspell dictionaries can be easily converted into hunspell. Conversion steps:

\fBdictionary (xx.cwl -> xx.wl):\fR

.nf
preunzip xx.cwl
wc -l < xx.wl > xx.dic
cat xx.wl >> xx.dic
.fi

\fBaffix file\fR

If the affix file exists, copy it:
.nf
cp xx_affix.dat xx.aff
.fi
If not, create it with the suitable character encoding (see xx.dat)
.nf
echo "SET ISO8859-x" > xx.aff
.fi
or
.nf
echo "SET UTF-8" > xx.aff
.fi

It's useful to add a TRY option with the characters of the dictionary with
frequency order to set edit distance suggestions:
.nf
echo "TRY qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM" >>xx.aff
.fi

.SH "SEE ALSO"
.B hunspell (1),
.B ispell (1),
.B ispell (4)