ISPELL(1) ISPELL(1) NAME ispell,buildhash,munchlist,findaffix,tryaffix,icombine,ijoin−Interactivespellingchecking SYNOPSIS ispell[common-flags][−M|−N][−Lcontext][−V]files ispell[common-flags]−l ispell[common-flags][−ffile][−s]{−a|−A} ispell[−dfile][−wchars]−c ispell[−dfile][−wchars]−e[e] ispell[−dfile]−D ispell−v[v] common-flags: [−t][−n][−b][−x][−B][−C][−P][−m][−S][−dfile][−pfile][−wchars][−Wn] [−Ttype] buildhash[−s]dict-fileaffix-filehash-file buildhash−scountaffix-file munchlist[−laff-file][−cconv-file][−Tsuffix][−shash-file][−D][−v][−wchars][files] findaffix[−p|−s][−f][−c][−mmin][−Mmax][−eelim][−ttabchar][−llow][files] tryaffix[−p|−s][−c]expanded-fileaffix[+addition] icombine[−Ttype][aff-file] ijoin[−s|−u]join-optionsfile1file2 DESCRIPTION IspellisfashionedafterthespellprogramfromITS(calledispellonTwenexsystems.)Themost commonusageis"ispellfilename".Inthiscase,ispellwilldisplayeachwordwhichdoesnot appearinthedictionaryatthetopofthescreenandallowyoutochangeit.Ifthereare"near misses"inthedictionary(wordswhichdifferbyonlyasingleletter,amissingorextraletter,a pairoftransposedletters,oramissingspaceorhyphen),thentheyarealsodisplayedonfollowing lines.Aswellas"nearmisses",ispellmaydisplayotherguessesatwaystomakethewordfroma knownroot,witheachguessprecededbyquestionmarks.Finally,thelinecontainingtheword andthepreviouslineareprintedatthebottomofthescreen.Ifyourterminalcandisplayin reversevideo,theworditselfishighlighted.Youhavetheoptionofreplacingthewordcompletely,orchoosingoneofthesuggestedwords.Commandsaresinglecharactersasfollows(case isignored): RReplacethemisspelledwordcompletely. SpaceAcceptthewordthistimeonly. AAcceptthewordfortherestofthisispellsession. IAccepttheword,capitalizedasitisinthefile,andupdateprivatedictionary. UAccepttheword,andaddanuncapitalized(actually,alllower-case)versiontothe privatedictionary. 0-nReplacewithoneofthesuggestedwords. LLookupwordsinsystemdictionary(controlledbytheWORDScompilation option). XWritetherestofthisfile,ignoringmisspellings,andstartnextfile. QExitimmediatelyandleavethefileunchanged. !Shellescape. ˆ LRedrawscreen. local 1 ISPELL(1) ISPELL(1) ˆ ZSuspendispell. ?Givehelpscreen. Ifthe−Mswitchisspecified,aone-linemini-menuatthebottomofthescreenwillsummarize theseoptions.Conversely,the−Nswitchmaybeusedtosuppressthemini-menu.(Themini-menuisdisplayedbydefaultifispellwascompiledwiththeMINIMENUoption,butthesetwo switcheswillalwaysoverridethedefault). Ifthe−Lflagisgiven,thespecifiednumberisusedasthenumberoflinesofcontexttobeshown atthebottomofthescreen(Thedefaultistocalculatetheamountofcontextasacertainpercentageofthescreensize).Theamountofcontextissubjecttoasystem-imposedlimit. Ifthe−Vflagisgiven,charactersthatarenotinthe7-bitANSIprintablecharactersetwill alwaysbedisplayedinthestyleof"cat-v",evenifispellthinksthatthesecharactersarelegal ISOLatin-1onyoursystem.Thisisusefulwhenworkingwitholderterminals.Withoutthis switch,ispellwilldisplay8-bitcharacters"asis"iftheyhavebeendefinedasstringcharactersfor thechosenfiletype. "Normal"mode,aswellasthe−l,−a,and−Aoptions(seebelow)alsoacceptsthefollowing "common"flagsonthecommandline: −tTheinputfileisinTeXorLaTeXformat. −nTheinputfileisinnroff/troffformat. −bCreateabackupfilebyappending".bak"tothenameoftheinputfile. −xDon’tcreateabackupfile. −BReportrun-togetherwordswithmissingblanksasspellingerrors. −CConsiderrun-togetherwordsaslegalcompounds. −PDon’tgenerateextraroot/affixcombinations. −mMakepossibleroot/affixcombinationsthataren’tinthedictionary. −SSortthelistofguessesbyprobablecorrectness. −dfileSpecifyanalternatedictionaryfile.Forexample,use−ddeutschtochoosea GermandictionaryinaGermaninstallation. −pfileSpecifyanalternatepersonaldictionary. −wchars Specifyadditionalcharactersthatcanbepartofaword. −WnSpecifylengthofwordsthatarealwayslegal. -Ttype Assumeagivenformattertypeforallfiles. The−nand−toptionsselectwhetherispellrunsinnroff/troff(−n)orTeX/LaTeX(−t)input mode.(ThedefaultiscontrolledbytheDEFTEXFLAGinstallationoption.)TeX/LaTeXmode isalsoautomaticallyselectedifaninputfilehastheextension".tex",unlessoverriddenbythe−n switch.InTeX/LaTeXmode,wheneverabackslash("\")isfound,ispellwillskiptothenext whitespaceorTeX/LaTeXdelimiter.Certaincommandscontainargumentswhichshouldnotbe checked,suchaslabelsandreferencekeysasarefoundinthe\citecommand,sincetheycontain arbitrary,non-wordarguments.Spellcheckingisalsosuppressedwheninmathmode.Thus,for example,given \chapter{ThisisaCkapter}\cite{SCH86} ispellwillfind"Ckapter"butnot"SCH".The−toptiondoesnotrecognizetheTeXcomment character"%",socommentsarealsospell-checked.ItalsoassumescorrectLaTeXsyntax.Argu-mentstoinfrequentlyusedcommandsandsomeoptionalargumentsaresometimescheckedunnec-essarily.ThebibliographywillnotbecheckedifispellwascompiledwithIGNOREBIBdefined. local 2 ISPELL(1) ISPELL(1) Otherwise,thebibliographywillbecheckedbutthereferencekeywillnot. Referencesforthetib(1)bibliographysystem,thatis,textbetweena‘‘[.’’or‘‘<.’’and‘‘.]’’or‘‘.>’’ willalwaysbeignoredinTeX/LaTeXmode. The−band−xoptionscontrolwhetherispellleavesabackup(.bak)fileforeachinputfile.The .bakfilecontainsthepre-correctedtext.Iftherearefileopening/writingerrors,the.bakfile maybeleftforrecoverypurposesevenwiththe−xoption.ThedefaultforthisoptioniscontrolledbytheDEFNOBACKUPFLAGinstallationoption. The−Band−Coptionscontrolhowispellhandlesrun-togetherwords,suchas"notthe"for"not the".If−Bisspecified,suchwordswillbeconsideredaserrors,andispellwilllistvariations withaninsertedblankorhyphenaspossiblereplacements.If−Cisspecified,run-togetherwords willbeconsideredtobelegalcompounds,solongasbothcomponentsareinthedictionary,and eachcomponentisatleastaslongasalanguage-dependentminimum(3characters,bydefault). ThisisusefulforlanguagessuchasGermanandNorwegian,wheremanycompoundwordsare formedbyconcatenation.(Notethatcompoundsformedfromthreeormorerootwordswillstill beconsiderederrors).Thedefaultforthisoptionislanguage-dependent;inamulti-lingualinstal-lationthedefaultmayvarydependingonwhichdictionaryyouchoose. The−Pand−moptionscontrolwhenispellautomaticallygeneratessuggestedroot/affixcombinationsforpossibleadditiontoyourpersonaldictionary.(Thesearetheentriesinthe"guess"list whichareprecededbyquestionmarks.)If−Pisspecified,suchguessesaredisplayedonlyif ispellcannotgenerateanypossibilitiesthatmatchthecurrentdictionary.If−misspecified,such guessesarealwaysdisplayed.Thiscanbeusefulifthedictionaryhasalimitedwordlist,ora wordlistwithfewsuffixes.However,youshouldbecarefulwhenusingthisoption,asitcangenerateguessesthatproduceillegalwords.Thedefaultforthisoptioniscontrolledbythedictionaryfileused. The−Soptionsuppressesispell’snormalbehaviorofsortingthelistofpossiblereplacement words.Somepeoplemaypreferthis,sinceitsomewhatenhancestheprobabilitythatthecorrect wordwillbelow-numbered. The−doptionisusedtospecifyanalternatehasheddictionaryfile,otherthanthedefault.If thefilenamedoesnotcontaina"/",thelibrarydirectoryforthedefaultdictionaryfileisprefixed; thus,touseadictionaryinthelocaldirectory"-d./xxx.hash"mustbeused.Thisisusefulto allowdictionariesforalternatelanguages.Unlikepreviousversionsofispell,adictionaryof /dev/nullisillegal,becausethedictionarycontainstheaffixtable.Ifyouneedaneffectively emptydictionary,createaone-entrylistwithanunlikelystring(e.g.,"qqqqq"). The−poptionisusedtospecifyanalternatepersonaldictionaryfile.Ifthefilenamedoesnot beginwith"/",$HOMEisprefixed.Also,theshellvariableWORDLISTmaybeset,which renamesthepersonaldictionaryinthesamemanner.Thecommandlineoverridesany WORDLISTsetting.Ifneitherthe−pswitchnortheWORDLISTenvironmentvariableisgiven, ispellwillsearchforapersonaldictionaryinboththecurrentdirectoryand$HOME,creatingone in$HOMEifnoneisfound.Thepreferrednameisconstructedbyappending".ispell"tothe basenameofthehashfile.Forexample,ifyouusetheEnglishdictionary,yourpersonaldictionarywouldbenamed".ispellenglish".However,ifthefile".ispellwords"exists,itwillbeused asthepersonaldictionaryregardlessofthelanguagehashfilechosen.Thisfeatureisincludedprimarilyforbackwardscompatibility. Ifthe−poptionisnotspecified,ispellwilllookforpersonaldictionariesinboththecurrentdirectoryandthehomedirectory.Ifdictionariesexistinbothplaces,theywillbemerged.Ifany wordsareaddedtothepersonaldictionary,theywillbewrittentothecurrentdirectoryifadictionaryalreadyexistedinthatplace;otherwisetheywillbewrittentothedictionaryinthehome directory. The−woptionmaybeusedtospecifycharactersotherthanalphabeticswhichmayalsoappear inwords.Forinstance,−w"&"willallow"AT&T"tobepickedup.Underscoresareusefulin manytechnicaldocuments.Thereisanadmittedlycrudeprovisioninthisoptionfor8-bit local 3 ISPELL(1) ISPELL(1) internationalcharacters.Non-printingcharactersmaybespecifiedintheusualwaybyinsertinga backslashfollowedbytheoctalcharactercode;e.g.,"\014"foraformfeed.Alternatively,if"n" appearsinthecharacterstring,the(upto)threecharactersfollowingareaDECIMALcode0-255,forthecharacter.Forexample,toincludebellsandformfeedsinyourwords(anadmittedly sillythingtodo,butaren’tmostpedagogicalexamples): n007n012 Numericdigitsotherthanthethreefollowing"n"aresimplynumericcharacters.Useof"n"does notconflictwithanythingbecauseactualalphabeticshavenomeaning-alphabeticsarealready accepted.Ispellwilltypicallybeusedwithinputfromafile,meaningthatpreservingparityfor possible8bitcharactersfromtheinputtextisOK.Ifyouspecifythe-loption,andactuallytype textfromtheterminal,thismaycreateproblemsifyoursttysettingspreserveparity. The−Woptionmaybeusedtochangethelengthofwordsthatispellalwaysacceptsaslegal. Normally,ispellwillacceptall1-characterwordsaslegal,whichisequivalenttospecifying"−W 1."(ThedefaultforthisswitchisactuallycontrolledbytheMINWORDinstallationoption,soit mayvaryatyourinstallation.)Ifyouwantallwordstobecheckedagainstthedictionary,regardlessoflength,youmightwanttospecify"−W0."Ontheotherhand,ifyourdocumentspecifies alotofthree-letteracronyms,youwouldspecify"−W3"toacceptallwordsofthreelettersor less.Regardlessofthesettingofthisoption,ispellwillonlygeneratewordsthatareinthedictionaryassuggestedreplacementsforwords;thispreventsthelistfrombecomingtoolong.Obviously,thisoptioncanbeverydangerous,sinceshortmisspellingsmaybemissed.Ifyouusethis optionalot,youshouldprobablymakealastpasswithoutitbeforeyoupublishyourdocument, toprotectyourselfagainsterrors. The−Toptionisusedtospecifyadefaultformattertypeforuseingeneratingstringcharacters. Thisswitchoverridesthedefaulttypedeterminedfromthefilename.Thetypeargumentmaybe eitheroneoftheuniquenamesdefinedinthelanguageaffixfile(e.g.,nroff)orafilesuffixincludingthedot(e.g.,.tex).Ifno−Toptionappearsandnotypecanbedeterminedfromthefile name,thedefaultstringcharactertypedeclaredinthelanguageaffixfilewillbeused. The−lor"list"optiontoispellisusedtoproducealistofmisspelledwordsfromthestandard input. The−aoptionisintendedtobeusedfromotherprogramsthroughapipe.Inthismode,ispell printsaone-lineversionidentificationmessage,andthenbeginsreadinglinesofinput.Foreach inputline,asinglelineiswrittentothestandardoutputforeachwordcheckedforspellingonthe line.Ifthewordwasfoundinthemaindictionary,oryourpersonaldictionary,thenthelinecontainsonlya’*’.Ifthewordwasfoundthroughaffixremoval,thenthelinecontainsa’+’,a space,andtherootword.Ifthewordwasfoundthroughcompoundformation(concatenationof twowords,controlledbythe−Coption),thenthelinecontainsonlya’−’. Ifthewordisnotinthedictionary,buttherearenearmisses,thenthelinecontainsan’&’,a space,themisspelledword,aspace,thenumberofnearmisses,thenumberofcharactersbetween thebeginningofthelineandthebeginningofthemisspelledword,acolon,anotherspace,anda listofthenearmissesseparatedbycommasandspaces.Followingthenearmisses(andidentified onlybythecountofnearmisses),ifthewordcouldbeformedbyadding(illegal)affixestoa knownroot,isalistofsuggestedderivations,againseparatedbycommasandspaces.Ifthereare nonearmissesatall,thelineformatisthesame,exceptthatthe’&’isreplacedby’?’(andthe near-misscountisalwayszero).Thesuggestedderivationsfollowingthenearmissesareinthe form: [prefix+]root[-prefix][-suffix][+suffix] (e.g.,"re+fry-y+ies"toget"refries")whereeachoptionalpfxandsfxisastring.Also,eachnear missorguessiscapitalizedthesameastheinputwordunlesssuchcapitalizationisillegal;inthe lattercaseeachnearmissiscapitalizedcorrectlyaccordingtothedictionary. Finally,iftheworddoesnotappearinthedictionary,andtherearenonearmisses,thentheline containsa’#’,aspace,themisspelledword,aspace,andthecharacteroffsetfromthebeginning local 4 ISPELL(1) ISPELL(1) oftheline.Eachsentenceoftextinputisterminatedwithanadditionalblankline,indicating thatispellhascompletedprocessingtheinputline. Theseoutputlinescanbesummarizedasfollows: OK:* Root:+<root> Compound: − Miss:&<original><count><offset>:<miss>,<miss>,...,<guess>,... Guess:?<original>0<offset>:<guess>,<guess>,... None:#<original><offset> Forexample,adummydictionarycontainingthewords"fray","Frey","fry",and"refried"might producethefollowingresponsetothecommand"echo’frqyrefries|ispell-a-m-d./test.hash": (#)InternationalIspellVersion3.0.05(beta),08/10/91 &frqy30:fray,Frey,fry &refries15:refried,re+fry-y+ies Thismodeisalsosuitableforinteractiveusewhenyouwanttofigureoutthespellingofasingle word. The−Aoptionworksjustlike−a,exceptthatifalinebeginswiththestring"&IncludeFile&", therestofthelineistakenasthenameofafiletoreadforfurtherwords.Inputreturnstothe originalfilewhentheincludefileisexhausted.Inclusionmaybenesteduptofivedeep.Thekey stringmaybechangedwiththeenvironmentvariableINCLUDESTRING(theampersands,if any,mustbeincluded). Wheninthe−amode,ispellwillalsoacceptlinesofsinglewordsprefixedwithanyof’*’,’&’, ’@’,’+’,’-’,’˜ ’,’#’,’!’,’%’,or’ˆ ’.Alinestartingwith’*’tellsispelltoinsertthewordintothe user’sdictionary(similartotheIcommand).Alinestartingwith’&’tellsispelltoinsertanalllowercaseversionofthewordintotheuser’sdictionary(similartotheUcommand).Alinestartingwith’@’causesispelltoacceptthiswordinthefuture(similartotheAcommand).Aline startingwith’+’,followedimmediatelybytexornroffwillcauseispelltoparsefutureinput accordingthesyntaxofthatformatter.Alineconsistingsolelyofa’+’willplaceispellin TeX/LaTeXmode(similartothe−toption)and’-’returnsispelltonroff/troffmode(butthese commandsareobsolete).However,stringcharactertypeisnotchanged;the’˜ ’commandmustbe usedtodothis.Alinestartingwith’˜ ’causesispelltosetinternalparameters(inparticular,the defaultstringcharactertype)basedonthefilenamegivenintherestoftheline.(Afilesuffixis sufficient,buttheperiodmustbeincluded.Insteadofafilenameorsuffix,auniquename,as listedinthelanguageaffixfile,maybespecified.)However,theformatterparsingisnotchanged; the’+’commandmustbeusedtochangetheformatter.Alineprefixedwith’#’willcausethe personaldictionarytobesaved.Alineprefixedwith’!’willturnontersemode(seebelow),and alineprefixedwith’%’willreturnispelltonormal(non-terse)mode.Anyinputfollowingthe prefixcharacters’+’,’-’,’#’,’!’,or’%’isignored,asisanyinputfollowingthefilenameona’˜ ’ line.Toallowspell-checkingoflinesbeginningwiththesecharacters,alinestartingwith’ˆ ’has thatcharacterremovedbeforeitispassedtothespell-checkingcode.Itisrecommendedthatpro-grammaticinterfacesprefixeverydatalinewithanuparrowtoprotectthemselvesagainstfuture changesinispell. Tosummarizethese: *Addtopersonaldictionary @Acceptword,butleaveoutofdictionary #Savecurrentpersonaldictionary local 5 ISPELL(1) ISPELL(1) ˜ Setparametersbasedonfilename +EnterTeXmode -ExitTeXmode !Entertersemode %Exittersemode ˆ Spell-checkrestofline Intersemode,ispellwillnotprintlinesbeginningwith’*’,’+’,or’−’,allofwhichindicatecorrectwords.Thissignificantlyimprovesrunningspeedwhenthedrivingprogramisgoingtoignore correctwordsanyway. The−soptionisonlyvalidinconjunctionwiththe−aor−Aoptions,andonlyonBSD-derived systems.Ifspecified,ispellwillstopitselfwithaSIGTSTPsignalaftereachlineofinput.It willnotreadmoreinputuntilitreceivesaSIGCONTsignal.Thismaybeusefulforhandshakingwithcertaintexteditors. The−foptionisonlyvalidinconjunctionwiththe−aor−Aoptions.If−fisspecified,ispell willwriteitsresultstothegivenfile,ratherthantostandardoutput. The−voptioncausesispelltoprintitscurrentversionidentificationonthestandardoutputand exit.Iftheswitchisdoubled,ispellwillalsoprinttheoptionsthatitwascompiledwith. The−c,−e[1-4],and−Doptionsofispell,areprimarilyintendedforusebythemunchlistshell script.The−cswitchcausesalistofwordstobereadfromthestandardinput.Foreachword, alistofpossiblerootwordsandaffixeswillbewrittentothestandardoutput.Someoftheroot wordswillbeillegalandmustbefilteredfromtheoutputbyothermeans;themunchlistscript doesthis.Asanexample,thecommand: echoBOTHER|ispell-c produces: BOTHERBOTHE/RBOTH/R The−eswitchisthereverseof−c;itexpandsaffixflagstoproducealistofwords.Forexample, thecommand: echoBOTH/R|ispell-e produces: BOTHBOTHER Anoptionalexpansionlevelcanalsobespecified.Alevelof1(−e1)isthesameas−ealone.A levelof2causestheoriginalroot/affixcombinationtobeprependedtotheline: BOTH/RBOTHBOTHER Alevelof3causesmultiplelinestobeoutput,oneforeachgeneratedword,withtheoriginal root/affixcombinationfollowedbytheworditcreates: BOTH/RBOTH BOTH/RBOTHER Alevelof4causesafloating-pointnumbertobeappendedtoeachofthelevel-3lines,givingthe ratiobetweenthelengthoftherootandthetotallengthofallgeneratedwordsincludingtheroot: BOTH/RBOTH2.500000 BOTH/RBOTHER2.500000 Finally,the−Dflagcausestheaffixtablesfromthedictionaryfiletobedumpedtostandardoutput. Unlessyoursystemadministratorhassuppressedthefeaturetosavespace,ispellisawareofthe correctcapitalizationsofwordsinthedictionaryandinyourpersonaldictionary.Aswellas local 6 ISPELL(1) ISPELL(1) recognizingwordsthatmustbecapitalized(e.g.,George)andwordsthatmustbeall-capitals (e.g.,NASA),itcanalsohandlewordswith"unusual"capitalization(e.g.,"ITCorp"or"TeX"). Ifawordiscapitalizedincorrectly,thelistofpossibilitieswillincludeallacceptablecapitalizations.(Morethanonecapitalizationmaybeacceptable;forexample,mydictionarylistsboth "ITCorp"and"ITcorp".) Normally,thisfeaturewillnotcauseyousurprises,butthereisonecircumstanceyouneedtobe awareof.Ifyouuse"I"toaddawordtoyourdictionarythatisatthebeginningofasentence (e.g.,thefirstwordofthisparagraphif"normally"werenotinthedictionary),itwillbemarked as"capitalizationrequired".Asubsequentusageofthiswordwithoutcapitalization(e.g.,the quotedwordintheprevioussentence)willbeconsideredamisspellingbyispell,anditwillsuggestthecapitalizedversion.Youmustthencomparetheactualspellingsbyeye,andthentype "I"toaddtheuncapitalizedvarianttoyourpersonaldictionary.Youcanavoidthisproblemby using"U"toaddtheoriginalword,ratherthan"I". Therulesforcapitalizationareasfollows: (1)Anywordmayappearinallcapitals,asinheadings. (2)Anywordthatisinthedictionaryinall-lowercaseformmayappeareitherinlowercaseor capitalized(asatthebeginningofasentence). (3)Anywordthathas"funny"capitalization(i.e.,itcontainsbothcasesandthereisan uppercasecharacterbesidesthefirst)mustappearexactlyasinthedictionary,exceptas permittedbyrule(1).Ifthewordisacceptableinall-lowercase,itmustappearthusina dictionaryentry. buildhash Thebuildhashprogrambuildshasheddictionaryfilesforlaterusebyispell.Therawwordlist (withaffixflags)isgivenindict-file,andtheaffixflagsaredefinedbyaffix-file.Thehashedout-putiswrittentohash-file.Theformatsofthetwoinputfilesaredescribedinispell(4).The−s (silent)optionsuppressestheusualstatusmessagesthatarewrittentothestandarderrordevice. munchlist Themunchlistshellscriptisusedtoreducethesizeofdictionaryfiles,primarilypersonaldictionaryfiles.Itisalsocapableofcombiningdictionariesfromvarioussources.Thegivenfilesare read(standardinputifnoargumentsaregiven),reducedtoaminimalsetofrootsandaffixesthat willmatchthesamelistofwords,andwrittentostandardoutput. Inputformunchlistcontainsofrawwords(e.gfromyourpersonaldictionaryfiles)orrootand affixcombinations(probablygeneratedinearliermunchlistruns).Eachwordorroot/affixcombinationmustbeonaseparateline. The−D(debug)optionleavestemporaryfilesaroundunderstandardnamesinsteadofdeleting them,sothatthescriptcanbedebugged.Warning:thisoptioncaneatupanenormousamount oftemporaryfilespace. The−v(verbose)optioncausesprogressmessagestobereportedtostderrsoyouwon’tgetnervousthatmunchlisthashung. Ifthe−s(strip)optionisspecified,wordsthatareinthespecifiedhash-fileareremovedfromthe wordlist.Thiscanbeusefulwithpersonaldictionaries. The−loptioncanbeusedtospecifyanalternateaffix-fileformunchingdictionariesinlanguages otherthanEnglish. The−coptioncanbeusedtoconvertdictionariesthatwerebuiltwithanolderaffixfile,without riskofaccidentallyintroducingunintendedaffixcombinationsintothedictionary. The−Toptionallowsdictionariestobeconvertedtoacanonicalstring-characterformat.The suffixspecifiedislookedupintheaffixfile(−lswitch)todeterminethestring-characterformat usedfortheinputfile;theoutputalwaysusesthecanonicalstring-characterformat.Forexample, adictionarycollectedfromTeXsourcefilesmightbeconvertedtocanonicalformatbyspecifying local 7 ISPELL(1) ISPELL(1) −Ttex. The−woptionispassedontoispell. findaffix Thefindaffixshellscriptisanaidtowritersofnewlanguagedescriptionsinchoosingaffixes.The givendictionaryfiles(standardinputifnonearegiven)areexaminedforpossibleprefixes(−p switch)orsuffixes(−sswitch,thedefault).Eachcommonly-occurringaffixispresentedalong withacountofthenumberoftimesitappearsandanestimateofthenumberofbytesthatwould besavedinadictionaryhashfileifitwereaddedtothelanguagetable.Onlyaffixesthatgeneratelegalroots(foundintheoriginalinput)arelisted. Ifthe"-c"optionisnotgiven,theoutputlinesareinthefollowingformat: strip/add/count/bytes wherestripisthestringthatshouldbestrippedfromarootwordbeforeaddingtheaffix,addis theaffixtobeadded,countisacountofthenumberoftimesthatthisstrip/addcombination appears,andbytesisanestimateofthenumberofbytesthatmightbesavedintherawdictionaryfileifthiscombinationisaddedtotheaffixfile.Thefieldseparatorintheoutputwillbethe tabcharacterspecifiedbythe-tswitch;thedefaultisaslash("/"). Ifthe−c("cleanoutput")optionisgiven,theappearanceoftheoutputismadevisuallycleaner (buthardertopost-process)bychangingitto: -strip+add<tab>count<tab>bytes wherestrip,add,count,andbytesareasbefore,and<tab>representstheASCIItabcharacter. Themethodusedtogeneratepossibleaffixeswillalsogeneratelongeraffixeswhichhavecommon headersortrailers.Forexample,thetwowords"moth"and"mother"willgeneratenotonlythe obvioussubstitution"+er"butalso"-h+her"and"-th+ther"(andpossiblyevenlongerones, dependingonthevalueofmin).Topreventclutteringtheoutputwithsuchaffixes,anyaffixpair thatsharesacommonheader(or,forprefixes,trailer)stringlongerthanelimcharacters(default 1)willbesuppressed.Youmaywanttoset"elim"toavaluegreaterthan1ifyourlanguagehas stringcharacters;usuallytheneedforthisparameterwillbecomeobviouswhenyouexaminethe outputofyourfindaffixrun. Normally,theaffixesaresortedaccordingtotheestimateofbytessaved.The−fswitchmaybe usedtocausetheaffixestobesortedbyfrequencyofappearance. Tosaveoutputfilespace,affixeswhichoccurfewerthan10timesareeliminated;thislimitmay bechangedwiththe−lswitch.The−Mswitchspecifiesamaximumaffixlength(default8). Affixeslongerthanthiswillnotbereported.(Thissavesontemporarydiskspaceandmakesthe scriptrunfaster.) Affixeswhichgeneratestemsshorterthan3charactersaresuppressed.(Astemisthewordafter thestripstringhasbeenremoved,andbeforetheaddstringhasbeenadded.)Thisreducesboth therunningtimeandthesizeoftheoutputfile.Thislimitmaybechangedwiththe−mswitch. Theminimumstemlengthshouldonlybesetto1ifyouhavealotoffreetimeanddiskspace(in therangeofmanydaysandhundredsofmegabytes). Thefindaffixscriptrequiresanon-blankfield-separatorcharacterforinternaluse.Normally,this characterisaslash("/"),butiftheslashappearsasacharacterintheinputwordlist,adifferent charactercanbespecifiedwiththe−tswitch. Ispelldictionariesshouldbeexpandedbeforebeingfedtofindaffix;inaddition,charactersthat arenotintheEnglishalphabet(ifany)shouldbetranslatedtolowercase. tryaffix Thetryaffixshellscriptisusedtoestimatetheeffectivenessofaproposedprefix(−pswitch)or suffix(−sswitch,thedefault)withagivenexpanded-file.Onlyoneaffixcanbetriedwitheach executionoftryaffix,althoughmultipleargumentscanbeusedtodescribevaryingformsofthe sameaffixflag(e.g.,theDflagforEnglishcanaddeitherDorEDdependingonwhethera local 8 ISPELL(1) ISPELL(1) trailingEisalreadypresent).Eachwordintheexpandeddictionarythatends(orbegins)with thechosensuffix(orprefix)hasthatsuffix(prefix)removed;thedictionaryisthensearchedfor rootwordsthatmatchthestrippedword.Normally,allmatchingrootsarewrittentostandard output,butifthe−c(count)flagisgiven,onlyastatisticalsummaryoftheresultsiswritten. Thestatisticsgivenareacountofwordstheaffixpotentiallyappliestoandanestimateofthe numberofdictionarybytesthataflagusingtheaffixwouldsave.Theestimatewillbehighifthe flaggenerateswordsthatarecurrentlygeneratedbyotheraffixflags(e.g.,inEnglish,batherscan begeneratedbyeitherbath/Xorbather/S). Thedictionaryfile,expanded-file,mustalreadybeexpanded(usingthe−eswitchofispell)and sorted,andthingswillusuallyworkbestifuppercasehasbeenfoldedtolowerwith’tr’. Theaffixargumentsarethingstobestrippedfromthedictionaryfiletoproducetrialroots:for English,con(prefix)anding(suffix)areexamples.Theadditionpartsoftheargumentareletters thatwouldhavebeenstrippedofftherootbeforeaddingtheaffix.Forexample,inEnglishthe affixingnormallystripseforwordsendinginthatletter(e.g.,likebecomesliking)sowemight run: tryaffixinging+e tocoverbothcases. Alloftheshellscriptscontaindocumentationascommentaryatthebeginning;sometimesthese commentscontainusefulinformationbeyondthescopeofthismanualpage. ItispossibletoinstallispellinsuchawayastoonlysupportASCIIrangetextifdesired. icombine Theicombineprogramisahelperformunchlist.Itreadsalistofwordsindictionaryformat (rootsplusflags)fromthestandardinput,andproducesareducedlistonstandardoutputwhich combinescommonrootsfoundonadjacententries.Identicalrootswhichhavedifferingflagswill havetheirflagscombined,androotswhichhavedifferingcapitalizationswillbecombinedinaway whichonlypreservesimportantcapitalizationinformation.Theoptionalaff-filespecifiesalan-guagefilewhichdefinesthecharactersetsusedandthemeaningsofthevariousflags.The−T switchcanbeusedtoselectamongalternativestringcharactertypesbygivingadummysuffix thatcanbefoundinanaltstringtypestatement. ijoin Theijoinprogramisare-implementationofjoin(1)whichhandleslonglinesand8-bitcharacters correctly.The−sswitchspecifiesthatthesort(1)programusedtopreparetheinputtoijoin usessignedcomparisonson8-bitcharacters;the−uswitchspecifiesthatsort(1)usesunsigned comparisons.Allotheroptionsandbehaviorsofjoin(1)areduplicatedasexactlyaspossible basedonthemanualpage,exceptthatijoinwillnothandlenewlineasafieldseparator.Seethe join(1)manualpageformoreinformation. ENVIRONMENT DICTIONARY Defaultdictionarytouse,ifno−dflagisgiven. WORDLIST Personaldictionaryfilename INCLUDESTRING Codeforfileinclusionunderthe−Aoption TMPDIR Directoryusedforsomeofmunchlist’stemporaryfiles FILES !!LIBDIR!!/!!DEFHASH!! Hasheddictionary(maybefoundinsomeotherlocaldirectory,dependingonthesystem). local 9 ISPELL(1) ISPELL(1) !!LIBDIR!!/!!DEFLANG!! Affix-definitionfileformunchlist /usr/dict/web2or/usr/dict/words FortheLookupfunction(dependingontheWORDScompilationoption). $HOME/.ispellhashfile User’sprivatedictionary .ispellhashfile Directory-specificprivatedictionary SEEALSO spell(1),egrep(1),look(1),join(1),sort(1),sq(1L),tib(1L),ispell(4L),english(4L) BUGS Ittakesseveraltomanysecondsforispelltoreadinthehashtable,dependingonsize. Whenalloptionsareenabled,ispellmaytakeseveralsecondstogeneratealltheguessesatcorrectionsforamisspelledword;onslowermachinesthistimeislongenoughtobeannoying. Thehashtableisstoredasaquarter-megabyte(orlarger)array,soaPDP-11or286versiondoes notseemlikely. Ispellshouldunderstandmoretroffsyntax,anddealmoreintelligentlywithcontractions. Althoughsmallpersonaldictionariesaresortedbeforetheyarewrittenout,theorderofcapitalizationsofthesamewordissomewhatrandom. Whenthe−xflagisspecified,ispellwillunlinkanyexisting.bakfile. Therearetoomanyflags,andmanyofthemhavenon-mnemonicnames. Munchlistdoesnotdealverygracefullywithdictionarieswhichcontain"non-word"characters. Suchcharactersoughttobedeletedfromthedictionarywithawarningmessage. Findaffixandmunchlistrequiretremendousamountsoftemporaryfilespaceforlargedictionaries. TheydorespecttheTMPDIRenvironmentvariable,sothisspacecanberedirected.However,a lotofthetemporaryspaceneededisforsorting,soTMPDIRisonlyapartialhelponsystems withanuncooperativesort(1).("Cooperative"isdefinedasacceptingtheundocumented-T switch).Atitspeakusage,munchlisttakes10to40timestheoriginaldictionary’ssizeinKb. (Thelargerratioisfordictionariesthatalreadyhaveheavyaffixuse,suchastheonedistributed withispell).Munchlistisalsoveryslow;munchinganormal-sizeddictionary(15Kroots,45K expandedwords)takesaroundanhouronasmallworkstation.(Mostofthistimeisspentin sort(1),andmunchlistcanrunmuchfasteronmachinesthathaveamoremodernsortthatmakes betteruseofthememoryavailabletoit.)Findaffixisevenworse;thesmallestEnglishdictionary cannotbeprocessedwiththisscriptinamere50Kboffreespace,andevenafterspecifying switchestoreducethetemporaryspacerequired,thescriptwillrunforover24hoursonasmall workstation. AUTHOR PaceWillisson(pace@mit-vax),1983,basedonthePDP-10assemblyversion.Thatversionwas writtenbyR.E.Gorinin1971,andlaterrevisedbyW.E.Matson(1974)andW.B.Ackerman (1978). Collected,revised,andenhancedfortheUsenetbyWaltBuehring,1987. Table-drivenmulti-lingualversionbyGeoffKuenning,1987-88. LargedictionariesprovidedbyBobDevine(vianet!devine). local 10 ISPELL(1) ISPELL(1) Acompletelistofcontributorsistoolargetolisthere,butisdistributedwiththeispellsourcesin thefile"Contributors". VERSION TheversionofispelldescribedbythismanualpageisInternationalIspellVersion3.1.00, 10/08/93. local 11