Sentence Fragment rule, completed and tested

When you check out the code from SVN you can work on it directly and then use “svn diff grammar.xml” (or some equivalent command with your SVN tool). That way, there’s no fragment file. That’s the easiest option.

Well, I use all Java regular expressions. I recommend this website for more information:

www.regular-expressions.info

As for examples, I’m afraid you’d have to look at the rules yourself. If you don’t understand some parts, simply ask.

Best,
Marcin

Definitely, conjugations with “be” should be excluded.

But frankly, all real hits here:

https://languagetool.org/regression-tests/20140922/result_en_20140922.html

simply lack a comma. Why don’t we make it explicit that this is a punctuation problem?

I don’t see any other problems there.

Best,
Marcin

I added some new antipatterns and fixed disambiguation a bit to deal with these cases. None of them causes a false alarm now.

Best,
Marcin

Thankyou for that. I was working on it, but what with my slow internet and trying to set up Maven, it would have been difficult to get it out in time. If everyone else is happy, I am happy.

Irvine

It would be great to have a shorter error message. I’d suggest something around 200 characters. We can add the original error message (or an even longer one) to a page at languagetool.org and then link that. What do you think? The problem with the long error message is that it’s much longer than our other messages, thus, even though it works, the user interface isn’t really prepared for that.

grammar.patch (1.7 KB)

I used Tortoise-SVN to create the patch, if there is any problems let me know.

I understand what you mean. As I said before, with the long error messages, I have been sweating blood trying to keep them short, while at the same time cover the main causes of the error.

Except with the first rule in the rule-group, the error messages come in at just over a hundred words, and the patch cuts the first rule down to the same size. With Milek’s correction the rest of it was not needed anyway. For me personally, this works okay in Open Office since, if I look at the main message, I really want to know what is wrong. Although, I do understand that this might be a problem for other applications.

If you feel the message is still too long, I will not be offended if you edit it further. Also, if you want me to write a short page for the LT website explaining what the rule does and why it thinks it has found an error, let me know.

Irvine

Ps

On a separate topic, I am in the process of copying the LT main trunk from Github. Do I need the branches and tags for a basic development setup?

What about this?

“\2” at the beginning of a sentence requires a 2nd clause. Maybe a comma, question or exclamation mark is missing, or the sentence is incomplete and should be joined with the following sentence.

The fact that bad style can cause error messages is kind of implied anyway (not saying that every user understands that, though).

About github: git will clone everything automatically anyway, you don’t need to care about that.

That sounds fine to me; like I say, I understand completely your concerns about the length of the message. Note I added: (or preceding). I take it you do not need me to make a patch for this?

One of the strange things about English language education, especially in the UK, is that we do not teach English! We teach children to read and write, but when it comes to grammar, proper punctuation, and substantive style, most people remain completely ignorant. So, what you say has more truth than you probably realise.

As far as cloning the trunk, while its not so important with subversion, I really try to keep downloads as small as possible. For example it took me three attempts, (three days,) to get an uncorrupted download of JDK. Even then, when I finally got it installed, it was the wrong one. I had downloaded JDK-8, instead of JDK-7. While it was probably for the best, since JDK-8 does not work well with Xp, I finally had to make a special visit to a friend in order to use his faster internet connection.

grammar.patch (9.64 KB)

Here is the patch that replaces the error message as outlined.

Irvine

I think we should we should store the long version of the error message somewhere on the LT wiki or some other convenient place on the Web and link to it in the tag of the rule.

I do not have a problem with this, and the principle could prove useful with the extended set of punctuation rules I am working on that are based on conjunctions. If others feel the same, let me know and I will put something together.

Irvine