[comp.unix.xenix] Unix/Xenix Software to make an Index

hann@rd1632.UUCP (Ed Hann) (11/17/86)

	Does anybody know about a tool that runs under XENIX (UNIX) that
creates indexes for publications?  (Not a permuted index, but the kind
you find in the back of books that list key words and phrases.)  We would
prefer a commercial, i.e. supported, product but we'll give anything a
look.

Please send responses to:

	Fred Stock
	NCR Corporation
	Systems Engineering Retail Advanced Development Group
	...!ncr-sd!ncrlnk!rd1632!seradg!fred

mark@cogent.UUCP (Mark Steven Jeghers) (11/18/86)

In article <127@rd1632.UUCP> hann@rd1632.UUCP (Ed Hann) writes:
>
>	Does anybody know about a tool that runs under XENIX (UNIX) that
>creates indexes for publications?  (Not a permuted index, but the kind
>you find in the back of books that list key words and phrases.)  We would
>prefer a commercial, i.e. supported, product but we'll give anything a
>look.
>
>	Fred Stock
>	...!ncr-sd!ncrlnk!rd1632!seradg!fred

We need such a beast as well.  We want to be able to take a large 
nroff source document, imbed index flags in the text, and have those
flags detected during formatting so that an index can be generated as a 
side effect.  We also need an index by outline heading levels, but I am
pretty sure that nroff and one of it's macros can do that.

Please also drop a line to ptsfa!cogent!mark if you know of any
pre-processor or whatever that will do this.

Thanx in advance.
-- 
+----------------------------------------------------------------------------+
|     Mark Steven Jeghers - the living incarnation of "Deep-Thought"         |
|     ("You won't like the answer ... you didn't ask it very well.")         |
|                                                                            |
|     {ihnp4,cbosgd,lll-lcc,lll-crg}|{dual,ptsfa}!cogent!mark                |
|            ^^^^^^-------recommended------^^^^^                             |
|                                                                            |
| Cogent Software Solutions can not be held responsible for anything said    |
| by the above person since they have no control over him in the first place |
+----------------------------------------------------------------------------+

osbook@sdcsvax.UCSD.EDU (osbook) (11/19/86)

Does anyone know where I can find out about making
permuted quick indexes?

Thanks in advance
Harley Hahn

rbl@nitrex.UUCP ( Dr. Robin Lake ) (11/19/86)

There have been several requests regarding automatic generation of indices
from text.  I did it once, about 10 years ago, when UNIX was younger and more
forgiving (as was I!).  The logic of the program goes as follows:

In the early (V6)
days of UNIX, the tutorial on C included an example program called "tree".
It built a binary tree of words, counted the occurrance of each word and
then (at EOF on stdin) printed an alphabetical list of words and their
occurrances.  A "straightforward" modification of this program 
involves changing the data structure of each tree node to allow a list of
page numbers in place of the integer count of occurrances.  As the incoming
text is scanned, pick up the current page number.  As a word occurs, enter it
into the binary tree (if it's new) and add the page number to that word's
page number list.  At the EOF, traverse the tree, print the words and their 
associated page numbers.  Voila!  An index!

The problem came when we ran out of memory on the PDP-11/45 we used then (at
a very different institution).  We never took the time to work out the problem
of storing (sub)-trees onto disk files and then combining them at the EOF.
(Sounds like a great homework assignment for a Data Structures course!).

Source (highly commented) to tree.c  available via e-mail on request.
If enough (N > ?) requests come in, I'll post it.
Sorry, but the indexing version is not available, having gone to bit heaven
years ago.

Questions to:
Robin Lake
Standard Oil R&D
(216)-581-5976
cbatt!nitrex!rbl
dexvax!cwruecmp!nitrex!rbl