Deroff removes roff constructs from documents for the purpose of indexing, spell checking etc. My own implementation is a little smarter than traditional implementations, because it knows about certain -man and -mm macros. It is able to generate a word list for spell checking tools or omit headers for sentence analysis tools.
The source is available as a GNU zipped tape archive. A win32 port is available from gnuwin32.sourceforge.net.