Path: utzoo!attcan!uunet!spool2.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsl!npn From: npn@cbnewsl.att.com (nils-peter.nelson) Newsgroups: comp.text Subject: Re: incorrect hyphenation in (old) troff Summary: Unpredictability of hyphenation errors Message-ID: <1991Jan24.223645.16630@cbnewsl.att.com> Date: 24 Jan 91 22:36:45 GMT References: Organization: AT&T Bell Laboratories Lines: 23 In article , fitz@mml0.meche.rpi.edu (Brian Fitzgerald) writes: > Is there any way to predict incorrect hyphenation in troff? > > How about a shell script (a little like spell) that compares a "stop > list" to the text and perhaps prints warnings or generates ".hw" > requests? > > I am currently using the troff that came with SunOS 4.0.3. > > Brian Fitzgerald Sorry, but not so easy. The source code has a 19,000 byte table of suffixes, and there is a binary encoded digram table. Neither is user-accessible in the binary code. We test the algorithm by forcing the line length to something wee (.2 inches), run a dictionary through it, and compare to a previously hyphenated dictionary. For DWB 3.2 we are adding the TeX hyphenation algorithm as a user-selectable alternative. Seems to be more accurate, if slower and larger, but may not be any more predictable. If it's any consolation, either algorithm does better than most people.