🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #74693

Fixing badly wrapped text (Was: Re: Multilevel colouring of quoted text...)

#74693
From: Robert Amesz
Date: Thu, 29 Mar 2001 22:53
40 lines
2900 bytes
J.B. Moreno wrote:

> [Snip]
>
>OTOH, if you have a check box or menu that toggles the view, it may
>not really matter that it gets it wrong 10% of the time if it
>improves things dramatically enough the other 90% of the time.

Well, there's already the "raw" view, which would, presumably, leave 
badly wrapped text alone. Anyway, badly wrapped lines have become so 
rampant in some groups that it really interrupts the flow of reading. 
Depending on the circumstances (and I have done a little experimenting 
with this myself) I think an accuracy of 90% shouldn't be hard to get.

Most of the time it is quite easy to be virtually certain there's a bad 
wrap, like this one (the most common case):

>sdfs skd ksdk skdf sdfsdskksd fkdskdkfs skdk skdk skdfkskdfs
fhdssf
>fsd f dkfsdkfk fkfdfdd kd dkfdkfdk dskfk sdksusue ssjdjsj sj

In this case the question to ask is: if the second line were appended 
to the first one, would it be too long? And also - strangely enough 
*not* too long, since the line (w/o the quote prefix) supposedly wasn't 
wrapped by the previous poster.

You can choose two fixed cutoff-values, e.g. 72 and 79, and test if the 
length of the concatenation of line 1 and 2 [1] is somewhere in that 
interval we decide a bad wrap occurred.

The trick is choosing the cutoff values. Those should be good, but 
conservative estimates (conservative, in the sense that it shouldn't be 
too low, and that makes it a bit trickier) of the maximum linelengths 
of the unquoted amd quoted poster. You could use the observed 
linelengths to refine your estimates, which helps a lot, if there are 
enough lines.


Robert Amesz
Technical Details
Message-ID: <Xns907488721AEArcamesz@127.0.0.1>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!freenix!skynet.be!dispose.news.demon.net!news.demon.nl!demon!amesz.demon.nl!not-for-mail
References: <Xns907199D2355A2RarAvishotmailcom@127.0.0.1> <Xns907211BAF2744wiredearp@194.182.148.146> <Xns9071F1E3ADFD9luutrangeocities@206.13.28.182> <Xns90725BEF7A65Cwhhvsoperamailcom@194.168.222.9> <Xns90725F26E570D3145926@172.17.1.62> <1eqzfd6.d11wbwk2zh2gN%planb@newsreaders.com>

Show Full Headers
Complete Article Headers
Message-ID: <Xns907488721AEArcamesz@127.0.0.1>
Subject: Fixing badly wrapped text (Was: Re: Multilevel colouring of quoted text...)
Date: Thu, 29 Mar 2001 22:53:14 GMT
From: rcameszREMOVETHIS@dds.removethistoo.nl (Robert Amesz)
References: <Xns907199D2355A2RarAvishotmailcom@127.0.0.1> <Xns907211BAF2744wiredearp@194.182.148.146> <Xns9071F1E3ADFD9luutrangeocities@206.13.28.182> <Xns90725BEF7A65Cwhhvsoperamailcom@194.168.222.9> <Xns90725F26E570D3145926@172.17.1.62> <1eqzfd6.d11wbwk2zh2gN%planb@newsreaders.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.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!freenix!skynet.be!dispose.news.demon.net!news.demon.nl!demon!amesz.demon.nl!not-for-mail
Newsgroups: news.software.readers
Reply-To: rcamesz@dds.nl
NNTP-Posting-Host: amesz.demon.nl
X-NNTP-Posting-Host: amesz.demon.nl:212.238.72.220
X-Trace: news.demon.nl 985906394 pluto:25424 NO-IDENT amesz.demon.nl:212.238.72.220
X-Complaints-To: abuse@nl.demon.net
X-Posting-Agent: Hamster/1.3.13.0
User-Agent: Xnews/4.03.25
Lines: 39