manpagez: man pages & more
info aspell
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6.1 Format of the Affix File

An affix is either a prefix or a suffix attached to root words to make other words. For example supply -> supplied by dropping the "y" and adding an "ied" (the suffix).

Here is an example of how to define one specific suffix borrowed from the English affix file.

 
SFX D Y 4
SFX D   0     d          e
SFX D   y     ied        [^aeiou]y
SFX D   0     ed         [^ey]
SFX D   0     ed         [aeiou]y

This file is space delimited and case sensitive. So this information can be interpreted as follows:

The first line has 4 fields:

1SFXindicates this is a suffix
2Dis the name of the character which represents this suffix
3Yindicates it can be combined with prefixes (cross product)
44indicates that sequence of 4 affix entries are needed to properly store the affix information

The remaining lines describe the unique information for the 4 affix entries that make up this affix. Each line can be interpreted as follows: (note fields 1 and 2 are used as a check against line 1 info)

1SFXindicates this is a suffix
2Dis the name of the character which represents this affix
3ythe string of chars to strip off before adding affix (a 0 here indicates the NULL string)
4iedthe string of affix characters to add (a 0 here indicates the NULL string)
5[^aeiou]ythe conditions which must be met before the affix can be applied

Field 5 is interesting. Since this is a suffix, field 5 tells us that there are 2 conditions that must be met. The first condition is that the next to the last character in the word must not be any of the following "a", "e", "i", "o" or "u". The second condition is that the last character of the word must end in "y".


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.