🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #17482

Auto-generated keywords in INN 1.5.1

#17482
From: Karl Kleinpaste
Date: Fri, 02 May 1997 00:00
97 lines
5645 bytes
I've been toying with INN 1.5{b2,.1} quite a bit lately, and one
interest of mine has to do with wanting an ability to do article
scoring based on actual article content, but preferably without having
to do full body searches of the text.  Wouldn't it be nice if some
bits of article content could be propagated into (something which
might as well be) the header, in order for the newsreader to be able
to notice interesting stuff, and score up or down appropriately?

For example, you're reading rec.photo.*, and you want to notice every
reference to Nikon and Canon, regardless of whether they're mentioned
in the header.  Or, in my case, I want to catch every reference to
Gnus in news.software.readers.  (Since deploying this, I've discovered
a _lot_ more Gnus references in n.s.r than I had realized were there.)

The Keywords: and Summary: headers have been defined for eons for such
purposes, but they're utterly unused due to lack of automated
generation, and are unscorable without full searches because they
haven't been included in overviews.

To this end, I've worked up some code for innd, whereby every single
article accepted is shoveled through a keyword generator during
overview processing, if a new 9th entry "Keywords:full" has been added
to overview.fmt.  This new keyword set is combined with any possible
user-supplied Keywords: field (with a magic cookie separator) and
shoveled into overviews with the rest of the usual data.

It is not a mild-mannered patch, as resource utilization goes.  The
usual bottleneck of news servers is I/O bandwidth, not CPU, which is
fortunate, because this patch will eat quite a bit of additional CPU
in the process of pushing articles around.  The reason is that it is
doing word histogram analysis, with regexp stopword elimination.  But
the idea here is that we will trade extra CPU utilization in order to
avoid full body searches by clients, which hurt I/O badly.

The goal is simple: Scoring on the usual headers is not nearly always
adequate to getting the right articles in front of the user, because
[a] subjects change underneath Subject: headers entirely,
[b] multiple discussions splinter underneath a single Subject:, and
[c] References: can maintain connections between different subthreads
long after the actual content of the discussion has ceased to be
related.

So the mechanism I'm trying to provide is similarly simple: Analyze
articles for the "important" keywords they contain.  That is, make a
working copy of the article text, slice out punctuation, identify
whitespace-separated words, sort words, count occurrences, sort
counts, and finally eliminate stopwords.  The result is a frequency-
sorted but unquantified histogram list of words which could go into a
Keywords: header.

It would be rude actually to add (or modify an existing) Keywords:
header, and so what is done is to add this new data to the overviews
only.  This still makes the data available to the newsreader for
scoring purposes, and the fact of keywords being in overviews but not
necessarily in the actual header has yet to be found disturbing to any
reader I've checked, which is admittedly just a couple.

I would be interested in seeing anyone else toy around with this
patch, to see if it could be improved, especially to reduce its CPU
consumption, because it is piggish, to be kind.  Again, given the
usual I/O-bound nature of a news server, that doesn't strike me as all
that hideous, but it still ought to be toned down if possible.

I also have modifications to Gnus which support interactive generation
of user-supplied Keywords: header, using the same algorithm (but
generating a deliberately short list of words), and scoring on them
when found via XOVER.  These changes have been sent to Lars, but they
haven't been integrated into a released Gnus yet.  If anyone wants
those, to go along with this server patch, please drop me a note.

BTW, if anyone cares...As of 1.5.1, "Keywords:full" can be added to
overview.fmt anyway, which will get user-supplied Keywords: headers
into overviews.  (Previous versions could not do this, because
"keywords" was not in ARTheaders[] in innd/art.c.)  I asked some time
ago whether anyone else had ever deployed a 9th field in overviews,
and got back stunning silence, so I feel no guilt at assuming this
position for Keywords:.

Please see...
	http://pocari-sweat.jprc.com/~karl/linux/README.keywords
	http://pocari-sweat.jprc.com/~karl/linux/Keywords.patch
...and please send any changes back my way.  James Brister is aware of
what I'm doing here, and I am due to send him a final version of the
patch before too long.

It would be particularly interesting to me if folks could try it out
with substantially smaller KEYLIMIT values, to see if the resulting
proportionate reduction in regex calls will speed things up
substantially without losing interesting words in the set.  My own
installation needs a large KEYLIMIT because of work being done by
others which requires as much keyword data as possible.

cheers,
--karl

Technical Details
Message-ID: <vxkzpudbnb4.fsf@pocari-sweat.jprc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <vxkzpudbnb4.fsf@pocari-sweat.jprc.com>
Subject: Auto-generated keywords in INN 1.5.1
Date: Fri, 02 May 1997 00:00:00 +0000
From: Karl Kleinpaste <karl@jprc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 238955778
Organization: Justsystem Pittsburgh Research Center
Newsgroups: news.software.nntp