2015-09-05 16:11 GMT+02:00 Daniel Naber <daniel.na...@languagetool.org>:

> On 2015-09-04 23:21, Dominique Pellé wrote:
>
> > I wish I could write a rule pattern like this:
> >
> >       <tokens>plein temps#chaque fois#rude épreuve#vol
> > d’oiseau</tokens>
>
> What about a more radical approach (which would be trickier to
> implement):
>
> <token>a</token>
> <regex>plein temps|chaque fois|rude épreuve|vol d’oiseau</regex>
>

Or even more general. Some times I wish I could write rules with regular
expressions ignoring completely the tokenizaton, taking the whole sentence
as a string.

In the case of Dominique's rule it would be something like:

search: a (plein temps|chaque fois|rude épreuve|vol d’oiseau)
and suggest replacing with: à $1

In fact, this is extremly simple, and most of the features of the rule
syntax are lost, but could be useful in some cases.

Regards,
Jaume
------------------------------------------------------------------------------
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to