As I start to look into the grammar.xml I do see couples of issues.
For instance in the rule:
…
<rule>
<pattern>
<token inflected="yes" regexp="yes">être|situer|tenir</token>
<token regexp="yes">pas|plus|moins|très|peu|toujours</token>
<marker><token regexp="yes">prêts?</token></marker>
<token regexp="yes">de?</token>
</pattern>
<message>Voulez-vous écrire <suggestion>près</suggestion> ?</message>
<example type="incorrect">Nous ne sommes pas <marker>prêts</marker> d’arriver.</example>
<example type="correct">Nous ne sommes pas près d’arriver.</example>
</rule>
It obviously fails to detect errors such as:
Es-tu plus prêts d’elle?
Mets-toi plus prêts de la lumière!
Assieds-toi prêts du feux.
Oddly, (as I understand), it does found in:
Il est pas prêts d’y arriver
If I correctly understand the grammar rules a better solution would be
prêts?
de?|du|d’elle?|d’eux|d’y
Possibly
de[a-z]*|du|d’[a-z]+
I’m looking for the equivalent in French of:
Questions:
I. regarding: Development Overview - LanguageTool Wiki
element pattern, sub element marker: What part of the original text should be marked as an error. If all tokens are part of the error you can omit this element.
Can you formulate in another way, I do not understand.
Example:
<rule id="VOIRE_MEME">
<pattern>
<token regexp="yes" skip="1">voire? même</token>
</pattern>
<message>« Voire même » est un pléonasme. Employez <suggestion>voire</suggestion>, <suggestion>même</suggestion>.</message>
<mistake>voire même</mistake>
<correct>voire</correct>
</rule>
II. How do I know which rules leads to the suggestions in the java standalone environnement?
Thanks