-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a JUnit test that would check if the messages and titles of rules in LanguageTool are correct #63
Comments
Hi, I am Michał and I would like to contribute to this project. This is the first problem I would like to solve, |
Thanks for your interest in LT. You could place the test in |
Maybe this excellent idea can be expanded to run checks on the (supposedly) correct example sentences as well? |
Hello! May I take this issue? |
Sure! Let us know here or on the forum if you have questions. |
@danielnaber, My questins are rather concerning the understanding of LT basics. There's a lot of documentation, it would be wonderful if you could guide me what to explore firstly. |
Basically yes, but as |
All right, I can tell a little about my intermediate results. I analysed descriptions of English rules with the rules themselves. There are cases, when this approach finds errors, for example: Yes, often rules that must be applied to whole sentence don't make sense here (like UPPERCASE_SENTENCE_START, SENTENCE_FRAGMENT). But let's suppose we can filter the rules by some category (I haven't explored embedded categories yet). There is a problem with indeterminacy of using brackets and overall pattern of writing bad and good samples in titles.
I'll continue exploring this, but for now it's clear there are a lot of cases to be considered |
Thanks for the update. It probably makes sense to focus on messages first, and care about titles later. |
Hey! Sorry, last few days had been at a hackathon. |
The message indeed doesn't depend on the rule but on the specific match. You can load the rules using |
Thanks, will try! |
Even though there is a lot of noise, i.e. found RuleMatches aren't really caused by mistake, but rather based on Rules' messages properties, there is some signal. For example
So, if we disable some rules and apply some conditions - it might be somewhat sensible, I can try. |
Sounds useful. This is probably not something that will run on every test run, but maybe every few months, or before release. And someone will need to look at it anyway. |
Yeah, I agree. So, how do you see it? Should I just write a test? Then how do achieve that it's not run each time? |
Write a test and use the |
May i work on this issue? |
@ales-blaze Sure, feel free to give it a try. |
There may be typos in messages and rule titles, in particular in XML pattern rules. Create a check that would run LanguageTool on these messages. Note: some rule titles quote the error that they match, so the match of that very rule should be ignored.
Requires: knowledge of Java
The text was updated successfully, but these errors were encountered: