Grammalecte  Check-in [772f268c3c]

Overview
Comment:[fr] ajustements
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fr | rg
Files: files | file ages | folders
SHA3-256: 772f268c3ce22bd950090811815919d4e44f3c13ecbc3937a9700b13c9b27b45
User & Date: olr on 2018-08-28 11:17:25
Other Links: branch diff | manifest | tags
Context
2018-08-29
08:58
[build] graph builder: update check usage of define check-in: e4d45d6e72 user: olr tags: build, rg
2018-08-28
11:17
[fr] ajustements check-in: 772f268c3c user: olr tags: fr, rg
08:50
[fr] regénération des dicos et du lexique check-in: 6fcf739cb3 user: olr tags: fr, rg
Changes

Modified gc_lang/fr/rules.grx from [adf6c5d818] to [5c08f291a9].

1307
1308
1309
1310
1311
1312
1313




































1314
1315
1316
1317
1318
1319
1320
    <<- \0 != "<" and \0 != ">" ->> _                                                               # Erreur de numérisation ? Cette chaîne contient un caractère de fréquence rare.

TEST: __ocr__ trouve {{l£}} temps
TEST: __ocr__ elle s’{{avance*}} sur le seuil
TEST: __ocr__ par beaucoup d’argent ? {{{Il}} débouche le Jack Daniels







































!!!
!!!
!!! Processeur: Dernier nettoyage avant coupure du paragraphe en phrases                          !!
!!!
!!!








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







1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
    <<- \0 != "<" and \0 != ">" ->> _                                                               # Erreur de numérisation ? Cette chaîne contient un caractère de fréquence rare.

TEST: __ocr__ trouve {{l£}} temps
TEST: __ocr__ elle s’{{avance*}} sur le seuil
TEST: __ocr__ par beaucoup d’argent ? {{{Il}} débouche le Jack Daniels


## Mélange chiffres/lettres
__[i]/ocr(ocr_le_la_les_regex)__
    1[easrnxiocuwàéè]
        <<- \0.endswith("e") ->> le                                                                 # Erreur de numérisation ?
        <<- __else__ and \0.endswith("a") ->> la                                                    # Erreur de numérisation ?
        <<- __else__ and \0.endswith("à") ->> la|là                                                 # Erreur de numérisation ?
        <<- __else__ ->> le|la                                                                      # Erreur de numérisation ?

TEST: __ocr__ avec {{1e}} chien du policier
TEST: __ocr__ il le jura sur {{1a}} tête de sa mère
TEST: __ocr__ {{1c}} chat du voinsin est idiot


__[i]/ocr(ocr_les)__
    1[ea]s
        <<- ->> les                                                                                 # Erreur de numérisation ?

TEST: __ocr__ {{1es}} jours clairs


__[i]/ocr(ocr_l_regex)__
    (1’)[aâeéèêëiîïoôuyh][\w-]*  @@0
        <<- -1>> l’|L’|j’|J’                                                                        # Erreur de numérisation ?

TEST: __ocr__ {{1’}}année s’annonce agitée.


__[i]/ocr(ocr_il_regex)__
    [i1][1f]s?
        <<- \0.endswith("s") ->> Ils|ils                                                            # Erreur de numérisation ?
        <<- __else__ ->> Il|il                                                                      # Erreur de numérisation ?

TEST: __ocr__ {{1fs}} s’en sortent comme ils peuvent.
TEST: __ocr__ {{i1s}} en savent beaucoup trop pour leur propre bien.



!!!
!!!
!!! Processeur: Dernier nettoyage avant coupure du paragraphe en phrases                          !!
!!!
!!!

2238
2239
2240
2241
2242
2243
2244

2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272

# fut / rut
__ocr_fut__
    rut
        <<- ->> fut                                                                                 # Erreur de numérisation ?

TEST: __ocr__ ce petit {{rut}} traité comme un chien


# il / n / ils / U / Us / i1 / if / 11
__ocr_il__
    [<start>|,]  [n|h|d]  ~[bcdfghjklmnpqrstvwxz]
        <<- morph(\3, ":(?:O[on]|3s)") -2>> il                                                      # Erreur de numérisation ?

    U
        <<- ->> Il|il                                                                               # Erreur de numérisation ?

    Us
        <<- ->> Ils|ils                                                                             # Erreur de numérisation ?

    [i1|if|11|1f]
        <<- ->> Il|il                                                                               # Erreur de numérisation ?

    [i1s|ifs|11s|1fs]
        <<- ->> Ils|ils                                                                             # Erreur de numérisation ?

TEST: __ocr__ {{n}} contient trop de soufre.
TEST: __ocr__ {{Us}} arrive demain.
TEST: __ocr__ {{i1s}} en savent beaucoup trop pour leur propre bien.


# fa / la
__ocr_la__
    fa
        <<- ->> la                                                                                  # Erreur de numérisation ?








>












<
<
<
<
<
<


<







2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293






2294
2295

2296
2297
2298
2299
2300
2301
2302

# fut / rut
__ocr_fut__
    rut
        <<- ->> fut                                                                                 # Erreur de numérisation ?

TEST: __ocr__ ce petit {{rut}} traité comme un chien


# il / n / ils / U / Us / i1 / if / 11
__ocr_il__
    [<start>|,]  [n|h|d]  ~[bcdfghjklmnpqrstvwxz]
        <<- morph(\3, ":(?:O[on]|3s)") -2>> il                                                      # Erreur de numérisation ?

    U
        <<- ->> Il|il                                                                               # Erreur de numérisation ?

    Us
        <<- ->> Ils|ils                                                                             # Erreur de numérisation ?







TEST: __ocr__ {{n}} contient trop de soufre.
TEST: __ocr__ {{Us}} arrive demain.



# fa / la
__ocr_la__
    fa
        <<- ->> la                                                                                  # Erreur de numérisation ?

2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
__ocr_lj1__
    ~^Y’[aâeéèêëiîïoôuyh]
        <<- ->> ="l’"+\1[2:] + "|L’"+\1[2:] + "|j’"+\1[2:] + "|J’"+\1[2:]                           # Erreur de numérisation ?

    Y  ~^[aâeéèêëiîïoôuyh]
        <<- before(r"\w") and not morph(\2, ":Y") ->> l’\2|L’\2|j’\2|J’\2                           # Erreur de numérisation ?

    ~^[Ii1]’[aâeéèêëiîïoôuyh]
        <<- ->> ="l’"+\1[2:] + "|L’"+\1[2:] + "|j’"+\1[2:] + "|J’"+\1[2:]                           # Erreur de numérisation ?

    [I|i|1]  ~^[aâeéèêëiîïoôuy]
        <<- ->> l’\2|L’\2|j’\2|J’\2                                                                 # Erreur de numérisation ?

TEST: __ocr__ {{Y’arrive}} demain.
TEST: __ocr__ {{I’arrive}} demain.







|







2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
__ocr_lj1__
    ~^Y’[aâeéèêëiîïoôuyh]
        <<- ->> ="l’"+\1[2:] + "|L’"+\1[2:] + "|j’"+\1[2:] + "|J’"+\1[2:]                           # Erreur de numérisation ?

    Y  ~^[aâeéèêëiîïoôuyh]
        <<- before(r"\w") and not morph(\2, ":Y") ->> l’\2|L’\2|j’\2|J’\2                           # Erreur de numérisation ?

    ~^[Ii]’[aâeéèêëiîïoôuyh]
        <<- ->> ="l’"+\1[2:] + "|L’"+\1[2:] + "|j’"+\1[2:] + "|J’"+\1[2:]                           # Erreur de numérisation ?

    [I|i|1]  ~^[aâeéèêëiîïoôuy]
        <<- ->> l’\2|L’\2|j’\2|J’\2                                                                 # Erreur de numérisation ?

TEST: __ocr__ {{Y’arrive}} demain.
TEST: __ocr__ {{I’arrive}} demain.
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361


# le / les / lé / lés / lui / lai / lei / la / tu / lu
__ocr_le_la_les__
    >lé
        <<- ->> =\1.replace("é", "e").replace("É", "E")                                             # Erreur de numérisation ?

    ~^1[easrnxiocuwàéè]$
        <<- \1.endswith("e") ->> le                                                                 # Erreur de numérisation ?
        <<- __else__ and \1.endswith("a") ->> la                                                    # Erreur de numérisation ?
        <<- __else__ and \1.endswith("à") ->> la|là                                                 # Erreur de numérisation ?
        <<- __else__ ->> le|la                                                                      # Erreur de numérisation ?

    [1es|1as]
        <<- ->> les                                                                                 # Erreur de numérisation ?

    [lai|lei]
        <<- ->> lui|les                                                                             # Erreur de numérisation ?

    lu
        <<- not morph(<1, ":(?:V0|N.*:m:[si])") ->> tu|le|la                                        # Erreur de numérisation ?

TEST: __ocr__ il s’agit de {{lés}} observer.
TEST: __ocr__ avec {{1e}} chien du policier
TEST: __ocr__ il le jura sur {{1a}} tête de sa mère
TEST: __ocr__ {{1c}} chat du voinsin est idiot
TEST: __ocr__ {{lai}} gros sont mal vus.
TEST: __ocr__ {{1es}} jours clairs
TEST: __ocr__ {{lu}} as si bien réussi


# M. / Mr / M
__ocr_mr__
    M ,  ~^[A-ZÉÈ]
        <<- -1:2>> "Mr |M. "                                                                        # Erreur de numérisation ?







<
<
<
<
<
<
<
<
<







<
<
<

<







2357
2358
2359
2360
2361
2362
2363









2364
2365
2366
2367
2368
2369
2370



2371

2372
2373
2374
2375
2376
2377
2378


# le / les / lé / lés / lui / lai / lei / la / tu / lu
__ocr_le_la_les__
    >lé
        <<- ->> =\1.replace("é", "e").replace("É", "E")                                             # Erreur de numérisation ?










    [lai|lei]
        <<- ->> lui|les                                                                             # Erreur de numérisation ?

    lu
        <<- not morph(<1, ":(?:V0|N.*:m:[si])") ->> tu|le|la                                        # Erreur de numérisation ?

TEST: __ocr__ il s’agit de {{lés}} observer.



TEST: __ocr__ {{lai}} gros sont mal vus.

TEST: __ocr__ {{lu}} as si bien réussi


# M. / Mr / M
__ocr_mr__
    M ,  ~^[A-ZÉÈ]
        <<- -1:2>> "Mr |M. "                                                                        # Erreur de numérisation ?
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
    2de
        <<- /typo/ sContext != "Writer" ->> 2ᵈᵉ     # Nombre ordinal. Second : 2ᵈ. Seconde : 2ᵈᵉ. Seconds : 2ᵈˢ. Secondes : 2ᵈᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    2des
        <<- /typo/ sContext != "Writer" ->> 2ᵈᵉˢ    # Nombre ordinal. Second : 2ᵈ. Seconde : 2ᵈᵉ. Seconds : 2ᵈˢ. Secondes : 2ᵈᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    ~^\d+e$
        <<- /typo/ sContext != "Writer" ->> =\1[:-1]+"ᵉ"    # Nombre ordinal singulier. Exemples : 2ᵉ, 3ᵉ, 4ᵉ…|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    ~^\d+es$
        <<- /typo/ sContext != "Writer" ->> =\1[:-2]+"ᵉˢ"   # Nombre ordinal pluriel. Exemples : 2ᵉˢ, 3ᵉˢ, 4ᵉˢ…|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

TEST: le {{1er}} qui m’emmerde, je le fusille       ->> 1ᵉʳ
TEST: c’est le {{2e}}                               ->> 2ᵉ


__typo_ordinaux_chiffres_incorrects__
    1 [ier|er]
    1ier
        <<- /typo/ ->> 1ᵉʳ          # Nombre ordinal. Premier : 1ᵉʳ. Première : 1ʳᵉ. Premiers : 1ᵉʳˢ. Premières : 1ʳᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    1 [iers|ers]







|


|



|







2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
    2de
        <<- /typo/ sContext != "Writer" ->> 2ᵈᵉ     # Nombre ordinal. Second : 2ᵈ. Seconde : 2ᵈᵉ. Seconds : 2ᵈˢ. Secondes : 2ᵈᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    2des
        <<- /typo/ sContext != "Writer" ->> 2ᵈᵉˢ    # Nombre ordinal. Second : 2ᵈ. Seconde : 2ᵈᵉ. Seconds : 2ᵈˢ. Secondes : 2ᵈᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    ~^\d+e$
        <<- /typo/ \1 != "1e" and sContext != "Writer" ->> =\1[:-1]+"ᵉ"         # Nombre ordinal singulier. Exemples : 2ᵉ, 3ᵉ, 4ᵉ…|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    ~^\d+es$
        <<- /typo/ \1 != "1es" and sContext != "Writer" ->> =\1[:-2]+"ᵉˢ"       # Nombre ordinal pluriel. Exemples : 2ᵉˢ, 3ᵉˢ, 4ᵉˢ…|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

TEST: le {{1er}} qui m’emmerde, je le fusille       ->> 1ᵉʳ
TEST: c’est le {{2e}}                               ->> 2ᵉ
TEST: les {{2es}} vont en cours.                    ->> 2ᵉˢ

__typo_ordinaux_chiffres_incorrects__
    1 [ier|er]
    1ier
        <<- /typo/ ->> 1ᵉʳ          # Nombre ordinal. Premier : 1ᵉʳ. Première : 1ʳᵉ. Premiers : 1ᵉʳˢ. Premières : 1ʳᵉˢ.|http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=4271

    1 [iers|ers]