Revision: 8072
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=8072&view=rev
Author:   jaumeortola
Date:     2012-09-21 08:48:32 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
[ca] new rules

Modified Paths:
--------------
    
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ca/disambiguation.xml
    trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml
    
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/wrongWordInContext.txt

Modified: 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ca/disambiguation.xml
===================================================================
--- 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ca/disambiguation.xml
      2012-09-20 21:54:21 UTC (rev 8071)
+++ 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ca/disambiguation.xml
      2012-09-21 08:48:32 UTC (rev 8072)
@@ -5248,7 +5248,7 @@
     </rule>
     <rule id="NomParticipi" name="nom + participi , que no han concordat 
(comú)">
         <pattern>
-            <token postag="N.*|A.*" postag_regexp="yes"><exception 
postag="V.*" postag_regexp="yes"/></token>
+            <token postag="N.*" postag_regexp="yes"><exception 
postag="V.*|A.*" postag_regexp="yes"/></token>
             <marker>
                 <and>
                     <token postag="N.*" postag_regexp="yes"></token>
@@ -5258,6 +5258,19 @@
         </pattern>
         <disambig action="filter" postag="V.P.*|AQ.*"></disambig>
     </rule>
+    <rule id="NomParticipi2" name="nom + participi , que no han concordat 
(comú)">
+    <!--  exception: recent (erroni com a adverbi), "recent casats"  -->
+        <pattern>
+            <token postag="V.*|A.*" postag_regexp="yes"><exception 
postag="N.*" postag_regexp="yes"/><exception>recent</exception></token>
+            <marker>
+                <and>
+                    <token postag="N.*" postag_regexp="yes"></token>
+                    <token postag="V.P.*|AQ.*" postag_regexp="yes"><exception 
postag="_GN.*|SPS00|V.[GMIS].*|CC" postag_regexp="yes" /></token>
+                </and>
+            </marker>
+        </pattern>
+        <disambig action="filter" postag="N.*"></disambig>
+    </rule>
     <!-- nom + nom/prep  Enfrontament contra. Enfrontament sindical contra. 
Mogut per: "la gran via de" via (prep.)-->
     <rule id="nom_prep" name="nom + preposició">
         <pattern>
@@ -5865,4 +5878,10 @@
             <disambig action="add"><wd pos="allow_tant"></wd></disambig>
         </rule>
     </rulegroup>
+    <rule id="PUNTUACIO" name="signes de puntuació">
+        <pattern>
+            <token regexp="yes">[.,;:!?¡¿—–"…()]</token>
+        </pattern>
+        <disambig action="add"><wd pos="PUNCT"></wd></disambig>
+    </rule>
 </rules>
\ No newline at end of file

Modified: 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml
===================================================================
--- 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml    
    2012-09-20 21:54:21 UTC (rev 8071)
+++ 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml    
    2012-09-21 08:48:32 UTC (rev 8072)
@@ -545,7 +545,7 @@
                     <unify negate="yes">
                         <feature id="nombre" />
                         <feature id="genere" />
-                        <token postag="A.*|PX.*" 
postag_regexp="yes"><exception postag="complement|_GN_.*" postag_regexp="yes" 
/></token>
+                        <token postag="A.*|PX.*" 
postag_regexp="yes"><exception postag="complement" /></token>
                         <token postag="N.M.*" postag_regexp="yes"><exception 
postag="_GN_.*|A.*|V.[PIS].*" postag_regexp="yes" /><exception 
inflected="yes">numeral</exception></token>
                     </unify>
                 </pattern>
@@ -564,7 +564,7 @@
                     <unify negate="yes">
                         <feature id="nombre" />
                         <feature id="genere" />
-                        <token postag="A.*|PX.*" 
postag_regexp="yes"><exception postag="complement|_GN_.*" postag_regexp="yes" 
/></token>
+                        <token postag="A.*|PX.*" 
postag_regexp="yes"><exception postag="complement" /></token>
                         <token postag="N.F.*" postag_regexp="yes"><exception 
postag="_GN_.*|A.*|V.[PIS].*" postag_regexp="yes" /><exception 
inflected="yes">numeral</exception></token>
                     </unify>
                 </pattern>
@@ -577,6 +577,7 @@
                 <example type="correct">Magnífiques culleres.</example>
                 <example type="incorrect"><marker>Magnífiques 
cullera</marker>.</example>
                 <example type="incorrect"><marker>Magnífics 
cullera</marker>.</example>
+                <example type="incorrect">Dóna-hi l'<marker>últim 
ullada</marker>.</example>
             </rule>
         </rulegroup>
         <rulegroup id="CONCORDANCES_PARTICIPI_NOM" name="Concordances 
participi i nom">
@@ -1993,6 +1994,49 @@
             <example type="correct">Ha estat a punt de fer-ho</example>
         </rule>
     </rulegroup>
+    <rulegroup id="FALTA_CONDICIONAL" name="si hagués volgut, ho 
*hagués/hauria aconseguit">
+        <rule>
+            <pattern>
+                <token postag="SENT_START" skip="-1"><exception 
scope="next">si</exception></token>
+                <marker>
+                    <token postag="VASI.*" postag_regexp="yes" inflected="yes" 
skip="-1">haver<exception>si</exception></token>
+                </marker>
+                <token postag="SENT_END"/>
+            </pattern>
+            <message>Falta un verb en condicional: <suggestion><match no="2" 
postag="VASI(.+)" postag_regexp="yes" 
postag_replace="VAIC$1"/></suggestion></message>
+            <example type="incorrect">Aquí no s'<marker>hagués</marker> 
permès.</example>
+            <example type="correct">Aquí no s'hauria permès.</example>
+            <example type="correct">Aquí no s'haguera permès.</example>
+        </rule>
+        <rule>
+            <pattern>
+                <token skip="-1">si</token>
+                <token postag="VASI.*" postag_regexp="yes" inflected="yes" 
skip="-1">haver</token>
+                <marker>
+                    <token postag="VASI.*" postag_regexp="yes" inflected="yes" 
skip="-1">haver<exception postag="VAIC.*" postag_regexp="yes" 
scope="next"/></token>
+                </marker>
+                <token postag="SENT_END"/>
+            </pattern>
+            <message>Falta un verb en condicional: <suggestion><match no="3" 
postag="VASI(.+)" postag_regexp="yes" 
postag_replace="VAIC$1"/></suggestion></message>
+            <example type="incorrect">Si haguessis avisat, 
t'<marker>hagués</marker> esperat</example>
+            <example type="correct">Si haguessis avisat...</example>
+            <example type="correct">Si haguessis avisat, t'haguera 
esperat</example>
+            <example type="correct">Si haguessis avisat i m'haguessis esperat, 
hauríem anat junts</example>
+        </rule>
+        <rule>
+            <pattern> 
+                <marker>
+                    <token postag="VASI.*" postag_regexp="yes" inflected="yes" 
skip="-1">haver</token>
+                </marker>
+                <token skip="-1">si</token>
+                <token postag="VASI.*" postag_regexp="yes" 
inflected="yes">haver</token>
+            </pattern>
+            <message>Falta un verb en condicional: <suggestion><match no="3" 
postag="VASI(.+)" postag_regexp="yes" 
postag_replace="VAIC$1"/></suggestion></message>
+            <example type="incorrect">T'<marker>hagués</marker> esperat si 
haguessis avisat</example>
+            <example type="correct">T'haguera esperat si haguessis 
avisat</example>
+            <example type="correct">T'hauria esperat si haguessis 
avisat</example>
+        </rule>        
+    </rulegroup>
     </category>
     <category name="Determinants">
         <rule id="VARIS" name="varis com a determinant">
@@ -2527,6 +2571,16 @@
                 <example type="correct">Malgrat que és el millor.</example>
                 <example type="correct">Malgrat això que dius, 
m'alegro.</example>
             </rule>
+            <rule id="MALGRAT_MALGRAT_TOT" name="malgrat / malgrat tot">
+                <pattern>
+                    <token postag="SENT_START|PUNCT" postag_regexp="yes"/>
+                    <token>malgrat</token>
+                    <token>,</token>
+                </pattern>
+                <message>¿Volíeu dir <suggestion>malgrat tot</suggestion>, 
<suggestion>malgrat això</suggestion>?</message>
+                <example type="incorrect"><marker>malgrat,</marker></example>
+                <example type="correct">malgrat tot,</example>
+            </rule>
         </rulegroup>
         <rulegroup id="FINS_A" name="Revisa: «fins/fins a» «cap/cap a»">
             <rule>
@@ -2537,7 +2591,6 @@
                     <token postag="DA.*" postag_regexp="yes" 
inflected="yes">el</token>
                 </pattern>
                 <message>Només escrivim "fins el" quan vol dir "fins i tot". 
<suggestion>fins a</suggestion>.</message>
-                <short>Error ortogràfic.</short>
                 <example type="incorrect"><marker>Fins</marker> el mes que 
ve.</example>
                 <example type="correct">Fins al mes que ve.</example>
             </rule>
@@ -2546,14 +2599,38 @@
                     <marker>
                         <token>fins</token>
                     </marker>
-                    <token postag="DI.*" postag_regexp="yes"><exception 
postag="RG"></exception></token>
+                    <token postag="D[NI].*" postag_regexp="yes"><exception 
postag="RG"></exception></token>
                 </pattern>
                 <message>Només escrivim "fins" quan vol dir "fins i tot". 
<suggestion>fins a</suggestion>.</message>
-                <short>Error ortogràfic.</short>
                 <example type="incorrect"><marker>Fins</marker> un 4 
%.</example>
                 <example type="correct">Fins a un 4 %.</example>
                 <example type="correct">Fins molt més tard.</example>
+                <example type="incorrect"><marker>Fins</marker> quatre 
metres.</example>
             </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token>fins</token>
+                    </marker>
+                    <token regexp="yes">(\d[\d.,]+\d|\d+)</token>
+                </pattern>
+                <message>Només escrivim "fins" quan vol dir "fins i tot". 
<suggestion>fins a</suggestion>.</message>
+                <example type="incorrect"><marker>Fins</marker> 4 
metres.</example>
+                <example type="correct">Fins a 4 metres.</example>
+            </rule>
+             <rule>
+                <pattern>
+                    <marker>
+                        <token>fins</token>
+                        <token>de</token>
+                    </marker>
+                    <token regexp="yes">(\d[\d.,]+\d|\d+)</token>
+                </pattern>
+                <message>¿Volíeu dir <suggestion>de fins 
a</suggestion>.</message>
+                <example type="incorrect"><marker>Fins de</marker> 4 
metres.</example>
+                <example type="correct">De fins a 4 metres.</example>
+            </rule>
+            
             <!-- "Fins a" davant d'infinitiu-->
             <rule>
                 <pattern>
@@ -2563,7 +2640,6 @@
                     <token postag="V.N.*" postag_regexp="yes"></token>
                 </pattern>
                 <message>Cal escriure <suggestion>fins a</suggestion> davant 
d'infinitiu.</message>
-                <short>Expressió incorrecta.</short>
                 <example type="incorrect"><marker>Fins</marker> 
vèncer.</example>
                 <example type="correct"><marker>Fins a</marker> 
vèncer.</example>
             </rule>
@@ -2724,6 +2800,70 @@
         </rulegroup>
     </category>
     <category name="Confusions">
+        <rule id="A_LHORA_ALHORA" name="a l'hora/alhora">
+            <pattern>
+                <token inflected="yes" negate="yes">anar</token>
+                <marker>
+                    <token>a</token>
+                    <token>l'</token>
+                    <token>hora</token>
+                </marker>
+                <token><exception regexp="yes">de|d'</exception></token>
+                
+            </pattern>
+            <message>¿Volíeu dir <suggestion>alhora</suggestion>?</message>
+            <example type="incorrect" correction="alhora">capaç de mil 
maniobres <marker>a l'hora</marker> com Jordi Pujol</example>
+            <example type="correct">El rellotge no anava a l'hora.</example>
+            <example type="correct">Vine a l'hora de dinar.</example>
+        </rule>
+        <rulegroup id="PRESA_PRESSA" name="presa/pressa">
+            <rule>
+                <pattern>
+                    <token inflected="yes" 
regexp="yes">gos|ocell|topí|ansat</token>
+                    <token>de</token>
+                    <marker>
+                        <token>pressa</token>
+                    </marker>
+                </pattern>
+                <message>¿Volíeu dir <suggestion>presa</suggestion>?</message>
+                <example type="incorrect">gos de 
<marker>pressa</marker></example>
+                <example type="correct">gos de presa</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <token inflected="yes">fer</token>
+                    <marker>
+                        <token>pressa</token>
+                    </marker>
+                </pattern>
+                <message>¿Volíeu dir <suggestion>presa</suggestion>?</message>
+                <example type="incorrect">feia 
<marker>pressa</marker></example>
+                <example type="correct">feia presa</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token regexp="yes">pressa|presses</token>
+                    </marker>
+                    <token regexp="yes">de|d'</token>
+                    <token 
regexp="yes">xocolata|vista|possessió|raó|corrent|terra|força|so|aire</token>
+                </pattern>
+                <message>¿Volíeu dir <suggestion><match no="1" 
regexp_match="press(.+)" regexp_replace="pres$1"/></suggestion>?</message>
+                <example type="incorrect" correction="preses">dues 
<marker>presses</marker> de xocolata</example>
+                <example type="correct">En la presa de possessió</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <token inflected="yes" skip="1">córrer</token>
+                    <marker>
+                        <token>presa</token>
+                    </marker>
+                </pattern>
+                <message>¿Volíeu dir <suggestion>pressa</suggestion>?</message>
+                <example type="incorrect" correction="pressa">No corre gaire 
<marker>presa</marker>.</example>
+                <example type="correct">Em corre pressa</example>
+            </rule>        
+        </rulegroup>
         <rulegroup id="SOBRE_TOT_SOBRETOT" name="*sobre tot/sobretot">
             <rule>
                 <pattern>
@@ -2738,7 +2878,7 @@
                 <example type="correct">sobre tot el poble</example>
                 <example type="correct">sobre tot un poble</example>
                 <example type="correct">és sobretot un ciutadà honrat</example>
-                <!--  Hi ha casos indecidibles -->
+                <!--  Hi ha casos indecidibles: sobre tot això, sobre tot 
Barcelona -->
             </rule>
         </rulegroup>
         <rule id="FEN_FENT" name="*fen-me/fent-me">
@@ -2941,7 +3081,7 @@
                     </marker>
                     <token postag="A.*|V.P.*|DI.*|N.*" postag_regexp="yes"/>
                 </pattern>
-                <message>¿Volíeu dir <suggestion><match no="1" 
regexp_match="[Mm]ol(.*)" 
regexp_replace="molt$1"></match></suggestion>?</message>
+                <message>¿Volíeu dir <suggestion><match no="1" 
regexp_match="[Mm]ol(.*)" regexp_replace="molt$1"/></suggestion>?</message>
                 <example type="incorrect">estan <marker>mol</marker> 
arrelats</example>
                 <example type="incorrect">fa <marker>mol</marker> poc 
temps</example>
                 <example type="correct">fa molt poc temps</example>
@@ -3667,7 +3807,7 @@
             <example type="incorrect"><marker>asdgadfgafg</marker>.</example>
             <example type="correct"><marker>estat</marker>.</example>
         </rule>
-        <rule id="PER_PER" name="*peró/però alló/allò">
+        <rule id="PERO_ALLO" name="*peró/però alló/allò">
          <pattern>
                 <token postag="SENT_START"/>
                 <marker>
@@ -4039,6 +4179,29 @@
                 <example type="incorrect"><marker>venen</marker> a dir el 
mateix</example>
                 <example type="correct">vénen a dir el mateix</example>
             </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token skip="1">venen</token>
+                    </marker>
+                    <token 
regexp="yes">ganes|nàusees|ois|arcades|pensaments|grans|petits|donats</token> 
+                </pattern>
+                <message>¿Volíeu dir <suggestion>vénen</suggestion>?</message>
+                <example type="incorrect">em <marker>venen</marker> ganes de 
flagel·lar-me</example>
+                <example type="correct">em vénen ganes de dir-ho</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token skip="1">venen</token>
+                    </marker>
+                    <token>de</token>
+                    <token>gust</token> 
+                </pattern>
+                <message>¿Volíeu dir <suggestion>vénen</suggestion>?</message>
+                <example type="incorrect">em <marker>venen</marker> de 
gust</example>
+                <example type="correct">em vénen de gust</example>
+            </rule>
         </rulegroup>    
         <rulegroup id="MON" name="el *mon/món">
             <rule>
@@ -4660,11 +4823,11 @@
             <!-- pronom feble solt: caldria diferenciar dos casos: posposat i 
anteposat-->
             <rule>
                 <pattern>
-                    <token postag="P0.*|PP.*|V.[MNG].*" postag_regexp="yes" 
negate_pos="yes"><exception postag="V.[MNG].*" 
postag_regexp="yes"></exception></token>
+                    <token><exception 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00|V.[MNG].*" 
postag_regexp="yes"/></token>
                     <marker>
-                        <token postag="P0.*|PP.*" 
postag_regexp="yes"><exception 
regexp="yes">jo|mi|tu|ella?|nosaltres|vosaltres|elle?s|vost[èé]s?|vós</exception><exception
 postag="allow_saxon_genitive">'s</exception></token>
+                        <token 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00" 
postag_regexp="yes"><exception 
postag="allow_saxon_genitive">'s</exception></token>
                     </marker>
-                    <token postag="P0.*|PP.*|V.[^NGP].*" postag_regexp="yes" 
negate_pos="yes"><exception postag="P0.*|PP.*|V.[^NGP].*" 
postag_regexp="yes"></exception></token>
+                    <token><exception 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00|V.[SI].*" 
postag_regexp="yes"/></token>
                 </pattern>
                 <message>Pronom feble solt.</message>
                 <short>Pronom feble solt.</short>
@@ -4674,7 +4837,21 @@
             </rule>
             <rule>
                 <pattern>
+                    <token><exception 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00|V.[MNG].*" 
postag_regexp="yes"/></token>
                     <marker>
+                        <token 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00" 
postag_regexp="yes"></token>
+                        <token 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00" 
postag_regexp="yes"></token>
+                    </marker>
+                    <token><exception 
postag="P0.{6}|PP3CN000|PP3NN000|PP3..A00|PP3CP000|PP3CSD00|V.[SI].*" 
postag_regexp="yes"/></token>
+                </pattern>
+                <message>Pronoms febles solts.</message>
+                <short>Pronoms febles solts.</short>
+                <example type="incorrect">Jo no <marker>m'hi</marker> sentit 
mai espanyol.</example>
+                <example type="correct">Jo no m'he sentit mai 
espanyol.</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <marker>
                         <token postag="V.[^MNG].*" 
postag_regexp="yes"><exception postag="V.[MNG].*" 
postag_regexp="yes"></exception></token>
                     </marker>
                     <token postag="P0.*|PP.*" postag_regexp="yes" 
regexp="yes">['-].*</token>
@@ -6803,6 +6980,17 @@
             <example type="incorrect"><marker>Seguim endavant</marker> el 
pla.</example>
             <example type="correct">Seguim endavant amb el pla</example>
         </rule>
+        <rule id="UNA_VIDA_PER_ENDAVANT" name="Una vida *per endavant/al 
davant">
+            <pattern>
+                <token>una</token>
+                <token>vida</token>
+                <token>per</token>
+                <token>endavant</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>al davant</suggestion>?</message>
+            <example type="incorrect"><marker>una vida per 
endavant</marker></example>
+            <example type="correct">una vida al davant</example>
+        </rule>
         <rule id="A_BEN_SEGUR" name="a ben segur">
             <pattern>
                 <token>a</token>
@@ -6884,16 +7072,23 @@
         </rule>
         <rule id="AL_FRONT_DE" name="al front de">
             <pattern>
-                <token>a</token>
-                <token spacebefore="no">l</token>
-                <token skip="1">front</token>
-                <token regexp="yes">d'|de</token>
+                <marker>
+                    <token>a</token>
+                    <token spacebefore="no">l</token>
+                    <token skip="1">front</token>
+                    <token regexp="yes">d'|de</token>
+                </marker>
+                <token><exception postag="NP..G00" 
postag_regexp="yes"/></token>
+                <token><exception postag="NP..G00" 
postag_regexp="yes"/></token>
+                <token></token>
             </pattern>
             <message>Cal dir <suggestion>al davant <match no="4" 
/></suggestion> o <suggestion>al capdavant <match no="4" 
/></suggestion>.</message>
             <short>Expressió incorrecta</short>
             <example type="incorrect"><marker>Al front de</marker> 
l'orquestra.</example>
             <example type="incorrect"><marker>Al front hipotètic de</marker>l 
procés, hi ha el president.</example>
             <example type="correct"><marker>Al capdavant de</marker> 
l'orquestra.</example>
+            <example type="correct">enviar-lo al front de Madrid</example>
+            <example type="correct">enviar-lo al front de l'Ebre</example>
         </rule>
         <rule id="ACTE_SEGUIT" name="acte seguit">
             <pattern>
@@ -7002,13 +7197,14 @@
         </rule>
         <rule id="ARREL_DE" name="arrel de">
             <pattern>
-                <token>arrel</token>
-                <token inflected="yes">de</token>
+                <token regexp="yes">arrel|rel|raïl<exception 
postag="_GN_FS"/></token>
+                <token regexp="yes">de|d'</token>
             </pattern>
             <message>Expressió incorrecta quan equival a <suggestion>arran 
<match no="2"></match></suggestion>.</message>
-            <short>Expressió incorrecta quan equival a "arran de"</short>
             <example type="incorrect"><marker>arrel de</marker> la situació, 
ja no es parlen</example>
             <example type="correct"><marker>arran de</marker> la situació, ja 
no es parlen</example>
+            <example type="correct">una arrel de pi</example>
+            <example type="correct">l'arrel de quatre</example>
         </rule>
         <rule id="ATEMPTAT_A" name="atemptat a">
             <pattern>
@@ -7955,7 +8151,7 @@
         <rule id="NO_CAL_OBLIDAR" name="*no cal oblidar/cal no oblidar">
             <pattern>
                 <token>no</token>
-                <token inflected="yes">caldre</token>
+                <token inflected="yes" regexp="yes">caldre|convenir</token>
                 <token 
regexp="yes">oblidar|confondre|ignorar|desconèixer|desconéixer|descuidar</token>
             </pattern>
             <message>¿Volíeu dir <suggestion><match no="2" /> <match no="1" 
case_conversion="alllower" /> <match no="3" /></suggestion>?</message>
@@ -7963,6 +8159,7 @@
             <example type="incorrect"><marker>No cal oblidar</marker> que les 
coses són així.</example>
             <example type="incorrect"><marker>No cal confondre</marker> les 
coses.</example>
             <example type="correct"><marker>Cal no oblidar</marker> que les 
coses són així.</example>
+            <example type="incorrect" correction="convé no oblidar"> una 
realitat que <marker>no convé oblidar</marker>.</example>
         </rule>
         <rule id="PAPER_SECANT" name="paper secant">
             <pattern>
@@ -8349,6 +8546,28 @@
             <example type="incorrect"><marker>estatus quo</marker></example>
             <example type="correct">statu quo</example>
         </rule>
+        <rule id="VAGI_PER_ENDAVANT" name="*Vagi per (en)davant que">
+            <pattern>
+                <token postag="SENT_START|PUNCT" postag_regexp="yes"/>
+                <token regexp="yes">vagi|vaja</token>
+                <token>per</token>
+                <token regexp="yes">davant|endavant</token>
+                <token>que</token>
+            </pattern>
+            <message>Expressió incorrecta. <suggestion>Val a dir 
que</suggestion>, <suggestion>Cal advertir que</suggestion>, 
+                <suggestion>Primer de tot cal dir que</suggestion>.</message>
+            <example type="incorrect"><marker>Vagi per endavant que</marker> 
estic en contra d'aquestes dues idees</example>
+            <example type="correct">val a dir que</example>
+        </rule>
+        <rule id="VOLTA_ENRERE" name="*volta enrere">
+            <pattern>
+                <token>volta</token>
+                <token regexp="yes">enrere|arrere|endarrere</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>marxa <match 
no="2"/></suggestion>?</message>
+            <example type="incorrect" correction="marxa enrere">no hi ha 
<marker>volta enrere</marker></example>
+            <example type="correct">no hi ha marxa enrere</example>
+        </rule>
         <rulegroup id="ALGUN_QUE_ALTRE" name="*algun que altre">
             <rule>
                 <pattern>
@@ -8378,6 +8597,78 @@
             </rule>
         </rulegroup>        
     </category>
+    <category name="Ordenació incorrecta">
+        <rule id="NO_ORDRE_INCORRECTE" name=" ordre incorrecte: *a no... sinó 
a / no a... sinó a ">
+            <pattern>
+                <marker>    
+                    <token postag="SENT_START" negate_pos="yes"><exception 
regexp="yes">que|,</exception></token>
+                    <token skip="-1">no</token>
+                </marker>
+                <token>sinó</token>
+                <token><match no="0"/></token>
+            </pattern>
+            <message>Ordre dubtós en l'estructura 'no... sinó'. ¿Volíeu dir 
<suggestion><match no="2"/> <match no="1"/></suggestion>?</message>
+            <example type="incorrect" correction="no a">dedicar-se <marker>a 
no</marker> concretar sinó a fer aritmètica.</example>
+            <example type="correct">No de lluny sinó de prop</example>
+            <example type="correct">que no tenen una funció directa, sinó que 
mantenen</example>
+        </rule>
+        <rule id="COM_SI_ES_TRACTES" name="com si es tractés">
+            <pattern>
+                <token>com</token>
+                <token>si</token>
+                <token regexp="yes" skip="10">de|d'</token>
+                <token>es</token>
+                <token regexp="yes">tractés|tractara|tractàs</token>
+            </pattern>
+            <message>Ordre defectuós.<suggestion>com si es <match no="5"/> 
<match no="3" include_skipped="all"/></suggestion></message>
+            <example type="incorrect"><marker>com si d'un heroi es 
tractés</marker></example>
+            <example type="correct">com si es tracés d'un heroi</example>
+        </rule>
+        <rule id="HI_HAVIA_UNA_VEGADA" name="*Hi havia una vegada / Una vegada 
hi havia">
+            <pattern>
+                <token postag="SENT_START|PUNCT" postag_regexp="yes"/>
+                <token>hi</token>
+                <token>havia</token>
+                <token>una</token>
+                <token>vegada</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>una vegada hi 
havia</suggestion>?</message>
+            <example type="incorrect"><marker>hi havia una 
vegada</marker></example>
+            <example type="correct">una vegada hi havia</example>
+        </rule>
+        <rule id="PER_AIXI_DIRHO" name="*per així dir-ho/per dir-ho així">
+            <pattern>
+                <token>per</token>
+                <token>així</token>
+                <token>dir</token>
+                <token>-ho</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>per dir-ho 
així</suggestion>?</message>
+            <example type="incorrect"><marker>per així 
dir-ho</marker></example>
+            <example type="correct">per dir-ho així</example>
+        </rule>
+        <rule id="QUE_CENT_ANYS_DURI" name="*que cent anys duri/que duri cent 
anys">
+            <pattern>
+                <token>que</token>
+                <token regexp="yes">cent|mil</token>
+                <token>anys</token>
+                <token regexp="yes">dur[ei]</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>que <match no="4"/> <match 
no="2"/> anys</suggestion>?</message>
+            <example type="incorrect"><marker>que cent anys 
duri</marker></example>
+            <example type="correct">que duri cent anys</example>
+        </rule>
+        <rule id="ENLLA_I_ENCA" name="*enllà i ençà/ençà i enllà">
+            <pattern>
+                <token>enllà</token>
+                <token>i</token>
+                <token>ençà</token>
+            </pattern>
+            <message>¿Volíeu dir <suggestion>ençà i 
enllà</suggestion>?</message>
+            <example type="incorrect"><marker>enllà i ençà</marker></example>
+            <example type="correct">ençà i enllà</example>
+        </rule>
+    </category>
     <category name="Paraules incorrectes">
         <rulegroup id="ET_SEMBLA" name="*et sembla? / et sembla bé?">
             <rule>
@@ -8534,7 +8825,7 @@
         </rulegroup>
     </category>
     <category name="Paraules dubtoses">
-        <rulegroup id="GD62LC" name="paraules incloses en el GD62LC: 
desangelat" default="on">
+        <rulegroup id="GD62LC" name="paraules incloses en el GD62LC i el DOPV 
(AVL): desangelat" default="on">
             <rule>
                 <pattern>
                     <token regexp="yes">desangela(t|ts|da|des)</token>
@@ -8548,8 +8839,18 @@
                 <example type="correct">Una casa sense gràcia.</example>
             </rule>
         </rulegroup>
-    </category>
-                        
+        <rulegroup id="AVL" name="paraules incloses en el DCVB i el DOPV 
(AVL): sentinel·la" default="on">
+            <rule>
+                <pattern>
+                    <token regexp="yes">sentinel·l(a|es)</token>
+                </pattern>
+                <message>Paraula dubtosa. Es pot dir: 
+                    <suggestion><match no="1" regexp_match="sentinel·l(.+)" 
regexp_replace="sentinell$1"/></suggestion>.</message>
+                <example type="incorrect" correction="sentinella">El 
<marker>sentinel·la</marker>.</example>
+                <example type="correct">El sentinella.</example>
+            </rule>
+        </rulegroup>
+    </category>      
     <category name="Sintaxi">
         <rulegroup id="FALTA_ELEMENT" name="Falta un element entre verbs: hi 
ha una cosa *(que) és clara">
             <rule>
@@ -8660,8 +8961,7 @@
         </rulegroup>
         <rule id="DE_INFINITIU_CONDICIONAL" name="de+infinitiu condicional">
             <pattern>
-                <!-- Millor: Inici de frase o símbol de puntuació -->
-                <token postag="SENT_START|UNKNOWN" postag_regexp="yes"/>
+                <token postag="SENT_START|PUNCT" postag_regexp="yes"/>
                 <marker>
                     <token regexp="yes">de|d'</token>
                 </marker>

Modified: 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/wrongWordInContext.txt
===================================================================
--- 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/wrongWordInContext.txt
     2012-09-20 21:54:21 UTC (rev 8071)
+++ 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/wrongWordInContext.txt
     2012-09-21 08:48:32 UTC (rev 8072)
@@ -1,12 +1,15 @@
 #word1 word2   match1  match2  context1        context2        [explanation1   
explanation2]
 #do not forget to add tests to CatalanWrongWordInContextRuleTest.java
 # rendible/rentable
-rendibles?     rentables?      ndib    ntab    
cars?|cara|cares|barat.*|terminis?|interès|interess.*|result.*|produ.*|pag.*|cobr.*|negoci.*|fira|empres.*|ven.*|compr.*|companyi.*|econòm.*|econom.*|treball.*|project.*|inver.*|conre.*|culti.*
       roba|robes|teixits?|pells?|cuir.*|empaperats?   que rendeix 
econòmicament       que es pot rentar
+(?i)rendibles? (?i)rentables?  ndib    ntab    
(?i)cars?|cara|cares|barat.*|terminis?|interès|interess.*|result.*|produ.*|pag.*|cobr.*|negoci.*|fira|empres.*|ven.*|compr.*|companyi.*|econòm.*|econom.*|treball.*|project.*|inver.*|conre.*|culti.*
   (?i)roba|robes|teixits?|pells?|cuir.*|empaperats?       que rendeix 
econòmicament       que es pot rentar
 # escortar/escoltar (cal ampliar-ho...)
-escort.*       escolt.*        ort     olt     
polici.*|guàrdi.*|vigil.*|enxamp.*|atrap.*|deté.*|deten.*|detin.*|presó|presoner.*|calabós
      
atent.*|atenció|parl.*|veus?|ràdios?|concerts?|peça|peces|simfoni.*|cant.*      
acompanyar      aplicar l'orella
+(?i)escort.*   (?i)escolt.*    ort     olt     
(?i)polici.*|guàrdi.*|vigil.*|enxamp.*|atrap.*|deté.*|deten.*|detin.*|presó|presoner.*|calabós
  
(?i)atent.*|atenció|parl.*|veus?|ràdios?|concerts?|peça|peces|simfoni.*|cant.*  
acompanyar      aplicar l'orella
 # escorta (jugador de bàsquet)/escolta
 #venda/bena
-#infligir/infringir (should be always case insensitive?)
-[Ii]nflig.*    [Ii]nfring.*    li      rin     
mals?|dolors?|patiments?|càstigs?|tortur.*|pena|penes|agressi.*|col?ps? 
norma|normes|lleis?|[Cc]onstituci.*|pactes?|regla|regles        aplicar 
transgredir
+#infligir/infringir
+(?i)inflig.*   (?i)infring.*   li      rin     
(?i)mals?|dolors?|patiments?|càstigs?|tortur.*|pena|penes|agressi.*|col?ps?     
(?i)norma|normes|lleis?|[Cc]onstituci.*|pactes?|regla|regles    aplicar 
transgredir
 #veta/beta
-veta   beta    v       b       
aigua|aigües|subterran.+|minerals?|roca|pedra|tira.*|tirà.+|segu.+      
partícula|lletra|grec|física|alfabet    cinta, filó     lletra grega    
\ No newline at end of file
+(?i)veta|vetes (?i)beta|betes  v       b       
(?i)aigua|aigües|subterran.+|minerals?|roca|pedra|tir.*|segu.+|cosi.+|cosí.+|cus.*
      (?i)partícul.+|lletr.*|gre[gc].*|física|alfab.+ cinta, filó     lletra 
grega
+#fressat/fresat
+(?i)fress[aeioà].*     (?i)fres[aeioà].*       ess     es      
(?i)camí|camins|territoris?|valls?|recorreguts?|send.+|sorolls?|pista|pistes|molest.*|queix.+|asfalt.*|ruta|rutes|desvia.+|trams?|esquell.+
     (?i)llevat|farina|peix|peixos|ous?|amfibis?     trepitjar, fer soroll,...  
     pondre, mesclar,...
+               
\ No newline at end of file

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Languagetool-commits mailing list
Languagetool-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to