Finding incorrectly hyphenated compounds

I would like the desktop Windows version to look for “ly-” (ly followed by a hyphen) because it usually means there is an incorrectly hyphenated compound consisting of an adverb ending in ly and an adjective or participle. Examples of the incorrect hyphenation are specially-trained and visually-impaired. There would be some false positives, but I could live with those. Is there a way to get the desktop Windows version to do this?

I have added hundreds of rules, but I don’t know Java.

Thanks for any advice you can give.

Share a decent portion of worth sharing rules with us, to be added to the main version, and I will commit the rules you need. The one you mention I already know how to do.
By decent portion I mean a few dozens at least.

I haven’t done anything worth sharing yet. I have flagged some terms because, although they are acceptable English terms, we don’t use them in our writing. For example, we use “means” rather than “shall mean”. I don’t think this substitution would be of use to other US English writers. Other terms aren’t of any interest to others. For example, we use “Temporary Assistance for Needy Families” rather than “Temporary Assistance to Needy Families”. One of the great things about LanguageTool is that it can be customized to flag things like that.

If I do come up with anything worth sharing, I will share it.

I think catching “ly-” might help many US English writers. I don’t know how to do it, which is why I asked about it.

Indeed it will. Please read this:

You should be able to do it once you read it. It will be up to you to decide to share it.

Thanks! I will read it tonight.

<!-- English rule, 2019-03-25 -->
<rule id="LY" name="ly">
  <regexp>ly-</regexp>
  <message>In a two-word compound modifier with an adverb ending in "ly" followed by an adjective or participle, there is no hyphen.</message>
  </rule>

@newbie, thanks for your contribution.

The rule is not complete. Please read Development Overview - LanguageTool Wiki. And always use ‘testrules’ to make sure that the rule is correct.

You need something like this:

  <rule id="LY" name="ly">
    <regexp>ly-</regexp>
    <message>In a two-word compound modifier with an adverb ending in "ly" followed by an adjective or participle, there is no hyphen.</message>
    <short>Adverb hyphenation</short>
    <example correction="">This is a quick<marker>ly-</marker>tested example.</example>
  </rule>

But, the rule needs ‘intelligence’, without which there will be many incorrect warnings (false positives). For example, the rule finds an error in this sentence:
… were moved up from late-March or early-April to late February or early March starting…

Thanks! I knew there would be false positives. I checked the rule against our concordance. There were 9 false positives out of 106, which makes it a good rule for us if we remember that “family” and “supply” aren’t adverbs and “early” isn’t always an adverb. It has caught two mistakes in the two days I have been using it.

If I am just checking a rule against our concordance or body of writing for suitability, I won’t suggest it for wider use anymore.