Don't put a space before a full stop

I cannot find the rule that creates the message: “Don’t put a space before a full stop.”

I can create the issue by using an ellipsis, for example:

Jan was born on . . . Street in Warsaw.

I have always preferred to use dot space dot space dot space rather than dot dot dot.

That is, I prefer:

. . .
instead of

Where can I find this rule?

Am Di 11.09.2012, 17:52:22 schrieben Sie:

I cannot find the rule that creates the message: “Don’t put a space
before a full stop.”

That’s a rule coded in Java. The source code is here:

Of course, if you just want to disable that rule, you can do so in the
configuration dialog.

Regards
Daniel


http://www.danielnaber.de

Well, I looked for that rule in the configuration.

I found the “Smart ellipsis (. . . )” rule under the “Miscellaneous” section. That converts three dots into some special ellipsis character. That’s not the same thing.

I also found “Use of two consecutive dots or commas.” Again, that’s not the same thing.

In fact, I turned off the entire “Miscellaneous” section, which unchecked all the rules of that section, and I still get the message.

Is there a separate configuration window for rules coded in java?

OK, how about adding something like this to the java code you mentioned?

// exception case for spaced ellipsis, i.e. " . . . "
if (i + 4 < tokens.length
&& isDot(tokens[i + 2].getToken())
&& isDot(tokens[i + 4].getToken()) ) {
msg = null;
}

// exception case for spaced end ellipsis, i.e. " . . . ."
if (i + 6 < tokens.length
&& isDot(tokens[i + 2].getToken())
&& isDot(tokens[i + 4].getToken())
&& isDot(tokens[i + 6].getToken()) ) {
msg = null;
}

You would also need to define the isDot() function.

static boolean isDot(final String str) {
final char c = str.charAt(0);
return (c == ‘.’ );
}

This is, of course, a style issue. The wiki page, Ellipsis - Wikipedia , says the following:

“The Chicago Manual of Style recommends that an ellipsis be formed by typing three periods, each with a space on both sides.”

I suppose I could just ignore the blue wavy lines indicating this is an error. I don’t really want to turn off the full CommaWhitespaceRule because there is a lot of other good stuff in there.

Thoughts?

The rule is called “Use of whitespace before comma and before/after parentheses” and it should be in the Miscellaneous section. If it isn’t, are you using the latest version of LanguageTool (1.8)?

That rule does nothing to turn off the warning.

Regards.

And yes, I am using version 1.8.

On Do 13.09.2012, 08:38:14 you wrote:

That rule does nothing to turn off the warning.

That’s strange, it works for me with your original example. Does restarting
OpenOffice help? Does it save the setting, i.e. does the checkbox keep its
state?

Regards
Daniel


http://www.danielnaber.de

I needed to turn off the AOO QuickStart to get that rule to work.

So, yes, that rule turns it off, but it turns off other important stuff.

For example, the following sentence SHOULD give a warning:

“This should , give a warning.”

Did you look at the code snippet I suggested?

On Do 13.09.2012, 10:12:02 you wrote:

Did you look at the code snippet I suggested?

Yes, thanks for looking into it. I forwarded this to our development
mailing list to see if there are any objections. If not, I’ll add your code
for the next release.

Regards
Daniel


http://www.danielnaber.de

Thank you.

It seems nobody on the development list has a problem with this change (as long as it’s specific to English and doesn’t affect other languages). Are you interested in submitting a complete patch?

Hi

I wrote this by hand by just looking at the source code. I don’t have a development environment for java.

Could you add it, then test it? It seems pretty straightforward.

Regards,

\Tone

This has now been added and it’s available in the latest snapshot at Index of /snapshots/

Thanks for your report again and please let us know if there’s a problem with the feature.

1.9-dev

This is a screenshot that shows the issue still occurs.

https://dl.dropbox.com/u/38035916/Ellipsis.jpg

For some strange reason, it worked in my local development environment. But now I see what the problem is: " . . . " is also a sentence delimiter (actually each dot is). So we’d have to change the way sentences are detected, as the rules only work on single sentences. The question is whether " . . . " only occurs in a sentence or whether it can also end a sentence?

Three dots can only exist within a sentence.

Four dots can only end a sentence.

I suppose this isn’t critical. It’s a style issue, only. The Chicago Manual of Style isn’t necessarily the only way to do it. I particularly like the spaced out ellipses, but others like SmartEllipses, and still others like three (or four) dots without spaces.

Which means that if you drop this issue, I won’t lose sleep over it. Your tool has already helped me a lot.

:slight_smile:

Regards

On Fr 14.09.2012, 16:55:48 you wrote:

Which means that if you drop this issue, I won’t lose sleep over it. Your
tool has already helped me a lot.

Indeed I have to give up for now, changing the sentence splitting is now
becoming a bit too complex for this feature, sorry.

Regards
Daniel


http://www.danielnaber.de