Article View: news.software.readers
Article #212926Re: [Dialog] Compound Expression Scoring
From: Oliver Cromm
Date: Tue, 18 Dec 2007 23:30
Date: Tue, 18 Dec 2007 23:30
45 lines
3123 bytes
3123 bytes
* MikeV06 wrote:
> Is it possible to score on two fields? I would like to compare the domain
> part of From with Message-ID and set a score if they are equal.
>
> From: madding@UHOHR.COM.UA
> Message-ID: <ed540117.a3c8a1d6@UHOHR.COM.UA>
>
> Both have @UHOHR.COM.UA
>
> or
>
> From: Ramzi Hamza Dawran <electron@recover.com>
> Message-ID: <P2bKWBR3hZGsHViotI@recover.com>
>
> Both have @recover.com
For any domain part? What an exotic idea.
The only ways I could think of are
- by script
- with a fairly complex and heavy regular expression, but I haven't used
regular expressions of that complexity in Dialog. I'm not even sure if
back-references work. Let me try that...
The following seems to make no mistakes, at least, in my small sample of
about a thousand messages from one group, though I doubt it will catch
all instances:
=+nnn Header: {(?m)^From: [^@]+(@[^>\"$]+)>\s*$.*^Message-ID: [^@]+\1>\s*$}
=+nnn Header: {(?m)^Message-ID: [^@]+(@[^>$]+)>\s*$.*^From: [^@]+\1>\s*$}
It works if people use the <...@...> format in both From and Message-ID
header, those parts are not encoded, the headers are not folded etc.
I tried to make it more general, but I didn't find a way to stop Dialog
from matching References or other headers without inserting explicit
line ends. OTOH, the rigidity helps efficiency - this version took 5
seconds for 1000 posts, while some other versions I tried took 30
seconds.
--
Java is kind of like kindergarten. There are lots of rules you have to
remember. If you don't follow them, the compiler makes you sit in the
corner until you do. - Don Raab
Technical Details
Message-ID:
<1k8g5gv9r4v8w.dlg@mid.crommatograph.info>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!green.octanews.net!news-out.octanews.net!indigo.octanews.net!auth.brown.octanews.com.POSTED!not-for-mailReferences:
<429yh4yrka7e.dlg@mycomputer06.invalid.com>Show Full Headers
Complete Article Headers
Message-ID: <1k8g5gv9r4v8w.dlg@mid.crommatograph.info>
Subject: Re: [Dialog] Compound Expression Scoring
Date: Tue, 18 Dec 2007 18:30:14 -0500
From: Oliver Cromm <lispamateur@yahoo.de>
References: <429yh4yrka7e.dlg@mycomputer06.invalid.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!green.octanews.net!news-out.octanews.net!indigo.octanews.net!auth.brown.octanews.com.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.1de
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Organization: École Nationale Supérieure de la Bananologie
X-Face: .f:ZE>c\~9oJ+1nK#>ntSHOQS~4x"Qx2m(<D<@p$G"tzb1lgWLUGY.zApKa@VL_?d$r(8=?VjrD9=uY:x!+H=hvj58Uw7)Y9<:KMYD.+^~#qMpeg2rvt`{#2a~7YoyFaFaBEdo4.TJzBqgtCZZ:mku4J|hey}DE}_"z(rl0N)\Pxh*0$"3B2mr\01&YPY7WJ:2kSe'I#PqiTxs1s49!S#W85'\zMXy*wRgD,,k.=4:3M{(P"i6S;
\az~ut3z`; ?*Y;
&]11<(EPF-SN`|3PhyL%~AuZpoFjjE_oM1`znHPq_?uib2WXwE+q@m),cLq~B$r^5uO]u6?CEecn=%xsDXNVa(1DX.)O(
Cancel-Lock: sha1:OYdFjxFi/YcC/S+3jYKkIUcLfjc=
Lines: 45
NNTP-Posting-Date: 18 Dec 2007 17:31:03 CST
X-Complaints-To: abuse@octanews.net
X-Original-Bytes: 2864