Jaume Ortolà i Font <jaumeort...@gmail.com> wrote:

> Hi,
>
> I think Marcin talked about this idea some time ago.
>
> Sometimes tokens like quotations (or other characters) should be ignored in
> some rules. That is, the sentence should be checked as if this token is not
> present. Any idea about how could it be implemented?
>
> Alternatively, tokens like this one should be added to the the patterns:
>
> <token min="0" regexp=yes">[“‘”«"']</token>
>
> I would need to modify a few dozen rules. But perhaps this is the best
> solution: it gives more control about the rule, the suggestions, possible
> false alarms, and so on. what do you think?
>
> Regards,
> Jaume Ortolà

I have not looked in details at what the French grammar checker
Grammalecte [1] does, but I think that it checks input text
in multiple passes. In some passes, pre-processor rules eliminate
pieces of texts. For example, the pre-processor can eliminate
"useless" punctuation or locutions made of multiple words.

For example, I see in Grammalecte pre-processor rules such as:

[«»“”„"`¹²³⁴⁵⁶⁷⁸⁹⁰]+ -> *
This rule eliminates a few "useless" characters.

[(]\w+[)] -> *
This rule eliminates text is parenthesis such as (foo bar).

The important thing to keep in mind is that the sentence is checked
multiple times. For example:
* first pass checks the text as-is.
* second pass checks the text again, after applying pre-processor rules.

It seems like a good idea.

Regards
Dominique

[1] http://www.dicollecte.org/grammalecte/

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to