Fix Japanese rule id="NO_SURU" (GitHub issue #3190)

Hi. I saw this GitHub issue:

The rule with id="NO_SURU" is causing the problem. The following code should fix it:

    <rule id="NO_SURU" name="助詞「の」→「を」">
      <pattern>
        <token postag='名詞.*' postag_regexp='yes'></token>
        <marker>
        <token postag='助詞-連体化'>の</token>
        </marker>
        <token postag='名詞-サ変接続'>表示</token>
        <token inflected='yes' postag='動詞-自立'>する</token>
      </pattern>
      <message>目的語を表すには<suggestion>を</suggestion>を使用します。</message>
      <example correction='を'>詳細<marker>の</marker>表示する</example>
      <example>詳細を表示する</example>
    </rule>

I have tested the new rule with the LanguageTool Rule Editor, .\testrules.bat ja, and languagetool.jar, and confirmed it works as expected.

Additional information:

It would be better if the rule could also detect the error for other transitive verbs than “表示する”. However, as far as I checked the part-of-speech values in the text analyzer, I couldn’t find a way to distinguish between intransitive and transitive verbs.

If I make it match any verbs in the form of “名詞-サ変接続” + “する”, it will result in many false-positive results for intransitive verbs such as “存在する” (e.g. ファイルの存在するディレクトリ) or “関連する” (e.g. 他の関連するページ). So I kept it to match only “表示する”.

Thanks, could you maybe submit a PR at Pull requests · languagetool-org/languagetool · GitHub?

Sure. Now I’m reading this page for new committers, and it says I should add this text to the commit message.

Should I do that? I couldn’t find other contributors doing so.

says I should add this text to the commit message. Should I do that?

Yes, that would be nice.

Thank you. I’ve submitted a PR:

Please note that the line ending characters were updated by .editorconfig. You can find details in my description in the PR.