-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathgrammar.xml
5287 lines (5045 loc) · 276 KB
/
grammar.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" title="Pretty print" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css" title="Easy editing stylesheet" ?>
<!--
Galician Grammar and Typo Rules for LanguageTool
Copyright (C) 2006 Marcin Miłkowski
Copyright (C) 2009 Susana Sotelo Docío
Copyright (C) 2021 Xosé Calvo
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-->
<!--
===============================================================================================================
Categories of rules for Galician
===============================================================================================================
ID Name Type Area covered
===============================================================================================================
TYPOGRAPHY Tipografía typographical Números, espazos, aspas, símbolos
CAT0 Gramática: Concordancia grammar Concordancia
CAT1 Gramática: Verbo grammar Verbo
CAT2 Gramática: Outros uncategorized fóra,quenes, apócopes, qué, senón, ambos
CAT3 Léxico: Estranxeirismos untranslated Estranxeirismos léxicos
CAT4 Léxico: Falsos homónimos untranslated Homónimos
CAT5 Léxico: Arcaísmos style Arcaísmos
CAT6 Léxico: Barbarismos untranslated Barbarismos (just 'adicar' so far)
CAT7 Ortografía misspelling
CAT8 Fraseoloxía untranslated Locucións
REPETITIONS Repeticións duplication
PUNCTUATION Puntuación typographical (Just 'Puntuación final ausente' so far)
CREATIVE_WRITING Escrita creativa style E-Prime
DEVELOPMENT Desenvolvemento grammar (Just Palabra sen POS)
===============================================================================================================
-->
<!DOCTYPE rules [
<!ENTITY meses_ano_abrev "(?:xan|feb|mar|abr|mai|xu[lnñ]|ago|set|out|nov|dec)">
<!ENTITY meses_ano "(?:x(?:aneiro|u(?:ñ|ll)o)|febreiro|marzo|abril|maio|agosto|setembro|outubro|novembro|decembro)">
<!ENTITY dias_semana_abrev "(?:seg|ter|cua|qui|sex|lun|mar|mér|xov|ven|sáb|dom)">
<!ENTITY dias_semana "(?:segunda|terza|cuarta|quinta|sexta|luns|martes|mércores|xoves|venres|sábado|domingo)">
<!ENTITY partes_do_dia "(?:mañá|matina|tarde|noite)">
<!ENTITY expressoes_de_tempo "(?:segundo|minuto|hora|día|semana|(?:bi|tri|cuadri|se)mestre|ano|década|decenio|milenio|tempo|temporada|época)s?|mes|meses">
<!ENTITY puntos_cardeais "(?:n(?:acente|or(?:te|[do]este))|su(?:r|(?:ro)este)|este|o(?:este|ccidente|riente)|poñente)">
<!ENTITY adverbios_de_intensidade "bastante|ben|demasiado|moitísimo|máis|menos|moi|nada|pouco|canto|case|tanto|tan|todo"><!-- XXX untranslated assaz|demais|*«quão -->
<!ENTITY adverbios_de_lugar "abaixo|enriba|dentro|adiante|fóra|aí|aquí|alén|aquén|atrás|acá|acó|dentro|embaixo|externamente|alí|lonxe|preto"><!-- XXX *algures|*alhures|*nenhures -->
<!ENTITY adxectivos_invariabeis "clave|estándar">
<!ENTITY codigos_de_pais "(?:A(?:[DEFGIMNOQRSTUWZ]|LS?)|M[ACDGHKLMNOPQRSTUVWXYZ]|S[ACDEGHIJKLMNORTUVYZb]|B[ABDEFGHIJMNORSTVWYZ]|C[ACFGHIKLMNORSUVXYZ]|G[ABDEFHILMNPQRSTUWY]|T[CDFGHJKMNOPRTVWZ]|N[ACEFGILOPRTUZ]|P[AEFGHKLMNRTWY]|K[EGHIMNPRWYZ]|L[ABCIKRSTUVY]|I[DELNOQRST]|E[CEGHNRST]|F[IJKMORX]|U[AGKMSYZ]|V[ACEGINU]|D[EJKMOZ]|H[KMNRTU]|R[EOUW]|J[MOP]|Y[ETU]|Z[AMR]|W[FS]|OM|QA)">
<!ENTITY divisas "(?:euros|dólares|francos|pesos|libras|rublos|rupias|iuans|iens|[€£¥$₽])">
<!ENTITY separadores_de_oracoes "(?:[,;:…–—\(«“]|\-|\[)">
<!ENTITY hifen "(?:[-‑])">
<!ENTITY tracos_de_separacao "(?:[-‑]|–|—)">
<!ENTITY unidades_de_medida "(?:(?:[khdcmnµfYZEPTGM]|da)?(?:[gmlsJNWCVSFTHΩ]|Hz|cd|lm|mol|Pa|Wb|rad|sr|lx|Bq|Gy|Sv|kat|Np|eV)(?:⁻)?[23¹²³]?|°[CFK]|cv|k?cal|mmHg|atm|ton|kWh|GWa|MWd|MWh|mAh|min|ha)">
<!ENTITY unidades_de_medida_por_extenso "(?:quil[oó]|dec[ií]|cent[ií]|mil[ií]|micr[oó])?(grama|metro|litro|segundo)s?|hectár(eas)?|(grau|(quilo)?tonelada)s?">
<!ENTITY tabela_periodica "(?:[UVW]|C[adeflmnorsu]?|N[abdehiop]?|P[abdmortu]?|S[bcegimnr]?|T[abcehilms]|A[cglmrstu]|R[abefghnu]|B[aehikr]?|H[efgos]?|M[cdgnot]|F[elmr]?|L[airuv]|D[bsy]|E[rsu]|G[ade]|I[nr]?|O[gs]?|Z[nr]|Kr?|Yb?|Xe|[₁₂₃₄₅₆₇₈₉₀])">
<!ENTITY pronomes_ambiguos "(?:[ao]s?|mas|nos|se)">
<!ENTITY pronomes_nao_ambiguos "(?:m(?:a|e|os?)|t(?:a|e|o)s?|ll?[aeo]s?|vos|che)">
<!ENTITY pronomes_atonos "me|te|che|lle|nos|vos|lles|o|a|os|as|lo|la|los|las|mo|ma|mos|mas|cho|cha|chos|chas|llo|lla|llos|llas|nolo|nola|nolos|nolas|volo|vola|volos|volas|llelo|llela|llelos|llelas">
<!ENTITY pronomes_atonos_simples "me|te|che|lle|nos|vos|lles|o|a|os|as|lo|la|los|las">
<!ENTITY pronomes_atonos_contractos "mo|ma|mos|mas|cho|cha|chos|chas|llo|lla|llos|llas|nolo|nola|nolos|nolas|volo|vola|volos|volas|llelo|llela|llelos|llelas">
<!ENTITY precede_nome_proprio "(asociación|avenida|balneario|parella?|coalición|colección|cometa|concurso|copa|curso|designación|designado|distribución|escola|estación|estilo|filme|fundación|galardón|xeración|illa|imperio|iniciativa|instituto|titulado|lagoa?|lei|libro|monte|museo|navío|novela|obra|orquestra|praza|premio|programa|proxecto|quinta|rexistro|reino|informe|revista|río|rúa|serra|teatro|tema|tipo|universidade|versión)">
<!ENTITY contraccions_MS "(?:ao|d(?:o|un|el|est?e|aquel|ist?o|aquilo|outro|algún)|n(?:o|un|el|est?e|aquel|ist?o|aquilo|outro|algún)|algún|polo)"><!-- XXX lost 'me+o|che+o|lle+o'-->
<!ENTITY contraccions_FS "(?:á|d(?:a|unha|ela|est?a|aquela|outra|algunha)|n(?:a|unha|ela|nest?a|aquela|outra|algunha)|algunha|pola)"><!-- XXX lost 'me+a|che+a|lle+a'-->
<!ENTITY contraccions_MP "(?:aos|d(?:os|uns|eles|est?es|aqueles|outros|algúns)|n(?:os|uns|eles|est?es|aqueles|outros|algúns)|algúns|polos)"><!-- XXX lost 'me+o|che+o|lle+o'+s-->
<!ENTITY contraccions_FP "(?:ás|d(?:as|unhas|elas|est?as|aquelas|outras|algunhas)|n(?:as|unhas|elas|est?as|aquelas|outras|algunhas)|algunhas|polas)"><!-- XXX lost 'me+a|che+a|lle+a'+s-->
<!ENTITY verbos_auxiliares_part_pasado "(?:ser|estar|ter|haber|ficar)">
<!ENTITY verbos_non_reflexivos "a(?:brandar|cedar|cougar|dormecer|frouxar|grelar|lmorzar|podrecer|purar|trasar)|baixar|c(?:a(?:er|lar|rgar|sar)|icatrizar|oller|omer|urar)|d(?:eixar|emorar|esfondar|esinchar|islocar)|e(?:nfermar|scapar|scordar|sperar|spertar|streitar)|fracturar|inchar|incrementar|m(?:archar|erendar|erar|orrer|urchar)|parar|quedar|rachar|rebentar|recordar|rir|romper|sentar|sorrir|terminar|tropezar">
<!ENTITY abreviaturas "(?:s(?:[eé]c)?|[Ee]tc\.|(?:m[aá]x|m[ií]n|[aA]prox)|(?:[aA]pt?do|[aA]sdo|[aA]vd?a?|[Cc]ód|[Dd]e?pto|[Ff]ac|[Ii]nst)|(?:[Aa]fm[oa]s?|Emcia|Ilt?m[ao]s?|Iltres?|MM|Exc?m[ao]s?|Magf[oa]|D(?:na)?|Sra?|Sr[ea]s|Srta|Dra?|Dr[ea]s?|Rm[ao]|Rev|Revm[ao]|Mons|Emmo|Rv?d[ao]|[Ll]icd[oa]|[Ll]ic|[Ll]d[oa]|[pP]rofs?)|(?:[Nn][úu]ms?|[fF]igs?|[Pp][aá]xs?|pp?|cc?a)|(?:[Vv]ols?|[Cc]aps?)|(?:[Aa]dmóns?|[aA]d(?:mt)?v[oa]s?)|(?:[pP]pal|[Vv]des?|[Ii]b[íi]d|[Rr]efs?|[Cc]it|[Aa]brevs?|[Aa]bl|[Aa]dx|[Aa]dv|[Aa]cr|[Cc]onx|[Ll]oc|[Pp]rep|[Ss]ubst)|(?:[vV]id|[Cc]fr?)|(?:[Cc]oord|[Ee]d)s?|(?:[Cc]t[ae]|[Tt]e?lf|[Tt]fno|[Tt]el[eé]f|[Tt]el)s|(?:[oO]p|[lL]oc)|cit|[aá]l|vs)"><!-- XXX retrieved from segment.srx, Galician section -->
<!ENTITY MSG_ECV "Posíbel erro de concordancia verbal.">
<!ENTITY MSG_ECX "Posíbel erro de concordancia de xénero.">
<!ENTITY MSG_ECN "Posíbel erro de concordancia de número.">
]>
<rules lang="gl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd">
<unification feature="number">
<equivalence type="singular">
<token postag="(?:[NZ]..|[ADP]...|V....)[NS].+" postag_regexp="yes"/>
</equivalence>
<equivalence type="plural">
<token postag="(?:[NZ]..|[ADP]...|V....)[NP].+" postag_regexp="yes"/>
</equivalence>
</unification>
<unification feature="gender">
<equivalence type="masc">
<token postag="(?:[NZ].|[ADP]..|V.....)[MC].+" postag_regexp="yes"/>
</equivalence>
<equivalence type="fem">
<token postag="(?:[NZ].|[ADP]..|V.....)[FC].+" postag_regexp="yes"/>
</equivalence>
</unification>
<unification feature="person">
<equivalence type="first">
<token postag="(?:V...|PP)1.+" postag_regexp="yes"/>
</equivalence>
<equivalence type="second">
<token postag="(?:V...|PP)2.+" postag_regexp="yes"/>
</equivalence>
<equivalence type="third">
<token postag="(?:V...|PP)3.+" postag_regexp="yes"/>
</equivalence>
</unification>
<category id='TYPOGRAPHY' name="Tipografía" type="typographical">
<rulegroup id='GENERAL_NUMBER_FORMAT' name="Números: Formato (10 341 330)">
<!-- Created by Tiago F. Santos, 2017-03-05 -->
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/2500-2-500-ou-2500/12873</url TODO localize -->
<short>Erro tipográfico</short>
<rule>
<antipattern>
<token spacebefore='no'>,</token>
<token regexp="yes" spacebefore='no'>\d+</token>
</antipattern>
<antipattern>
<token regexp="yes">\d{4}</token>
<token>
<exception regexp="yes">\d+</exception></token>
</antipattern>
<antipattern>
<token>
<exception regexp="yes">\d+</exception></token>
<token postag='SENT_END' regexp="yes">\d{4}</token>
</antipattern>
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp="yes">\d+</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<pattern>
<marker>
<token regexp="yes">\d+\d{3}(?:,\d+)?</token>
</marker>
</pattern>
<message>Se non é un ano, os algarismos deben ser escritos en grupos de 3.</message>
<suggestion><match no="2" regexp_match="(\d+)(\d{3})(,\d+)?" regexp_replace="$1 $2$3"/></suggestion>
<url>https://wikidog.xunta.gal/index.php/Escrita_dos_n%C3%BAmeros</url>
<example correction='1 034'>A poboación no ano 2020 era de <marker>1034</marker> 133 habitantes.</example>
<example>O ano ten exactamente 365,24219858156 días.</example>
<example>É o ano de <marker>1989</marker>.</example>
<example>ISBN 0-522-85317-X.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">\d+\,\d{3}\d+</token>
</pattern>
<message>Os algarismos deben ser escritos en grupos de 3.</message>
<suggestion><match no="3" regexp_match="(\d+,\d{3})(\d+)" regexp_replace="$1 $2"/></suggestion>
<example correction='17,103 41'>A media exacta é de <marker>17,10341</marker> valores.</example>
<example correction='365,242 19858156'>O ano ten exactamente <marker>365,24219858156</marker> días.</example>
</rule>
</rulegroup>
<rulegroup id="NO_SPACE_CLOSING_QUOTE" name="Espazos: comiñas de peche">
<rule>
<!-- Localized from English by Tiago F. Santos, 2019-02-10 -->
<pattern>
<token>”</token>
<token regexp='yes' spacebefore='no'>\w+</token>
</pattern>
<message>Debe haber un espazo despois das aspas de peche.</message>
<suggestion>\1 \2</suggestion>
<example correction="” dixo">“Bo día, Frank,<marker>”dixo</marker> Hal.</example>
</rule>
</rulegroup>
<rulegroup id="UNITS_OF_MEASURE_SPACING" name="Espazos en unidades de medida">
<!-- Localized from German by Tiago F. Santos, Portuguese rule, 2017-09-29 -->
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/simbolos-de-unidades/11572</url TODO localize -->
<rule>
<regexp case_sensitive='yes'>(\-?[0-9]+[0-9,\.]{0,10}(°C|°F|°De?|°R[éeøa]?|(Z|E|P|T|G|M|k|h|da|d|c|m|µ|n|p|f|a|z|y)?m|(Z|E|P|T|G|M|k|h|da|d|c|m|µ|n|p|f|a|z|y)?N|[kKMGTPEZY]i?B|[kmµnp]g|[Mk]t|kWh|GWa|MWd|MWh))\b</regexp>
<message>Debe dar un espazo entre o valor e a unidade de medida: <suggestion><match no="1" regexp_match="((\-)?[0-9]+[0-9,.]*{1,})" regexp_replace="$1 "/></suggestion></message>
<!-- url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/simbolos-de-unidades/11572</url TODO localize -->
<example correction="25 °C">A temperatura é de <marker>25°C</marker>.</example>
<example correction="-25 °C">A temperatura é de <marker>-25°C</marker>.</example>
<example correction="25,5 °F">A temperatura é de <marker>25,5°F</marker>.</example>
<example>A temperatura é de <marker>25,5 °C</marker>.</example>
<example>A temperatura é de <marker>25,5 °Ra</marker>.</example>
<example>Son <marker>5 km</marker> de distancia.</example>
<example correction="5 km">Son <marker>5km</marker> de distancia.</example>
<example>Son <marker>5 ZiB</marker> de datos.</example>
<example correction="5 ZiB">Son <marker>5ZiB</marker> de datos.</example>
<example>Son <marker>5 kB</marker> de datos.</example>
<example correction="5 kB">Son <marker>5kB</marker> de datos.</example>
<example correction="5 kg">Pesa <marker>5kg</marker>.</example>
<example correction="5 Mt">Pesa <marker>5Mt</marker>.</example>
<example>Pesa <marker>5 µg</marker>.</example>
<example>Isótopo 241Am</example>
<example>(AsCH3)2n</example>
<example>Bd. 1b</example>
<example>Primeiro lanzamento do Saturno 1B</example>
<example correction="2.000 kWh">Consumíronse <marker>2.000kWh</marker></example>
<example>Os xuros son de 5 <marker>%</marker>.</example>
<example>jbo:1901moi</example>
</rule>
<rule>
<regexp>((\-)?[0-9]+[0-9.,]{1,10}) (°[^CFK])</regexp>
<message>Entre o valor numérico e o símbolo de grao debe haber un espazo. Utilice <suggestion>\1°</suggestion> ou engada a unidade de medida térmica (p.ex. <suggestion>\1 °C</suggestion>).</message>
<example correction="25°|25 °C">O ángulo é de <marker>25 ° </marker></example>
<example correction="-25,5°|-25,5 °C">Fan <marker>-25,5 ° </marker>de temperatura.</example>
<example correction="-25°|-25 °C">Fan <marker>-25 ° </marker>de temperatura.</example>
<example correction="25°|25 °C">O ángulo é de <marker>25 ° </marker>de abertura.</example>
<example correction="-25°|-25 °C">Fan <marker>-25 ° </marker>de temperatura.</example>
</rule>
<rule>
<regexp>((\-)?[0-9]+[0-9.,]{1,10}) (″)</regexp>
<message>Debe haber un espazo antes do símbolo de segundos (\2).</message>
<suggestion>\1\2\3</suggestion>
<example>3°14′ 45,54″</example>
<example correction="45″"><marker>45 ″</marker> E</example>
<example correction="45,54″"><marker>45,54 ″</marker> E</example>
</rule>
</rulegroup>
<rulegroup id='SI_UNITS_EXPONENT' name="Números: Unidades do Sistema Internacional: km2/km²">
<!-- Created by Tiago F. Santos, 2017-05-12 -->
<url>https://gl.wikipedia.org/wiki/Funci%C3%B3n_exponencial</url>
<short>Erro tipográfico</short>
<!--rule> XXX disambiguate numbers Z.+ and uncomment
<pattern case_sensitive="yes">
<token postag_regexp='yes' postag='Z.+' skip='3'/>
<marker>
<token regexp="yes">(?:[khdcmnµfYZEPTGM]|da)?[gmlsJNWCVSFTH](\^)?⁻?2
<exception regexp='yes'>(?:TV|GT)2</exception></token>
</marker>
</pattern>
<message>Os expoentes deben estar en superíndice.</message>
<suggestion><match no="2" regexp_match='(.+?)((\^)?)(⁻?)2' regexp_replace='$1$4²'/></suggestion>
<example correction="km²">..estado o ano de 2010, foi de 4,68 habitantes por <marker>km2</marker>, sendo a vixésima cuarta maior do Brasil e a quin…</example>
<example correction="km²">..estado o ano de 2010, foi de 4,68 habitantes por <marker>km^2</marker>, sendo a vixésima cuarta maior do Brasil e a quin…</example>
<example correction="s⁻²">g = 9,8 m.<marker>s⁻2</marker></example>
</rule>
<rule> XXX disambiguate numbers Z.+ and uncomment
<pattern case_sensitive="yes">
<token postag_regexp='yes' postag='Z.+' skip='3'/>
<marker>
<token regexp="yes">(?:[khdcmnµfYZEPTGM]|da)?[gmlsJNWCVSFTH](\^)?⁻?3
<exception regexp='yes'>(?:TV|GT)3</exception></token>
</marker>
</pattern>
<message>Os expoentes deben estar en superíndice.</message>
<suggestion><match no="2" regexp_match='(.+?)((\^)?)(⁻?)3' regexp_replace='$1$4³'/></suggestion>
<example correction="m³">A banheira tiña 2 <marker>m3</marker>.</example>
<example correction="m³">A banheira tiña 2 <marker>m^3</marker>.</example>
<example correction="s⁻³">g.t = 9,8 m.<marker>s⁻3</marker></example>
</rule-->
<rule>
<pattern case_sensitive="yes">
<token>/</token>
<marker>
<token regexp="yes">(?:[khdcmnµfYZEPTGM]|da)?[gmlsJNWCVSFTH](\^)?2</token>
</marker>
</pattern>
<message>Os expoñentes deben estar en superíndice.</message>
<suggestion><match no="2" regexp_match='(.+?)((\^)?)2' regexp_replace='$1²'/></suggestion>
<example correction="s²">g = 9,8 m/<marker>s2</marker></example>
<example correction="s²">g = 9,8 m/<marker>s^2</marker></example>
</rule>
<rule>
<pattern case_sensitive="yes">
<token>/</token>
<marker>
<token regexp="yes">(?:[khdcmnµfYZEPTGM]|da)?[gmlsJNWCVSFTH](\^)?3</token>
</marker>
</pattern>
<message>Os expoñentes deben estar en superíndice.</message>
<suggestion><match no="2" regexp_match='(.+?)((\^)?)3' regexp_replace='$1³'/></suggestion>
<example correction="cm³">ρ[H₂O]≈1,0 g/<marker>cm3</marker>.</example>
<example correction="cm³">ρ[H₂O]≈1,0 g/<marker>cm^3</marker>.</example>
</rule>
</rulegroup>
<rulegroup id="kWh" name="kW/h → kWh">
<!-- Localized from French grammar.xml by Tiago F. Santos, 2017-06-28 -->
<url>https://gl.wikipedia.org/wiki/Ordes_de_magnitude_(enerx%C3%ADa)</url>
<rule>
<pattern>
<token regexp="yes">[KMGT]?W|(kilo|mega|giga|tera)?watt</token>
<token spacebefore="no">/</token>
<token spacebefore="no" regexp="yes">h|hora</token>
</pattern>
<message>Se se refire á unidade de consumo de enerxía, debe escribir <suggestion>\1\3</suggestion>.</message>
<example correction="kWh">O aparello consume 5 <marker>kW/h</marker>.</example>
<example>O aparello consume 5 kW.h.</example>
<example>O aparello consume 5 kWh.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">(?-i)KW</token>
<token spacebefore="no" regexp='yes'>[·.]</token>
<token spacebefore="no">h</token>
</pattern>
<message>O prefixo kilo debe ser escrito en minúsculas.</message>
<suggestion><match no="1" case_conversion="startlower"/>h</suggestion>
<suggestion><match no="1" case_conversion="startlower"/>.h</suggestion>
<example correction="kWh|kW.h">O aparello consume 5 <marker>KW.h</marker>.</example>
<example>O aparello consume 5 kWh.</example>
</rule>
<rule>
<pattern case_sensitive="yes">
<token>KWh</token>
</pattern>
<message>O prefixo kilo debe ser escrito en minúsculas.</message>
<suggestion><match no="1" case_conversion="startlower"/></suggestion>
<example correction="kWh">O aparello consume 5 <marker>KWh</marker>.</example>
<example>O aparello consume 5 kW·h.</example>
<example>O aparello consume 5 kWh.</example>
</rule>
</rulegroup>
<rulegroup id="SPACES_BETWEEN_OPERATORS" name="Números: Espazo entre operadores">
<rule>
<!-- Localized from German grammar.xml, by Tiago F. Santos, 2017-07-09 -->
<antipattern> <!-- time exception: -->
<token regexp="yes">(?:[01]?[0-9]|2[0-4])[0-9]?</token>
<token>:</token>
<token regexp="yes">[0-5][0-9]</token>
</antipattern>
<pattern>
<marker>
<token regexp="yes">(?:[0-9]+[a-z]*)
<exception scope="previous" regexp="yes">escalas?</exception>
<exception scope="previous" regexp="yes">\d\d\d\d-\d\d-\d\d</exception>
</token>
<token spacebefore="no" regexp="yes">[\*×∗·\+÷:=]</token>
<token spacebefore="no" regexp="yes">((?:[0-9]+[a-z]*))+
<exception regexp="yes">\d\dh</exception></token>
</marker>
<token negate="yes">h</token>
</pattern>
<message>Separe as fórmulas con espazos (protexidos).</message>
<suggestion>\1 \2 \3</suggestion>
<short>Separe as fórmulas con espazos</short>
<example correction="5 * 5"><marker>5*5</marker>.</example>
<example correction="3a = 2"><marker>3a=2</marker>.</example>
<example>a = 2 · x² + 5</example>
<example>Un mapa na escala 1:80000.</example>
<example>Teño unha reunión ás 7:00 h.</example>
<example>Teño unha reunión ás 7:00h.</example>
<example>Enviado a 2014-01-23 10:32 :</example>
<example>4,5 × 2,5</example>
<example>Entre as 9:00 e as 16:45.</example>
</rule>
</rulegroup>
<rulegroup id='MULTIPLICATION_SIGN' name="Números: Multiplicación: x - × " tags="picky">
<!-- Created by Tiago F. Santos, 2017-03-27 -->
<rule>
<antipattern>
<token regexp='yes'>x|\*</token>
<token regexp='yes'>[,;e]</token>
</antipattern>
<antipattern>
<token regexp='yes'>[,;o]</token>
<token regexp='yes'>x|\*</token>
</antipattern>
<antipattern>
<token regexp='yes' skip='2'>versión(?:es)?|series?|v</token>
<token regexp='yes'>\d+</token>
<token spacebefore='no'>.</token>
<token spacebefore='no'>x</token>
</antipattern>
<antipattern>
<token regexp='yes'>\p{Lu}</token>
<token spacebefore='no'>.</token>
<token regexp='yes' spacebefore='yes'>\p{Lu}</token>
</antipattern>
<pattern>
<token regexp="yes">[a-z]|[\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?[a-z]{0,1}</token>
<marker>
<token regexp='yes'>[x\*]</token>
</marker>
<token regexp="yes">[a-z]|[\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?[a-z]{0,1}</token>
</pattern>
<message>O símbolo de multiplicación é máis claro.</message>
<suggestion>×</suggestion>
<suggestion>·</suggestion>
<example correction="×|·">h = 6,626 <marker>x</marker> 10⁻³⁴ J.s</example>
<example correction="×|·">h = 6.626 <marker>x</marker> 10⁻³⁴ J.s</example>
<example correction="×|·">5 <marker>*</marker> 2 = 10</example>
<example correction="×|·">a = 5 <marker>*</marker> x + 7</example>
<example correction="×|·">a = 5x <marker>*</marker> 5 + 7</example>
<example correction="×|·">a <marker>*</marker> b</example>
<example>a = 2 · x² + 5</example>
<example>4,5 × 2,5 = 11,25</example>
<example>Consideremos <marker>que x é</marker> a coordenada horizontal, e y é a coordenada vertical.</example>
<example>Regueira Fernández, X. L.</example>
</rule>
<rule>
<regexp>(?<!([a-vyz]|[a-vyz]\d|[a-vyz]\d{2}|[a-vyz]\d{3}|[a-vyz]\d{4}|[a-vyz]\d{5}))((?!(?:[,;\(\.][x\*]([\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?)|(?:[\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?)[x\*][,;\.\)\!\?]))([\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?)[x\*]([\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+))</regexp>
<message>O símbolo de multiplicación é máis claro.</message>
<suggestion>\4×\5</suggestion>
<suggestion>\4·\5</suggestion>
<example correction='2,998×10⁸|2,998·10⁸'>c=<marker>2,998x10⁸</marker> m/s</example>
<example correction="6.626×10⁻³⁴|6.626·10⁻³⁴">h = <marker>6.626x10⁻³⁴</marker> J.s</example>
<example correction="5×2|5·2"><marker>5*2</marker> = 10</example>
<example>a=2·x²+5</example>
<example>4,5×2,5=11,25</example>
<example>Oxihalídeos do Americio en forma de AmVIO2X2, AmVO2X, AmIVOX2 e AmIIIOX...</example>
<example>Número 1Z1141X30370035113</example>
</rule>
<rule>
<regexp>([a-z]|[\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?[a-z]{0,1})\*([a-z]|[\d\.,⁻¹²³⁴⁵⁶⁷⁸⁹⁰]+?[a-z]{0,1})</regexp>
<message>O símbolo de multiplicación é máis claro.</message>
<suggestion>\1×\2</suggestion>
<suggestion>\1·\2</suggestion>
<example correction="5×x|5·x">a=<marker>5*x</marker>+7</example>
<example correction="5x×5|5x·5">a=<marker>5x*5</marker>+7</example>
<example correction="5x×5|5x·5">a=7+<marker>5x*5</marker></example>
<example correction="a×b|a·b"><marker>a*b</marker></example>
<example>a=2·x²+5</example>
<example>4,5×2,5=11,25</example>
<!-- <example>Number 1Z1141X30370035113</example> -->
</rule>
</rulegroup>
<rulegroup id='PLUS_MINUS' name="Números: +- - ± ">
<!-- Created by Tiago F. Santos, 2017-03-28 -->
<rule>
<pattern>
<token>+</token>
<token regexp='yes' spacebefore='no'>&hifen;</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>±</suggestion>
<short>Prefire un carácter tipográfico?</short>
<example correction='±'>m = 75,5 <marker>+-</marker> 0,1 g</example>
</rule>
<rule>
<pattern>
<token regexp='yes'>&hifen;</token>
<token spacebefore='no'>+</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>±</suggestion>
<short>Prefire un carácter tipográfico?</short>
<example correction='±'>m = 75,5 <marker>-+</marker> 0,1 g</example>
</rule>
</rulegroup>
<rulegroup id="EQUAL_OR_X" name="Números: >= (≥)">
<!-- Localized from German grammar.xml, by Tiago F. Santos, 2017-07-07 -->
<rule>
<regexp>>=</regexp>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>≥</suggestion>
<suggestion>≧</suggestion>
<short>Prefire un carácter tipográfico?</short>
<example>1 ≥ 1</example>
<example correction="≥|≧">1 <marker>>=</marker> 0</example>
</rule>
<rule>
<pattern>
<marker>
<token><</token>
<token spacebefore="no">=</token>
</marker>
<token negate="yes">></token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>≤</suggestion>
<suggestion>≦</suggestion>
<short>Prefire un carácter tipográfico?</short>
<example>1 ≤ 3</example>
<example correction="≤|≦">1 <marker><=</marker> 3</example>
</rule>
</rulegroup>
<rulegroup id="ARROWS" name="-> (→)">
<!-- Localized from German grammar.xml, by Tiago F. Santos, 2017-07-07 -->
<rule>
<pattern>
<token negate="yes"><</token>
<marker>
<token regexp="yes">(?:\-|=){1,2}</token>
<token>></token>
</marker>
</pattern>
<message>As frechas tipográficas acrecentan a claridade dun texto.</message>
<suggestion>→</suggestion>
<suggestion>⇾</suggestion>
<suggestion>⇉</suggestion>
<suggestion>⇒</suggestion>
<suggestion>⇨</suggestion>
<suggestion>⇛</suggestion>
<suggestion>≥</suggestion>
<short>Pretende empregar unha frecha?</short>
<example correction="→|⇾|⇉|⇒|⇨|⇛|≥"><marker>-></marker> Punto 1</example>
</rule>
<rule>
<pattern>
<marker>
<token><</token>
<token spacebefore="no" regexp="yes">(?:\-|=){1,2}</token>
</marker>
<token negate="yes">></token>
</pattern>
<message>As frechas tipográficas acrecentan a claridade dun texto</message>
<suggestion>←</suggestion>
<suggestion>⇽</suggestion>
<suggestion>⇇</suggestion>
<suggestion>⇐</suggestion>
<suggestion>⇦</suggestion>
<suggestion>⇚</suggestion>
<suggestion>≤</suggestion>
<short>Pretende empregar unha frecha?</short>
<example correction="←|⇽|⇇|⇐|⇦|⇚|≤">A <marker><-</marker> B</example>
<example>A ← B</example>
<example>-128 < -127 < -126</example>
</rule>
<rule>
<pattern>
<token><</token>
<token regexp="yes">\-|=</token>
<token>></token>
</pattern>
<message>As frechas tipográficas acrecentan a claridade dun texto</message>
<suggestion>↔</suggestion>
<suggestion>⇿</suggestion>
<suggestion>⇄</suggestion>
<suggestion>⇆</suggestion>
<suggestion>⇋</suggestion>
<suggestion>⇌</suggestion>
<suggestion>⇔</suggestion>
<short>Pretende empregar unha frecha?</short>
<example correction="↔|⇿|⇄|⇆|⇋|⇌|⇔">A <marker><=></marker> B</example>
<example>A ⇔ B</example>
</rule>
</rulegroup>
<rulegroup id='YEAR_NUMBER_FORMAT' name="Formato de números: anos">
<!-- Localized and improved by Tiago F. Santos, Portuguese rule, 2017-03-05 -->
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/2500-2-500-ou-2500/12873</url TODO localize -->
<rule>
<pattern>
<token regexp="yes" skip='1'>anos?</token>
<marker>
<token regexp="yes">\d\.\d{3}</token>
</marker>
</pattern>
<message>Nos anos os números non deben estar separados.</message>
<suggestion><match no='2' regexp_match='(\d)(.)(\d{3})' regexp_replace='$1$3'/></suggestion>
<short>Os anos escríbense sen espazos</short>
<example correction="1989">Naceu no ano <marker>1.989</marker>.</example>
</rule>
<rule>
<pattern>
<token regexp="yes">&meses_ano;</token>
<token skip="1">de</token>
<marker>
<token regexp="yes">\d{1,2}\.\d{3}</token>
</marker>
</pattern>
<message>Nos anos os números non deben estar separados.</message>
<suggestion><match no='3' regexp_match='(\d{1,2})(.)(\d{3})' regexp_replace='$1$3'/></suggestion>
<short>Os anos escríbense sen espazos</short>
<example correction="1989">É decembro de <marker>1.989</marker>.</example>
</rule>
<rule>
<pattern>
<marker>
<token regexp="yes">\d{1,3}\.\d{3}</token>
</marker>
<token regexp="yes">aC|dC</token>
</pattern>
<message>Nos anos os números non deben estar separados.</message>
<suggestion><match no='1' regexp_match='(\d{1,3})(.)(\d{3})' regexp_replace='$1$3'/></suggestion>
<short>Os anos escríbense sen espazos</short>
<example correction="1989">Estamos a <marker>1.989</marker> aC.</example>
</rule>
</rulegroup>
<rulegroup id='AVOID_DECIMAL_APOSTROPHE' name="Números: Evitar apóstrofo en decimais">
<rule>
<!-- Based on Catalan version, by Tiago F. Santos, 2017-02-27 -->
<antipattern>
<token regexp="yes">\d{1,2}\,\d+</token>
<token spacebefore="no" regexp="yes">['`’‘]</token>
<token spacebefore="no" regexp="yes">\d+(?:%|&unidades_de_medida;)?</token>
<token spacebefore="no" regexp="yes">[”"]</token>
</antipattern>
<pattern>
<token regexp="yes">\d+|\d{1,3}(?:[\.   ]\d\d\d)+
<exception regexp="yes">\d{1,2}\,\d+</exception>
<exception scope="previous" regexp="yes">.*[º°h]</exception></token>
<token spacebefore="no" regexp="yes">['`’‘]</token>
<token spacebefore="no" regexp="yes">\d+(?:%|&unidades_de_medida;)?</token>
</pattern>
<message>Utilice antes unha vírgula para separar os decimais.</message>
<suggestion>\1,\3</suggestion>
<example correction="9,5"><marker>9'5</marker></example>
<example correction="9,5%"><marker>9'5%</marker></example>
<example correction="9.349,5"><marker>9.349'5</marker></example>
<example correction="1.999.349,5"><marker>1.999.349'5</marker></example>
<example correction="349,5">1 999 <marker>349'5</marker></example>
<example>1,23'2</example>
<example>41° 22'44.</example>
<example>41° 12’12” N.</example>
</rule>
</rulegroup>
<rulegroup id='PERCENT' name="Números: Espazo en porcentaxes" default="on">
<!-- TODO Find out which one is recommended for Galician-->
<rule id='PERCENT_WITHOUT_SPACE' name="Números: Retirar espazo en porcentaxes (3%)" default="on">
<!-- Localized and improved from Catalan, by Tiago F. Santos, 2017-02-27 -->
<pattern>
<token regexp="yes">[\d.,]+
<exception regexp="yes">[.,]</exception></token>
<token spacebefore="yes" regexp="yes">[%‰‱]</token>
</pattern>
<message>Escriba a porcentaxe sen espazos (estilo estándar).</message>
<suggestion>\1\2</suggestion>
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/centigrados-porcentagem/18011</url TODO localize -->
<example correction="23,5%">A taxa é de <marker>23,5 %</marker>.</example>
<example correction="23,5‰">Paga <marker>23,5 ‰</marker>.</example>
<example>Neste caso a % é de 1 a 2.</example>
<example>Paga 25%.</example>
</rule>
<rule id='PERCENT_WITH_SPACE' name="Números: Acrecentar espazo en porcentaxes (3 %)" default="off">
<!-- Localized and improved from Catalan, by Tiago F. Santos, 2017-02-27 -->
<pattern>
<token regexp="yes">[\d.,]+[%‰‱]</token>
</pattern>
<message>Escolleu a opción de inserción de espazo.</message>
<suggestion><match no="1" regexp_match="(.+)([%‰‱])" regexp_replace="$1 $2"/></suggestion>
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/centigrados-porcentaxe/18011</url TODO localize -->
<example correction="23,5 %">A taxa é do <marker>23,5%</marker>.</example>
<example correction="23,5 ‰">Paga <marker>23,5‰</marker>.</example>
<example>Paga 25 %.</example>
</rule>
</rulegroup>
<rulegroup id="SPACE_INDENTATION" name="Libreoffice: Sangría con espazos" default='off'>
<rule>
<!-- Localized from German grammar.xml by Tiago F. Santos, 2017-08-19 -->
<regexp>^ +</regexp>
<message>No LibreOffice, o sangrado é máis preciso se utilizar as ferramentas específicas.</message>
<suggestion/>
<example correction=""><marker> </marker>El saíu de casa.</example>
</rule>
</rulegroup>
<rulegroup id='DASH_RULE' name='Guión e raia'>
<!-- Created by Tiago F. Santos, 2017-01-23 -->
<url>https://gl.wikipedia.org/wiki/Raia_(puntuaci%C3%B3n)</url>
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<rule>
<pattern>
<token postag='SENT_START'/>
<token min='0' regexp='yes'>["'«»“”]</token>
<marker>
<token regexp='yes'>-|–</token>
</marker>
</pattern>
<message>En diálogos e enumeracións debe utilizar trazo longo.</message>
<suggestion>—</suggestion>
<short>Aquí utilice o trazo longo</short>
<example correction='—'><marker>-</marker> Que é iso, mamá?</example>
<example correction='—'>« <marker>-</marker> Que é iso, mamá?</example>
<example>— É o teu presente de aniversario, miña filla.</example>
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>2560-657 TORRES VEDRAS</example>
<example>---------------------------------------</example>
</rule>
<rule>
<antipattern>
<token regexp='yes'>-</token>
<token regexp='yes'>-</token>
<token regexp='yes'>-</token>
<token regexp='yes'>,</token>
</antipattern>
<pattern>
<marker>
<token regexp='yes' spacebefore='yes'>-|–</token>
</marker>
<token spacebefore="no">,</token>
</pattern>
<message>Termine a frase parentética cun trazo longo.</message>
<suggestion>—</suggestion>
<short>Aquí utilice o trazo longo</short>
<example correction='—'>como dixen <marker>-</marker>,…</example>
</rule>
<rule>
<antipattern>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
<token regexp='yes'>-|–</token>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
</antipattern>
<pattern>
<marker>
<token spacebefore="yes" regexp='yes'>-|–</token>
</marker>
<token spacebefore="yes"/>
</pattern>
<message>Se non pretende unir dúas palabras, debe utilizar trazo longo.</message>
<suggestion>—</suggestion>
<short>Aquí debería utilizar un trazo longo</short>
<example correction='—'>Neses establecementos de ensino existían matrículas <marker>-</marker> a maioría de ensino fundamental — e un total de docentes.</example>
<example correction='—'>Instituto Ricci de Macau <marker>-</marker> Asociación de promoción cultural da Compañía de Xesús en Macau</example>
<example>Na porción centro-oeste e noroeste presentan maiores elevacións, podendo atinxir 500 metros por enriba do nivel do mar, destacándose a Serra do Tumucumaque e a Serra Lombarda.</example>
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>2560-657 TORRES VEDRAS</example>
<example>---------------------------------------</example>
</rule>
<rule>
<antipattern>
<token>Estrada</token>
<token>Nacional</token>
<token regexp="yes">\d{3}</token>
<token regexp="yes">–|&hifen;</token>
<token regexp="yes">\d</token>
</antipattern>
<antipattern><!-- XXX Postal codes -->
<token regexp="yes">\d{4}</token>
<token regexp="yes">–|&hifen;</token>
<token regexp="yes">\d{3}</token>
<token>
<exception case_sensitive='yes'>a</exception></token>
</antipattern>
<antipattern><!-- XXX YYYY-XX-XX date formats and XX-XX-YYYY -->
<token regexp="yes">\d{2}|\d{4}</token>
<token regexp="yes" spacebefore='no'>–|&hifen;</token>
<token regexp="yes" spacebefore='no'>\d{2}</token>
<token regexp="yes" spacebefore='no'>–|&hifen;</token>
<token regexp="yes" spacebefore='no'>\d{2}|\d{4}</token>
</antipattern>
<pattern>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
<token regexp="yes">—|&hifen;</token>
<token regexp='yes'>\d+%?|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
</pattern>
<message>Se pretende indicar un intervalo temporal ou numérico, debe utilizar o medio-trazo.</message>
<suggestion>\1 – \3</suggestion>
<suggestion>\1–\3</suggestion>
<short>En intervalos numéricos/temporais, debe utilizar o medio-trazo</short>
<example correction='1812 – 1888|1812–1888'>Antonio Casares Rodríguez (<marker>1812 - 1888</marker>) — primeiro catedrático de Química da USC.</example>
<!--example correction='10 – 20%|10–20%'><marker>10-20%</marker></example--> <!-- XXX add half dash to tokenizer split characters and uncomment -->
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>2560-657 TORRES VEDRAS</example>
<example>---------------------------------------</example>
<example>10-10-10 — Data</example>
<example>10-10-2010 — Data</example>
<example>2010-10-10 — Data</example>
</rule>
</rulegroup>
<rulegroup id='DASH_SPACE_RULES' name="Trazo longo en enumeracións" default="on" tags="picky">
<!-- Localized and improved from Catalan by Tiago F. Santos, 2017-05-16 -->
<url>https://gl.wikipedia.org/wiki/Raia_(puntuaci%C3%B3n)</url>
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<rule>
<pattern>
<token postag="SENT_START"/>
<marker>
<token regexp="yes">\d+|\w</token>
<token regexp="yes">[–‒—]|&hifen;</token>
<token spacebefore="no">
<exception regexp="yes">\d+</exception></token>
</marker>
</pattern>
<message>En enumeracións, debe dar un espazo despois do trazo longo.</message>
<suggestion>\2 — \4</suggestion>
<short>Erro tipográfico</short>
<example correction="1 — Influencia"><marker>1—Influencia</marker> artística.</example>
</rule>
</rulegroup>
<rulegroup id='DASH_ENUMERATION_NO_SPACE_RULE' name="Trazo longo en diálogos: Sen espazo" default="off">
<rule>
<!-- Localized and improved from Catalan by Tiago F. Santos, 2017-05-16 -->
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<pattern>
<token postag="SENT_START"/>
<marker>
<token regexp="yes">[–‒—]|&hifen;</token>
<token spacebefore="yes"/>
</marker>
</pattern>
<message>En diálogos, debe retirar o espazo despois do trazo longo.</message>
<suggestion>—\3</suggestion>
<example correction="—Corre"><marker>— Corre</marker>! Vaia!</example>
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>—Saltar</example>
<example>—Correr</example>
<example>—Rastrear</example>
<example>---------------------------------------</example>
</rule>
</rulegroup>
<rulegroup id='DASH_ENUMERATION_SPACE_RULE' name="Trazo longo en diálogos: Espazo despois" default="on">
<rule>
<!-- Based on Catalan version by Tiago F. Santos, 2017-05-16 -->
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<pattern>
<token postag="SENT_START"/>
<marker>
<token regexp="yes">[–‒—]|&hifen;</token>
<token spacebefore="no"/>
</marker>
</pattern>
<message>En diálogos, debe dar espazo despois do trazo longo.</message>
<suggestion>— \3</suggestion>
<!--url>https://ciberduvidas.iscte-iul.pt/consultorio/preguntas/o-uso-do-hifen-e-do-travessao/31251</url TODO localize -->
<example correction="— Corre"><marker>—Corre</marker>! Vaia!</example>
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>— Saltar</example>
<example>— Correr</example>
<example>— Rastrear</example>
<example>---------------------------------------</example>
</rule>
</rulegroup>
<rulegroup id='HIPHEN_SPACE_RULES' name="Espazamento en guións e trazos" default="on" tags="picky">
<!-- Created by Tiago F. Santos, 2017-XX-XX -->
<rule>
<antipattern>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
<token regexp='yes'>–|&hifen;</token>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
</antipattern>
<pattern>
<token regexp='yes'>\p{L}+</token>
<token spacebefore="yes" regexp='yes'>&tracos_de_separacao;</token>
<token spacebefore="no" regexp='yes'>\p{L}+</token>
</pattern>
<message>Se pretende unir dúas palabras, non debe espazar e debe utilizar o guión. En caso contrario, utilice espazos e un trazo longo.</message>
<suggestion>\1-\3</suggestion>
<suggestion>\1 — \3</suggestion>
<short>Erro tipográfico</short>
<example correction='Tras-os|Tras — os'>Alfándega da Fe fica en <marker>Tras -os</marker>-Montes.</example>
<example>Ayer, A. J.— As Ideas de Bertrand Russel.</example>
</rule>
<rule>
<antipattern>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
<token regexp='yes'>&hifen;</token>
</antipattern>
<antipattern>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
<token regexp='yes'>–|&hifen;</token>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
</antipattern>
<pattern>
<token/>
<token spacebefore="no" regexp='yes'>&tracos_de_separacao;</token>
<token spacebefore="yes"/>
</pattern>
<message>Se pretende unir dúas palabras, non debe espazar e debe utilizar o guión. En caso contrario, utilice espazos e un trazo longo.</message>
<suggestion>\1-\3</suggestion>
<suggestion>\1 — \3</suggestion>
<short>Erro tipográfico</short>
<example correction='Tras-os|Tras — os'>Alfándega da Fe fica en <marker>Tras- os</marker>-Montes.</example>
</rule>
</rulegroup>
<rulegroup id='ENUMERATION_AND_DASHES' name="Enumeracións con trazos: 1.2.-">
<rule>
<!-- Localized and improved from Catalan by Tiago F. Santos, 2016-10-27 -->
<antipattern>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
<token regexp='yes'>–|&hifen;</token>
<token regexp='yes'>\d+|&meses_ano;|&meses_ano_abrev;|&dias_semana;|&dias_semana_abrev;</token>
</antipattern>
<pattern>
<token postag='SENT_START'/>
<marker>
<token regexp="yes">\d+(?:\.\d+)?</token>
<token>.</token>
<token regexp="yes" min="1" max="3">[—–‒-]</token>
</marker>
</pattern>
<message>Os trazos longos son innecesarios en enumeracións.</message>
<suggestion>\2.</suggestion>
<example correction="1."><marker>1.-</marker> Introdución</example>
<example correction="1."><marker>1.--</marker> Introdución</example>
<example correction="1.3."><marker>1.3.—</marker> Introdución</example>
<example>1466–1469 — Gran Guerra Irmandiña</example>
<example>50-30</example>
<example>…cunha pedra…—, penso que…</example>
</rule>
</rulegroup>
<rulegroup id='HYPOTHESIS_TYPOGRAPHY' name='Tipografia de Hipóteses'>
<!-- Created by Tiago F. Santos, 2017-09-01 -->
<rule>
<pattern case_sensitive='yes'>
<token>H0</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₀</suggestion>
<example correction='H₀'><marker>H0</marker>: Non existen efectos significativos.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H1</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₁</suggestion>
<example correction='H₁'><marker>H1</marker>: Existen efectos significativos co composto A.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H2</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₂</suggestion>
<example correction='H₂'><marker>H2</marker>: Existen efectos significativos co composto B.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H3</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₃</suggestion>
<example correction='H₃'><marker>H3</marker>: Existen efectos significativos cos compostos A e B combinados.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H4</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₄</suggestion>
<example correction='H₄'><marker>H4</marker>: Existen efectos significativos na ausencia do composto C.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H5</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₅</suggestion>
<example correction='H₅'><marker>H5</marker>: Existen efectos significativos do composto C.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H6</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₆</suggestion>
<example correction='H₆'><marker>H6</marker>: Existen efectos significativos do composto D.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H7</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>
<suggestion>H₇</suggestion>
<example correction='H₇'><marker>H7</marker>: Existen efectos significativos do composto E.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H8</token>
</pattern>
<message>Prefira o símbolo tipográfico.</message>
<suggestion>H₈</suggestion>
<example correction='H₈'><marker>H8</marker>: Existen efectos significativos do composto F.</example>
</rule>
<rule>
<pattern case_sensitive='yes'>
<token>H9</token>
</pattern>
<message>O símbolo tipográfico é máis claro.</message>