Re: [xml2rfc] assuming that period (.) ends a sentence is sometimes wrong

Carsten Bormann <> Sun, 28 February 2021 22:07 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D29933A084A for <>; Sun, 28 Feb 2021 14:07:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.02
X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qZUMDTfXawkU for <>; Sun, 28 Feb 2021 14:07:37 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 894673A083E for <>; Sun, 28 Feb 2021 14:07:37 -0800 (PST)
Received: from [] ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 4DpcvW4TqqzyNK; Sun, 28 Feb 2021 23:07:35 +0100 (CET)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.\))
From: Carsten Bormann <>
In-Reply-To: <>
Date: Sun, 28 Feb 2021 23:07:35 +0100
X-Mao-Original-Outgoing-Id: 636242854.09843-af36550eac83097514a5a31033eb5281
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <20210227191644.165F76F105E2@ary.qy> <> <> <> <> <20210228173825.GE30153@localhost> <> <> <>
To: Paul Kyzivat <>
X-Mailer: Apple Mail (2.3608.
Archived-At: <>
Subject: Re: [xml2rfc] assuming that period (.) ends a sentence is sometimes wrong
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 28 Feb 2021 22:07:42 -0000

> Two things are being muddled here:


> 1) two spaces at end of sentences in .txt output;

And 1a) how to render sentence spacing in the HTML (which, AFAIK, is not helping here).

A sentence spacing of two character positions has been the traditional rendering in plain text.  
That is suboptimal, of course (as many things are in monospaced environments).  

> 2) how two distinguish sentence endings by xml2rfc in xml input.
> There has been *some* discussion of using two spaces in the input for (2), but it doesn't work that way now and there are many issues in changing it to work that way. It isn't evident to me that it is a serious proposal.

So this is about sentence detection, not about sentence spacing.
(Which in turn can make use of sentence spacing in the input, but that is orthogonal.)

I’m trying to understand why the traditional method doesn’t work.
There is never any ambiguity with traditional keyboarding (a new line starts after a sentence); except that one has to be careful not to do an input line-break after [.!?] that is within a sentence.

The question is whether there is a need to accommodate multiple sentences per input line for proper sentence detection.
People differ in their style here.
The newline after a sentence rule helps with version control as well, so I have a strong preference for that style.
But for people who like running on on the same input line, the two-space convention has been working well.

XML may not "preserve whitespace”, but what that exactly means here is not clear to me.  
Double spaces in XML input are copied verbatim into the HTML (where they then are swallowed by the HTML processor), so it is not like the processor is not seeing them.

An easy fallback position is to no longer recognize sentence ends within an input line; that certainly solves the Philip R. Zimmermann issue (which shouldn’t be there as we have a <contact> element for natural names, but I digress).

> *If* we had a reliable method for (2) then I doubt there would be much issue with (1). The problem is that the existing method for (2) isn't reliable.

I’d say get rid of the heuristics.

But then, the thinking in the python textwrap module that is being used here to do the heavy lifting is extremely confused, so I don’t know whether that can be parameterized to be sane.  
Xml2rfc certainly tries...

> I haven't checked, but I presume the current problems (2) are also exhibited in html output.

There is no attempt in xml2rfc that I can recognize to have sentence spacing in HTML output.

> ISTM that the real question is whether authors will be willing to manually annotate the xml input to indicate sentence endings.

The answer is: Absolutely not.

> I haven't seen any proposal mentioned that I would willingly use on a regular basis. I would rather suffer with the existing heuristic.

A heuristic causes people to want to work around its limitations.  
Adding a zero-width space after the end of a middle name is a simple workaround for the current heuristic, but, ugh.  
As long as the future of the <contact> element is unclear (and the grammar bugs around it aren’t fixed), I’d also not want to steer people towards that.

Grüße, Carsten