summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/regexp/regexplist.xml
blob: 1cd0b23df7c6c2a56082ea8625a03acb20fafa5c (plain)
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
<!--
	This file contains the list of regular expressions the plugin should check for.
	Please, follow this syntax:
		<regexplist>
			<item>
				<name></name>
				<exp></exp>
				<cs/> (only when the expression needs to be case sensitive)
			</item>
			...
		</regexplist>
	 
	Right now the file should be copied to ~/.kde/share/apps/kbabel/regexplist.xml. I'm sorry this cannot be configured but hope it will in the future. By the time if you need another location you have to modify the source code (main.cc)

	You'll see in the example that most expressions start with '(^| |\\t)+' and then a word. This is to ensure it _is_ a word. Using the usual expressions to ensure we pick up a whole word doesn't work for the catalan language. Anyway, if you need to match a tab be sure you use the '\\t' expression.

	Right now names in expressions aren't much useful, but I aim to modify kbabel in order to give more information about the error found. And I will probably add a description tag to enable long explanations of the mistake.

	Also note the syntax of the file is quite strict. Mmmmm... too many words without a joke, this really doesn't seem to be open source :(
	-->

<regexplist>
	<item>
		<name>_el_ seguit de vocal</name>
		<exp>(^| |\\t)+el +[a,e,i,o,u][a-z]+</exp>
	</item>
	<item>
		<name>_la_ seguit de a,e,o</name>
		<exp>(^| |\\t)+la +[a,e,o][a-z]+</exp>
	</item>
	<item>
		<name>_per el_</name>
		<exp>(^| |\\t)+per +el( |\\t|$)+</exp>
	</item>
	<item>
		<name>_per els_</name>
		<exp>(^| |\\t)+per +els( |\\t|$)+</exp>
	</item>
	<item>
		<name>_de el_</name>
		<exp>(^| |\\t)+de +el( |\\t|$)+</exp>
	</item>
	<item>
		<name>_de els_</name>
		<exp>(^| |\\t)+de +els( |\\t|$)+</exp>
	</item>
	<item>
		<name>_a el_</name>
		<exp>(^| |\\t)+a +el( |\\t|$)+</exp>
	</item>
	<item>
		<name>_a els_</name>
		<exp>(^| |\\t)+a +els( |\\t|$)+</exp>
	</item>
	<item>
		<name>_al_ seguit de vocal</name>
		<exp>(^| |\\t)+al +[a,e,i,o,u][a-z]+</exp>
	</item>
	<item>
		<name>m'els</name>
		<exp>(^| |\\t)m'els( |\\t|$)+</exp>
	</item>
	<item>
		<name>mels</name>
		<exp>(^| |\\t)mels( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'el</name>
		<exp>(^| |\\t)s'el( |\\t|$)+</exp>
	</item>
	<item>
		<name>sel</name>
		<exp>(^| |\\t)sel( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'els</name>
		<exp>(^| |\\t)s'els( |\\t|$)+</exp>
	</item>
	<item>
		<name>sels</name>
		<exp>(^| |\\t)sels( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'em</name>
		<exp>(^| |\\t)s'em( |\\t|$)+</exp>
	</item>
	<item>
		<name>sem</name>
		<exp>(^| |\\t)sem( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'hem</name>
		<exp>(^| |\\t)s'hem( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'ens</name>
		<exp>(^| |\\t)s'ens( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'et</name>
		<exp>(^| |\\t)s'et( |\\t|$)+</exp>
	</item>
	<item>
		<name>susa</name>
		<exp>(^| |\\t)susa( |\\t|$)+</exp>
	</item>
	<item>
		<name>s'us</name>
		<exp>(^| |\\t)s'us( |\\t|$)+</exp>
	</item>
	<item>
		<name>su's</name>
		<exp>(^| |\\t)su's( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'els</name>
		<exp>(^| |\\t)t'els( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'el</name>
		<exp>(^| |\\t)t'el( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'em</name>
		<exp>(^| |\\t)t'em( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'ens</name>
		<exp>(^| |\\t)t'ens( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'en</name>
		<exp>(^| |\\t)t'en( |\\t|$)+</exp>
	</item>
	<item>
		<name>ten</name>
		<exp>(^| |\\t)ten( |\\t|$)+</exp>
	</item>
	<item>
		<name>t'ens</name>
		<exp>(^| |\\t)t'ens( |\\t|$)+</exp>
	</item>
	<item>
		<name>vos sense accent</name>
		<exp>(^| |\\t)vos( |\\t|$)</exp>
	</item>
	<item>
		<name>Terminal és masculí (si es tracta d'informàtica): el terminal</name>
		<exp>(^| |\\t)la +terminal( |\\t|$)</exp>
	</item>
	<item>
		<name>Terminal és masculí (si es tracta d'informàtica): un terminal</name>
		<exp>(^| |\\t)una +terminal( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)a +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)de +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)amb +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)per +que( |\\t|$)</exp>
	</item>
	<!-- En fase de test, últimes propostes d'en David -->
	
	<!--
	Abans de "aquest", "aquell", "algun", "un" i les seues variants no posarem
	 "a", sinó "en" (per a moviment i situació):
	Voleu desar el fitxer en aquesta carpeta?
	Tanmateix, per a la resta de casos cal posar "a"!
	
	Probablement comprovar "a un" donaria massa falsos positius.
	-->
	<!--
	<item>
		<name></name>
		<exp>(^| |\\t)a +(aquest|aquell|algun)( |\\t|$)</exp>
	</item>
	-->
	<!--
		El pronom es, davant d'un mot començat per sa-, se-, si-, so-, su-, ce- o
		ci-, s'escriurà sempre en la forma plena (se):
		
		Se sap que algunes característiques...
        Les propietats d'aquest programa se sumen a les de...
	-->
	<item>
		<name></name>
		<exp>(^| |\\t)es +(sa|se|si|so|su|ce|ci)</exp>
	</item>

	<!--
		En frases negatives, les partícules mai, cap, res, gens i ningú han de dur
		no sempre:
		
		No tragueu mai el disquet abans d'hora.
		Cap ordre no s'ha d'escriure en majúscules.
		Sense la contrasenya, ningú no està autoritzat a accedir a la informació.
	-->
	<!--
	<item>
		<name></name>
		<exp>(((^| |\\t)(mai|cap|res|gens|ningú)( |\\t|$))(?!.*(^| |\\t)no( |\\t|$)))|(((^| |\\t)(mai|cap|res|gens|ningú)( |\\t|$))(?!.*(^| |\\t)no( |\\t|$)))</exp>
	</item>
	-->
	<!--
	3.3. Construccions incorrectes
	Podríem buscar "donat que" per a substituir-ho per "atès que".
	"tals com" -> "com ara"
	"tal i com" -> "tal com"
	"teniu que" -> "heu de"/"heu d'"
	"en quant a" -> "pel que fa a", "quant a"
	-->
	<!--
	<item>
		<name></name>
		<exp>(^| |\\t)donat +que( |\\t|$)</exp>
	</item>
	-->
	<item>
		<name></name>
		<exp>(^| |\\t)tals +com( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)tal +i +com( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)teniu +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>

	<!--
		Softcatalà:
		* Hi han: El verb haver-hi és impersonal, per això no té plural en català central, atès que no té subjecte. Per tant, no es diu hi han, hi havien, hi hauran, sinó hi ha, hi havia, hi haurà, encara que el complement que el segueixi sigui plural.
	-->
	<item>
		<name></name>
		<exp>(^| |\\t)hi +han( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)hi +havien( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)hi +hauran( |\\t|$)</exp>
	</item>
	
	<!--
		Softcatalà:
		* Tenir que: És la traducció incorrecta al català de l'expressió castellana tener que. La forma correcta és haver de; també es pot utilitzar el verb impersonal caldre.
	-->
	<item>
		<name></name>
		<exp>(^| |\\t)teniu +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)tenim +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)tenen +que( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>
	<item>
		<name></name>
		<exp>(^| |\\t)en +quant +a( |\\t|$)</exp>
	</item>


</regexplist>