diff options
Diffstat (limited to 'kbabel/datatools/regexp/regexplist.xml')
-rw-r--r-- | kbabel/datatools/regexp/regexplist.xml | 303 |
1 files changed, 303 insertions, 0 deletions
diff --git a/kbabel/datatools/regexp/regexplist.xml b/kbabel/datatools/regexp/regexplist.xml new file mode 100644 index 00000000..1cd0b23d --- /dev/null +++ b/kbabel/datatools/regexp/regexplist.xml @@ -0,0 +1,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>
\ No newline at end of file |