Grammalecte  Diff

Differences From Artifact [16699b2371]:

To Artifact [4d63d167b4]:


428
429
430
431
432
433
434

435
436
437
438
439
440
441
    [)]\b(?![s¹²³⁴⁵⁶⁷⁸⁹⁰]\b)
        <<- not before("\\((?:[rR][eéEÉ]|[qQ][uU]’|[nNmMtTsSdDlL]’)$") ->> ") "                               && Il manque un espace après la parenthèse.
__<s>/typo(typo_parenthèse_ouvrante_collée)__
    \b[(](?=[^)][^)][^)])
        <<- ->> " ("                                                                                && Il manque un espace avant la parenthèse.

TEST: C’est au fond du couloir{{(}}celui du deuxième étage{{)}}qu’il se trouve.     ->> " (|||) "

TEST: (a + b)²
TEST: il faut (re)former tout ça.
TEST: il (n’)est (qu’)ingénieur


# Points et espaces
__<s>/typo(typo_point_entre_deux_espaces)__      [  ][.](?=[  ])  <<- ->> .                         && Pas d’espace avant un point.







>







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
    [)]\b(?![s¹²³⁴⁵⁶⁷⁸⁹⁰]\b)
        <<- not before("\\((?:[rR][eéEÉ]|[qQ][uU]’|[nNmMtTsSdDlL]’)$") ->> ") "                               && Il manque un espace après la parenthèse.
__<s>/typo(typo_parenthèse_ouvrante_collée)__
    \b[(](?=[^)][^)][^)])
        <<- ->> " ("                                                                                && Il manque un espace avant la parenthèse.

TEST: C’est au fond du couloir{{(}}celui du deuxième étage{{)}}qu’il se trouve.     ->> " (|||) "
TEST: de gain différentiel 𝐴 (𝑉ᵣ = 𝐴·𝑣H{{)}}et associé                              ->> ") "
TEST: (a + b)²
TEST: il faut (re)former tout ça.
TEST: il (n’)est (qu’)ingénieur


# Points et espaces
__<s>/typo(typo_point_entre_deux_espaces)__      [  ][.](?=[  ])  <<- ->> .                         && Pas d’espace avant un point.
1558
1559
1560
1561
1562
1563
1564























































1565
1566
1567
1568
1569
1570
1571

TEST: « Je suis donc perdu ? », dit Paul.
TEST: “C’est bon !”, croit savoir Marie.
TEST: “Parce que… ?” finit par demander Paul.
TEST: « Dans quel pays sommes-nous ? » demanda un manifestant.



























































!!
!!
!!
!!
!!







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627

TEST: « Je suis donc perdu ? », dit Paul.
TEST: “C’est bon !”, croit savoir Marie.
TEST: “Parce que… ?” finit par demander Paul.
TEST: « Dans quel pays sommes-nous ? » demanda un manifestant.


!!!! Purge des références aux notes                                                               !!

# les références aux notes
__<s>(p_exposants)__
    [¹²³⁴⁵⁶⁷⁸⁹⁰]+
        <<- ~>> *

__[i](p_références_aux_notes)__
    ({w_2})(\d+)  @@0,$
        <<- not morph(\0, ":") and morph(\1, ":") ~2>> *

TEST: POLITIQUESOCIÉTÉÉCONOMIEMONDECULTUREART DE VIVREMAGAZINE (qui peut faire boguer JavaScript avec certaines regex)


!!!! Normalisation du “t” euphonique                                                              !!

__<i]/tu(tu_t_euphonique_incorrect)__
    ([-–—− ]t(?:[’' ][-–—−]?|[-–—−][’' ]?))(ie?ls?|elles?|on|tu)  @@0,$
        <<- re.search("(?i)^(?:ie?ls|elles|tu)$", \2) -1>> -    && Le “t” euphonique n’est pas nécessaire avec “\2”.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513
        <<- __else__ and \1 != "-t-" and \1 != "-T-" -1>> -t-   && Pour le “t” euphonique, il faut deux traits d’union. Pas d’apostrophe. Pas d’espace.
        <<- \1 != "-t-" ~1>> -t-
__<i]/tu(tu_t_euphonique_superflu)__
    [td]([- ]t[-’' ])(?:ie?l|elle|on)  @@1
        <<- -1>> -                                              && Le “t” euphonique est superflu quand le verbe se termine par “t” ou “d”.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513
        <<- \1 != "-t-" ~1>> -t-
__<i]/eleu(eleu_t_euphonique_manquant)__
    [aec](-(ie?l|elle|on))  @@1,2  <<- -1>> -t-\2               && Euphonie. Il faut un “t” euphonique.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513

TEST: va{{ t’}}il y parvenir ?                          ->> -t-
TEST: A{{ t’}}elle soif ?                               ->> -t-
TEST: A{{ t-}}elle faim ?                               ->> -t-
TEST: a{{ t'}}elle                                      ->> -t-
TEST: a{{-t'}}il                                        ->> -t-
TEST: a{{-t }}il.                                       ->> -t-
TEST: a{{ t’}}il.                                       ->> -t-
TEST: a{{ t-}}on.                                       ->> -t-
TEST: donne{{ t-}}il                                    ->> -t-
TEST: donne{{-t }}il                                    ->> -t-
TEST: vient{{-t-}}il                                    ->> -
TEST: viendras{{-t-}}tu                                 ->> -
TEST: Viendront{{ t-}}ils                               ->> -
TEST: viennent{{ t-}}ils                                ->> -
TEST: mangent{{-t-}}elles                               ->> -
TEST: Ont{{ t’}}ils                                     ->> -
TEST: Ont{{-t’}}ils                                     ->> -
TEST: l’ont{{ t’}}ils vu ?                              ->> -
TEST: exploite{{−t−}}il les ressources numériques       ->> -t-
TEST: vainc{{-il}} ses ennemis aisément                 ->> -t-il
TEST: Assis, gronde{{-t -}}elle                         ->> -t-
TEST: vient-il demain ?
TEST: prend-elle l’avantage ?
TEST: saura-t-on jamais la vérité ?
TEST: arrive-t-elle ce matin ?
TEST: y aura-t-il du poulet au dîner ?



!!
!!
!!
!!
!!
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
__[s]/num(num_lettre_O_zéro1)__  [\dO]+[O][\dO]+ <<- not option("ocr") ->> =\0.replace("O", "0")    && S’il s’agit d’un nombre, utilisez le chiffre « 0 » plutôt que la lettre « O ».
__[s]/num(num_lettre_O_zéro2)__  [1-9]O <<- not option("ocr") ->> =\0.replace("O", "0")             && S’il s’agit d’un nombre, utilisez le chiffre « 0 » plutôt que la lettre « O ».

TEST: année {{2O11}}                                                        ->> 2011
TEST: {{3O}} (chiffre avec un O).                                           ->> 30



!!!! Purge des références aux notes                                                               !!

# les références aux notes
__<s>(p_exposants)__
    [¹²³⁴⁵⁶⁷⁸⁹⁰]+
        <<- ~>> *

__[i](p_références_aux_notes)__
    ({w_2})(\d+)  @@0,$
        <<- not morph(\0, ":") and morph(\1, ":") ~2>> *

TEST: POLITIQUESOCIÉTÉÉCONOMIEMONDECULTUREART DE VIVREMAGAZINE (qui peut faire boguer JavaScript avec certaines regex)


!!!! Traits d’union                                                                               !!

__[i]/tu(tu_trait_union_douteux)__
    ({w1})(?:--|—|–|−|⁃)({w1})  @@0,$
    <<- spell(\1+"-"+\2) and analyse(\1+"-"+\2, ":") ->> \1-\2                                      && Trait d’union : un tiret simple suffit.

TEST: Nous préparons une {{contre–attaque}}.                    ->> contre-attaque
TEST: Nous préparons une {{contre−attaque}}.                    ->> contre-attaque


__<i]/tu(tu_t_euphonique_incorrect)__
    ([-–—− ]t(?:[’' ][-–—−]?|[-–—−][’' ]?))(ie?ls?|elles?|on|tu)  @@0,$
        <<- re.search("(?i)^(?:ie?ls|elles|tu)$", \2) -1>> -    && Le “t” euphonique n’est pas nécessaire avec “\2”.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513
        <<- __else__ and \1 != "-t-" and \1 != "-T-" -1>> -t-   && Pour le “t” euphonique, il faut deux traits d’union. Pas d’apostrophe. Pas d’espace.
        <<- \1 != "-t-" ~1>> -t-
__<i]/tu(tu_t_euphonique_superflu)__
    [td]([- ]t[-’' ])(?:ie?l|elle|on)  @@1
        <<- -1>> -                                              && Le “t” euphonique est superflu quand le verbe se termine par “t” ou “d”.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513
        <<- \1 != "-t-" ~1>> -t-
__<i]/eleu(eleu_t_euphonique_manquant)__
    [aec](-(ie?l|elle|on))  @@1,2  <<- -1>> -t-\2               && Euphonie. Il faut un “t” euphonique.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?T1=t+euphonique&id=2513

TEST: va{{ t’}}il y parvenir ?                          ->> -t-
TEST: A{{ t’}}elle soif ?                               ->> -t-
TEST: A{{ t-}}elle faim ?                               ->> -t-
TEST: a{{ t'}}elle                                      ->> -t-
TEST: a{{-t'}}il                                        ->> -t-
TEST: a{{-t }}il.                                       ->> -t-
TEST: a{{ t’}}il.                                       ->> -t-
TEST: a{{ t-}}on.                                       ->> -t-
TEST: donne{{ t-}}il                                    ->> -t-
TEST: donne{{-t }}il                                    ->> -t-
TEST: vient{{-t-}}il                                    ->> -
TEST: viendras{{-t-}}tu                                 ->> -
TEST: Viendront{{ t-}}ils                               ->> -
TEST: viennent{{ t-}}ils                                ->> -
TEST: mangent{{-t-}}elles                               ->> -
TEST: Ont{{ t’}}ils                                     ->> -
TEST: Ont{{-t’}}ils                                     ->> -
TEST: l’ont{{ t’}}ils vu ?                              ->> -
TEST: exploite{{−t−}}il les ressources numériques       ->> -t-
TEST: vainc{{-il}} ses ennemis aisément                 ->> -t-il
TEST: Assis, gronde{{-t -}}elle                         ->> -t-
TEST: vient-il demain ?
TEST: prend-elle l’avantage ?
TEST: saura-t-on jamais la vérité ?
TEST: arrive-t-elle ce matin ?
TEST: y aura-t-il du poulet au dîner ?



@@@@
@@@@
@@@@
@@@@
@@@@GRAPH: graphe0|g0                                                                              _







<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1691
1692
1693
1694
1695
1696
1697














1698
1699
1700
1701
1702
1703
1704
1705
1706
1707








































1708
1709
1710
1711
1712
1713
1714
__[s]/num(num_lettre_O_zéro1)__  [\dO]+[O][\dO]+ <<- not option("ocr") ->> =\0.replace("O", "0")    && S’il s’agit d’un nombre, utilisez le chiffre « 0 » plutôt que la lettre « O ».
__[s]/num(num_lettre_O_zéro2)__  [1-9]O <<- not option("ocr") ->> =\0.replace("O", "0")             && S’il s’agit d’un nombre, utilisez le chiffre « 0 » plutôt que la lettre « O ».

TEST: année {{2O11}}                                                        ->> 2011
TEST: {{3O}} (chiffre avec un O).                                           ->> 30

















!!!! Traits d’union                                                                               !!

__[i]/tu(tu_trait_union_douteux)__
    ({w1})(?:--|—|–|−|⁃)({w1})  @@0,$
    <<- spell(\1+"-"+\2) and analyse(\1+"-"+\2, ":") ->> \1-\2                                      && Trait d’union : un tiret simple suffit.

TEST: Nous préparons une {{contre–attaque}}.                    ->> contre-attaque
TEST: Nous préparons une {{contre−attaque}}.                    ->> contre-attaque











































@@@@
@@@@
@@@@
@@@@
@@@@GRAPH: graphe0|g0                                                                              _
4899
4900
4901
4902
4903
4904
4905

4906
4907
4908
4909
4910
4911
4912
#    <<- \1 == \2
#        and not value(\2, "|nous|vous|faire|en|la|lui|donnant|œuvre|ah|oh|eh|hé|ho|ha|hou|olé|joli|Bora|couvent|dément|sapiens|très|vroum|")
#        and not (value(\1, "|est|une|") and value(<1, "|l’|d’|"))
#        and not (\2 == "mieux" and value(<1, "|qui|"))
#    ->> \1                                                                                          && Doublon.
#
#TEST: Il y a un {{doublon doublon}}.                                                                ->> doublon



!!
!!
!!!! Élisions & euphonie                                                                          !!
!!
!!







>







4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
#    <<- \1 == \2
#        and not value(\2, "|nous|vous|faire|en|la|lui|donnant|œuvre|ah|oh|eh|hé|ho|ha|hou|olé|joli|Bora|couvent|dément|sapiens|très|vroum|")
#        and not (value(\1, "|est|une|") and value(<1, "|l’|d’|"))
#        and not (\2 == "mieux" and value(<1, "|qui|"))
#    ->> \1                                                                                          && Doublon.
#
#TEST: Il y a un {{doublon doublon}}.                                                                ->> doublon



!!
!!
!!!! Élisions & euphonie                                                                          !!
!!
!!
23205
23206
23207
23208
23209
23210
23211
23212


23213
23214
23215
23216
23217
23218
23219
        <<- /conf/ -3>> nues                                    && Confusion. Écrivez “nues” (ancien terme pour “nuages”).|https://fr.wiktionary.org/wiki/tomber_des_nues

TEST: Elle en est tombée des {{nus}}.                           ->> nues


# numérique / digital
__conf_numérique_digital__
    [>agence|>appareil|>banque|>caméra|>colonie|>colonisation|>communication|>compagnie|>connexion|>économie|>entreprise|>ère|>expérience|>identité|>industrie|>présence|>prise|>service|>solution|>stratégie|>télévision|>transformation|>transition] >digital


        <<- /conf/ -2>> numérique|numériques
        && Confusion : “digital” est un adjectif se rapportant aux doigts (empreinte digitale, arthrose digitale, etc.). Écrivez “numérique”.

    [le|du|au] digital
        <<- /conf/ -2>> numérique
        && Confusion : “digital” est un adjectif se rapportant aux doigts (empreinte digitale, arthrose digitale, etc.). Écrivez “numérique”.








|
>
>







23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
        <<- /conf/ -3>> nues                                    && Confusion. Écrivez “nues” (ancien terme pour “nuages”).|https://fr.wiktionary.org/wiki/tomber_des_nues

TEST: Elle en est tombée des {{nus}}.                           ->> nues


# numérique / digital
__conf_numérique_digital__
    [>agence|>appareil|>banque|>caméra|>colonie|>colonisation|>communication|>compagnie|>connexion]     >digital
    [>document|>économie|>entreprise|>ère|>expérience|>fichier|>identité|>industrie|>présence|>prise]   >digital
    [>service|>solution|>stratégie|>télévision|>transformation|>transition|>révolution]                 >digital
        <<- /conf/ -2>> numérique|numériques
        && Confusion : “digital” est un adjectif se rapportant aux doigts (empreinte digitale, arthrose digitale, etc.). Écrivez “numérique”.

    [le|du|au] digital
        <<- /conf/ -2>> numérique
        && Confusion : “digital” est un adjectif se rapportant aux doigts (empreinte digitale, arthrose digitale, etc.). Écrivez “numérique”.