arthurfiddich / simplenlg

Automatically exported from code.google.com/p/simplenlg
0 stars 0 forks source link

Minor whitespace "regression" from 4.1 to 4.2 #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A empty CoordinatedPhraseElement added as a premodifier to a noun phrase causes 
an extra space to be realised, (where the empty coordinated phrase is). It used 
to be ok in 4.1 to include empty coordinatedPhraseElement, without any 
rendering issues.

I get

"The right coronary artery is a  vessel with luminal irregularities."

when there are no premodifiers to "vessel".

Of course, a workaround is to not make empty elements like that.

Note: attached file is xml file, with modified WordElement for base.

Original issue reported on code.google.com by ChristopherCHowell@gmail.com on 25 Apr 2011 at 8:04

Attachments:

GoogleCodeExporter commented 8 years ago
Resolved. This was a problem in the OrthographyProcessor, where whitespace was 
being added after all components of a phrase, even if the components were 
empty. See DocumentElementTest.testExtraWhitespace() for examples after the bug 
fix.

Original comment by bertug...@gmail.com on 5 May 2011 at 1:14