static char sccsid
[] = "@(#)spell.c 4.2 %G%";
{"ssen",ily
,4,"-y+iness","+ness" },
{"ssel",ily
,4,"-y+i+less","+less" },
{"se",s
,1,"","+s", es
,2,"-y+ies","+es" },
{"ecn",ncy
,1,"","-t+ce"},
{"ycn",ncy
,1,"","-cy+t"},
{"ytilib",bility
,5,"-le+ility",""},
{"elbaif",i_to_y
,4,"-y+iable",""},
{"elba",CCe
,4,"-e+able","+able"},
{"yti",CCe
,3,"-e+ity","+ity"},
{"ylb",y_to_e
,1,"-e+y",""},
{"yl",ily
,2,"-y+ily","+ly"},
{"laci",strip
,2,"","+al"},
{"latnem",strip
,2,"","+al"},
{"lanoi",strip
,2,"","+al"},
{"tnem",strip
,4,"","+ment"},
{"gni",CCe
,3,"-e+ing","+ing"},
{"re",strip
,1,"","+r", i_to_y
,2,"-y+ier","+er"},
{"de",strip
,1,"","+d", i_to_y
,2,"-y+ied","+ed"},
{"citsi",strip
,2,"","+ic"},
{"cihparg",i_to_y
,1,"-y+ic",""},
{"tse",strip
,2,"","+st", i_to_y
,3,"-y+iest","+est"},
{"cirtem",i_to_y
,1,"-y+ic",""},
{"yrtem",metry
,0,"-ry+er",""},
{"cigol",i_to_y
,1,"-y+ic",""},
{"tsigol",i_to_y
,2,"-y+ist",""},
{"tsi",VCe
,3,"-e+ist","+ist"},
{"msi",VCe
,3,"-e+ism","+ist"},
{"noitacif",i_to_y
,6,"-y+ication",""},
{"noitazi",ize
,5,"-e+ation",""},
{"rota",tion
,2,"-e+or",""},
{"noit",tion
,3,"-e+ion","+ion"},
{"naino",an
,3,"","+ian"},
{"evit",tion
,3,"-e+ive","+ive"},
{"ezi",CCe
,3,"-e+ize","+ize"},
{"pihs",strip
,4,"","+ship"},
{"dooh",ily
,4,"-y+hood","+hood"},
{"ekil",strip
,4,"","+like"},
"under", /*must precede un*/
"spell: cannot initialize hash table\n");
found
= fopen(argv
[2],"w");
for(argc
-=3,argv
+=3; argc
>0 && argv
[0][0]=='-'; argc
--,argv
++)
for(;; fprintf(file
,"%s%s\n",affix
,original
)) {
for(ep
=word
;(*ep
=j
=getchar())!='\n';ep
++)
for(cp
=word
,dp
=original
; cp
<ep
; )
for(cp
=original
+1,dp
=word
+1;dp
<ep
;dp
++,cp
++)
if(putsuf(ep
,".",0)||suffix(ep
,0))
for(cp
=original
,dp
=word
; *dp
= *cp
++; dp
++)
if (fold
) *dp
= Tolower(*dp
);
word
[0] = Tolower(word
[0]);
register struct suftab
*t
;
deriv
[lev
] = deriv
[lev
-1] = 0;
for(t
= &suftab
[0];sp
=t
->suf
;t
++) {
for(sp
=cp
; --sp
>=word
&&!vowel(*sp
); ) ;
if((*t
->p1
)(ep
-t
->n1
,t
->d1
,t
->a1
,lev
+1))
deriv
[lev
] = deriv
[lev
+1] = 0;
return((*t
->p2
)(ep
-t
->n2
,t
->d2
,t
->a2
,lev
));
return(putsuf(ep
,a
,lev
)||suffix(ep
,lev
));
if(*ep
=='s'&&ep
[-1]=='s')
return(strip(ep
,d
,a
,lev
));
if(!isupper(*word
)) /*must be proper name*/
return(putsuf(ep
,a
,lev
));
return(strip(ep
,"",d
,lev
));
return(strip(ep
,"",d
,lev
));
return(i_to_y(ep
,d
,a
,lev
));
return(strip(ep
,d
,a
,lev
));
if(skipv(skipv(ep
-1))<word
)
return(strip(ep
,d
,a
,lev
));
return(y_to_e(ep
,d
,a
,lev
));
return(strip(ep
,"",a
,lev
));
return(i_to_y(ep
,d
,a
,lev
));
return(strip(ep
,d
,a
,lev
));
return(strip(ep
,d
,a
,lev
));
return(putsuf(ep
,a
,lev
));
return(y_to_e(ep
,d
,a
,lev
));
/* possible consonant-consonant-e ending*/
return(y_to_e(ep
,d
,a
,lev
));
if(!(ep
[-2]=='n'&&ep
[-1]=='g'))
/* possible consonant-vowel-consonant-e ending*/
if(!vowel(c
) && vowel(ep
[-2])) {
if(putsuf(ep
,d
,lev
)||suffix(ep
,lev
))
return(strip(ep
,d
,a
,lev
));
for(sp
=preftab
;*sp
;sp
++) {
for(cp
= *sp
;*cp
;cp
++,bp
++)
while(cp
=lookuppref(&bp
,ep
)) {
deriv
[lev
+1] = deriv
[lev
+2] = 0;
if(i
==0&&vowel(*ep
)&&ep
[-1]==ep
[-2]&&monosyl(bp
,ep
-1)) {
if(vowel(*--ep
)||!vowel(*--ep
)
||ep
[1]=='x'||ep
[1]=='w')
while(s
>=word
&&!vowel(*s
))
/* crummy way to Britishise */
register struct suftab
*p
;
for(p
= suftab
;p
->suf
;p
++) {
printf("=%.*s\n",ep
-bp
,bp
);
for (wp
= bp
, h
= 0, lp
= pow2
[i
]; wp
< ep
; ++wp
, ++lp
)