Grammalecte  Check-in [3aa7844bdc]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[fr] faux positif: grand nombre binaire
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr
Files: files | file ages | folders
SHA3-256:3aa7844bdc88009e8df2f86a27c985ea99bdd9f27e46c35a15d68ebf581c544c
User & Date: olr 2019-08-22 12:04:56
Context
2019-08-22
21:35
[fr] faux positif: nombre négatif check-in: b7bc5ec2e7 user: olr tags: fr, trunk
12:04
[fr] faux positif: grand nombre binaire check-in: 3aa7844bdc user: olr tags: fr, trunk
11:16
[fr] nr: da substantifs, +ajustements check-in: ba1ed47d1e user: olr tags: fr, trunk
Changes

Changes to gc_lang/fr/rules.grx.

  1315   1315   !!
  1316   1316   
  1317   1317   __[s]/num(num_grand_nombre_soudé)__
  1318   1318       \d\d\d\d+
  1319   1319       <<- not before("NF[  -]?(C|E|P|Q|X|Z|EN(?:[  -]ISO|)) *$") >>>
  1320   1320       <<- \0.__len__() > 4 ->> =formatNumber(\0)                                                      # Formatage des grands nombres.
  1321   1321       <<- __else__
  1322         -        and after("^(?:,[0-9]+[⁰¹²³⁴⁵⁶⁷⁸⁹]?|[⁰¹²³⁴⁵⁶⁷⁸⁹])")
  1323         -        or after("^[   ]*(?:[kcmµn]?(?:[slgJKΩ]|m[²³]?|Wh?|Hz|dB)|[%‰€$£¥Åℓhj]|min|°C|℃)(?![\\w’'])")
         1322  +        and ((after("^(?:,[0-9]+[⁰¹²³⁴⁵⁶⁷⁸⁹]?|[⁰¹²³⁴⁵⁶⁷⁸⁹])") and not (re.search("^[01]+$", \0) and after("^,[01]+\\b")))
         1323  +        or after("^[   ]*(?:[kcmµn]?(?:[slgJKΩ]|m[²³]?|Wh?|Hz|dB)|[%‰€$£¥Åℓhj]|min|°C|℃)(?![\\w’'])"))
  1324   1324       ->> =formatNumber(\0)                                                                           # Formatage des grands nombres.
  1325   1325   
  1326   1326   __[s]/num(num_nombre_quatre_chiffres)__
  1327   1327       (?<!,)(\d\d\d\d)[  ]([a-zA-Zµ][a-zA-Z0-9Ωℓ⁰¹²³⁴⁵⁶⁷⁸⁹/·]*) @@0,$
  1328   1328       <<- morph(\2, ";S", ":[VCR]") or mbUnit(\2) -1>> =formatNumber(\1)                              # Formatage des grands nombres.
  1329   1329   
  1330   1330   TEST: {{12345}}                                 ->> 12 345
................................................................................
  1335   1335   TEST: {{0234567890}}                            ->> 0 234 567 890|02 34 56 78 90|023 456 78 90|0234 567-890
  1336   1336   TEST: {{12345678901}}                           ->> 12 345 678 901
  1337   1337   TEST: {{112798931830912839}}                    ->> 112 798 931 830 912 839
  1338   1338   TEST: {{2308393909}}                            ->> 2 308 393 909|2308 393-909
  1339   1339   TEST: {{2024}},9                                ->> 2 024
  1340   1340   TEST: {{4000}} Å                                ->> 4 000
  1341   1341   TEST: {{3240}} µA                               ->> 3 240
         1342  +TEST: 1111 0011,01 (binaire)
  1342   1343   
  1343   1344   
  1344   1345   __[s>(num_grand_nombre_avec_points)__
  1345   1346       \d\d?\d?(?:[.]\d\d\d)+(?![0-9])
  1346   1347       <<- option("num") ->> =\0.replace(".", " ")                                                     # Grands nombres : utilisez des espaces insécables plutôt que des points.
  1347   1348       <<- ~>> =\0.replace(".", "_")
  1348   1349