Grammalecte  Diff

Differences From Artifact [c020247554]:

To Artifact [6052d0f6b0]:


974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993

#
# //////////////////////////////////////// PRÉPROCESSEUR ////////////////////////////////////////
# Dernier nettoyage avant coupure du paragraphe en phrases
#

# Trait d’union conditionnel (u00AD)
__<i>__  \w+‑\w+‑\w+ <<- ~>> =\0.replace("‑", "")
__<i>__  \w+‑\w+ <<- ~>> =\0.replace("‑", "")

# empêcher la scission en fin de dialogue
__<s>__  ([?!…][?!…  ]*)[ "'”» ]*,  @@0 <<- ~1>> *
__<s>__  ([?!…][?!…  ]*)[ "'”» ]*[a-zéèêîô]  @@0 <<- ~1>> ,

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. 









|
|


|
|







974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993

#
# //////////////////////////////////////// PRÉPROCESSEUR ////////////////////////////////////////
# Dernier nettoyage avant coupure du paragraphe en phrases
#

# Trait d’union conditionnel (u00AD)
__<i>(p_trait_union_conditionnel1)__    \w+‑\w+‑\w+ <<- ~>> =\0.replace("‑", "")
__<i>(p_trait_union_conditionnel2)__    \w+‑\w+ <<- ~>> =\0.replace("‑", "")

# empêcher la scission en fin de dialogue
__<s>(p_fin_dialogue1)__    ([?!…][?!…  ]*)[ "'”» ]*,  @@0 <<- ~1>> *
__<s>(p_fin_dialogue2)__    ([?!…][?!…  ]*)[ "'”» ]*[a-zéèêîô]  @@0 <<- ~1>> ,

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. 


2898
2899
2900
2901
2902
2903
2904

2905
2906
2907
2908
2909
2910
2911
2912
    <<- morphex(\2, ":[123][sp]", ":[GNAQWM]") and not before(r"(?i)\bce que? ") -2>> _     # Incohérence probable avec « \1 » : « \2 » n’est ni un adjectif, ni un participe passé, ni un adverbe.

TEST: J’ai trop {{mangeais}}.
TEST: Ce que nous réussissons presque sera considéré comme un échec.


# élimination de presque

__[i]__  presque <<- ~>> *

__[i]/conf(conf_chez_vconj)__
    chez +({w2})  @@$
    <<- not \1[0].isupper() and morphex(\1, ":[123][sp]", ":[GNAQM]") -1>> _                        # Incohérence avec « chez ».

TEST: Tout ce qu’on fera chez {{sera}} enregistré.








>
|







2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
    <<- morphex(\2, ":[123][sp]", ":[GNAQWM]") and not before(r"(?i)\bce que? ") -2>> _     # Incohérence probable avec « \1 » : « \2 » n’est ni un adjectif, ni un participe passé, ni un adverbe.

TEST: J’ai trop {{mangeais}}.
TEST: Ce que nous réussissons presque sera considéré comme un échec.


# élimination de presque
__[i](p_presque)__
    presque <<- ~>> *

__[i]/conf(conf_chez_vconj)__
    chez +({w2})  @@$
    <<- not \1[0].isupper() and morphex(\1, ":[123][sp]", ":[GNAQM]") -1>> _                        # Incohérence avec « chez ».

TEST: Tout ce qu’on fera chez {{sera}} enregistré.

3782
3783
3784
3785
3786
3787
3788

3789

3790

3791
3792
3793
3794
3795
3796
3797
3798
TEST: il y en a moins que {{prévues}}                         ->> prévu
TEST: comme {{convenus}}                                      ->> convenu



#### TOUT / TOUS / TOUTE / TOUTES


__[i]__  fai(?:tes|sons|s)-(?:les|[nv]ous) (tou(?:te|)s) @@$ <<- ~1>> *

__[i]__  (tout) (?:débuts|petits) @@0 <<- before(r"\b(aux|[ldmts]es|[nv]os) +$") ~1>> *

__[i]__  (?:[ldmtsc]es|[nv]os|leurs) (tout) ({w_2})  @@w,$
    <<- morph(\2, ":[AQ].*:[pi]", False) ~1>> *


__[i]/gn(gn_tous_deux)__
    (tout) deux  @@0 <<- not word(-1) -1>> tous                                                     # Locution pronominale : « tous deux ».|https://fr.wiktionary.org/wiki/tous_deux

TEST: {{Tout}} deux sont partis les premiers.







>
|
>
|
>
|







3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
TEST: il y en a moins que {{prévues}}                         ->> prévu
TEST: comme {{convenus}}                                      ->> convenu



#### TOUT / TOUS / TOUTE / TOUTES

__[i](p_fais_les_tous)__
    fai(?:tes|sons|s)-(?:les|[nv]ous) (tou(?:te|)s) @@$ <<- ~1>> *
__[i](p_tout_débuts_petits)__
    (tout) (?:débuts|petits) @@0 <<- before(r"\b(aux|[ldmtsc]es|[nv]os|leurs) +$") ~1>> *
__[i](p_les_tout_xxx)__
    (?:[ldmtsc]es|[nv]os|leurs|aux) (tout) ({w_2})  @@w,$
    <<- morph(\2, ":[AQ].*:[pi]", False) ~1>> *


__[i]/gn(gn_tous_deux)__
    (tout) deux  @@0 <<- not word(-1) -1>> tous                                                     # Locution pronominale : « tous deux ».|https://fr.wiktionary.org/wiki/tous_deux

TEST: {{Tout}} deux sont partis les premiers.
3906
3907
3908
3909
3910
3911
3912

3913
3914
3915
3916
3917
3918
3919
3920
TEST: __neg__ On {{vous }}a pas compris.
TEST: __neg__ On {{en}} a pas.
TEST: __neg__ Il {{y}} a jamais d’eau.


#### INFINITIF


__[i]__  ne (?:pas|plus|jamais) +(beaucoup|trop)  @@$ <<- ~1>> *

__[i]/infi(infi_ne)__
    ne (?:pas|rien|jamais(?: rien| plus|)|plus(?: jamais| rien| guère|)|guère|point) (?:non plus |)(?:l(?:e(?:ur|s|)|a|ui) |nous |vous |[mtsl]’(?:en |y |)|[mts]e |en |y |)({w_1})
    @@$
    <<- not morph(\1, ":(?:Y|W|O[ow])|>que? ", False) and spell(\1)
    -1>> =suggVerbInfi(@)                                                                           # Le verbe devrait être à l’infinitif.








>
|







3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
TEST: __neg__ On {{vous }}a pas compris.
TEST: __neg__ On {{en}} a pas.
TEST: __neg__ Il {{y}} a jamais d’eau.


#### INFINITIF

__[i](p_ne_plus_pas_jamais_beaucoup_trop_rien)__
    ne (?:pas|plus|jamais) +(beaucoup|trop|rien)  @@$ <<- ~1>> *

__[i]/infi(infi_ne)__
    ne (?:pas|rien|jamais(?: rien| plus|)|plus(?: jamais| rien| guère|)|guère|point) (?:non plus |)(?:l(?:e(?:ur|s|)|a|ui) |nous |vous |[mtsl]’(?:en |y |)|[mts]e |en |y |)({w_1})
    @@$
    <<- not morph(\1, ":(?:Y|W|O[ow])|>que? ", False) and spell(\1)
    -1>> =suggVerbInfi(@)                                                                           # Le verbe devrait être à l’infinitif.

8816
8817
8818
8819
8820
8821
8822

8823
8824
8825
8826
8827
8828
8829
8830


#### AVOIR + PARTICIPES PASSÉS

#__[i]/conj__  fait(s|e|es) ({w1}) <<- morph(\2, ":V") and not morph(\2, ":Y")
#   ->> fait \1                      # Le participe passé de faire reste au masculin singulier s’il est suivi par un verbe à l’infinitif.


__[i]__     les ({avoir}) +(fait) +(?:[mts](?:e +|’)|)({infi}) @@w,w,$ <<- morph(\1, ">avoir ", False) and morph(\3, ":Y", False) ~2>> _

__[i]/ppas(ppas_pronom_avoir)__
    (j’|je |tu |ils? |elles? |[nv]ous |on |et )(?:ne +|n’|l(?:ui|eur) +|)({avoir}) +({w_2})  @@0,w,$
    <<- not re.search("(?i)^(?:barre|confiance|cours|envie|peine|prise|crainte|cure|affaire|hâte|force|recours)$", \3) and morph(word(-1), ">puisque? ", False, True)
    and morph(\2, ":V0a", False) and not \3.isupper() and morphex(\3, ":(?:[123][sp]|Q.*:[fp])", ":(?:G|W|Q.*:m:[si])")
    -3>> =suggMasSing(@)
    # Ce verbe devrait être un participe passé au masculin singulier.|http://fr.wikipedia.org/wiki/Accord_du_participe_pass%C3%A9_en_fran%C3%A7ais







>
|







8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836


#### AVOIR + PARTICIPES PASSÉS

#__[i]/conj__  fait(s|e|es) ({w1}) <<- morph(\2, ":V") and not morph(\2, ":Y")
#   ->> fait \1                      # Le participe passé de faire reste au masculin singulier s’il est suivi par un verbe à l’infinitif.

__[i](p_les_avoir_fait_vinfi)__
    les ({avoir}) +(fait) +(?:[mts](?:e +|’)|)({infi}) @@w,w,$ <<- morph(\1, ">avoir ", False) and morph(\3, ":Y", False) ~2>> _

__[i]/ppas(ppas_pronom_avoir)__
    (j’|je |tu |ils? |elles? |[nv]ous |on |et )(?:ne +|n’|l(?:ui|eur) +|)({avoir}) +({w_2})  @@0,w,$
    <<- not re.search("(?i)^(?:barre|confiance|cours|envie|peine|prise|crainte|cure|affaire|hâte|force|recours)$", \3) and morph(word(-1), ">puisque? ", False, True)
    and morph(\2, ":V0a", False) and not \3.isupper() and morphex(\3, ":(?:[123][sp]|Q.*:[fp])", ":(?:G|W|Q.*:m:[si])")
    -3>> =suggMasSing(@)
    # Ce verbe devrait être un participe passé au masculin singulier.|http://fr.wikipedia.org/wiki/Accord_du_participe_pass%C3%A9_en_fran%C3%A7ais