Revision: 9030
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9030&view=rev
Author:   jaumeortola
Date:     2013-01-15 20:07:58 +0000 (Tue, 15 Jan 2013)
Log Message:
-----------
[ca] Disabled two rules for Wikipedia check.
Rules improved: CatalanUnpairedBracketsRule.java, ESPAI_DESPRES_DE_PUNT.

Modified Paths:
--------------
    
trunk/JLanguageTool/src/main/java/org/languagetool/rules/ca/CatalanUnpairedBracketsRule.java
    
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ltcommunity/disabled_rules.properties
    trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml

Modified: 
trunk/JLanguageTool/src/main/java/org/languagetool/rules/ca/CatalanUnpairedBracketsRule.java
===================================================================
--- 
trunk/JLanguageTool/src/main/java/org/languagetool/rules/ca/CatalanUnpairedBracketsRule.java
        2013-01-15 13:26:49 UTC (rev 9029)
+++ 
trunk/JLanguageTool/src/main/java/org/languagetool/rules/ca/CatalanUnpairedBracketsRule.java
        2013-01-15 20:07:58 UTC (rev 9030)
@@ -61,11 +61,18 @@
                        return false;
 
                if (i > 1 && tokenStr.equals(")")) {
-                       int nOpeningParenthesis = 0;
-                       for (int k = 1; k < i; k++)
-                               if (tokens[k].getToken().equals("("))
-                                       nOpeningParenthesis++;
-                       if (nOpeningParenthesis % 2 == 0) {
+                       boolean isThereOpeningParenthesis = false;
+                       int k=1;
+                       while (i-k>0) {
+                               if (tokens[i-k].getToken().equals(")"))
+                                       break;
+                               if (tokens[i-k].getToken().equals("(")) {
+                                       isThereOpeningParenthesis=true;
+                                       break;
+                               }
+                               k++;
+                       }
+                       if (!isThereOpeningParenthesis) {
                                final Matcher mValidBeforeClosingParenthesis = 
VALID_BEFORE_CLOSING_PARENTHESIS
                                                .matcher(tokens[i - 
1].getToken());
                                if (mValidBeforeClosingParenthesis.matches())

Modified: 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ltcommunity/disabled_rules.properties
===================================================================
--- 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ltcommunity/disabled_rules.properties
      2013-01-15 13:26:49 UTC (rev 9029)
+++ 
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/ltcommunity/disabled_rules.properties
      2013-01-15 20:07:58 UTC (rev 9030)
@@ -9,4 +9,4 @@
 sl=POMIŠLJAJ_1,POMIŠLJAJ_2,POMIŠLJAJ_3
 en=EN_QUOTES,EN_UNPAIRED_BRACKETS,ENGLISH_WORD_REPEAT_BEGINNING_RULE
 ru=RU_UNPAIRED_BRACKETS
-ca=GUIONET_SOLT,EVITA_ACCENTUACIO_VALENCIANA,EVITA_VERBS_VALENCIANS,EVITA_VERBS_BALEARS,EVITA_VERBS_BALEARS_VALENCIANS,EVITA_POSSESSIUS_U,EVITA_PRONOMS_VALENCIANS,DEMOSTRATIUS_ESTE,DEMOSTRATIUS_EIXE,PUNTS_SUSPENSIUS
+ca=ESPAI_DESPRES_DE_PUNT,CA_UNPAIRED_BRACKETS,GUIONET_SOLT,EVITA_ACCENTUACIO_VALENCIANA,EVITA_VERBS_VALENCIANS,EVITA_VERBS_BALEARS,EVITA_VERBS_BALEARS_VALENCIANS,EVITA_POSSESSIUS_U,EVITA_PRONOMS_VALENCIANS,DEMOSTRATIUS_ESTE,DEMOSTRATIUS_EIXE,PUNTS_SUSPENSIUS

Modified: 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml
===================================================================
--- 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml    
    2013-01-15 13:26:49 UTC (rev 9029)
+++ 
trunk/JLanguageTool/src/main/resources/org/languagetool/rules/ca/grammar.xml    
    2013-01-15 20:07:58 UTC (rev 9030)
@@ -2812,7 +2812,7 @@
                     <token>com</token>
                     <token postag="AQ.[MC][SN].*|V.P.*SM" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> físic com 
estètic.</example>
                 <example type="correct">Tant físic com estètic.</example>
@@ -2828,7 +2828,7 @@
                     <token>com</token>
                     <token postag="AQ.[FC][SN].*|V.P.*SF" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> física com 
estètica.</example>
                 <example type="correct">Tant física com estètica.</example>
@@ -2844,7 +2844,7 @@
                     <token>com</token>
                     <token postag="AQ.[MC][PN].*|V.P.*PM" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> físics com 
estètics.</example>
                 <example type="correct">Tant físics com estètics.</example>
@@ -2859,7 +2859,7 @@
                     <token>com</token>
                     <token postag="AQ.[FC][PN].*|V.P.*PF" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> físiques com 
estètiques.</example>
                 <example type="correct">Tant físiques com estètiques.</example>
@@ -2889,7 +2889,7 @@
                     <token>no</token>
                     <token postag="AQ.[MC][SN].*|V.P.*SM" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> físic com no 
estètic.</example>
                 <example type="correct">Tant físic com no estètic.</example>  
@@ -2904,7 +2904,7 @@
                     <token>no</token>
                     <token postag="AQ.[FC][SN].*|V.P.*SF" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> física com no 
estètica.</example>
                 <example type="correct">Tant física com no estètica.</example> 
 
@@ -2919,7 +2919,7 @@
                     <token>no</token>
                     <token postag="AQ.[MC][PN].*|V.P.*PM" postag_regexp="yes"/>
                 </pattern>
-                <message>Hauria de ser: 
<suggestion>tant</suggestion>.</message>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
                 <short>Confusió.</short>
                 <example type="incorrect"><marker>tan</marker> físics com no 
estètics.</example>
                 <example type="correct">Tant físics com no estètics.</example> 
  
@@ -2929,6 +2929,21 @@
                     <marker>
                         <token>tan</token>
                     </marker>
+                    <token postag="AQ.[FC][PN].*|V.P.*PF" postag_regexp="yes" 
skip="10"/>
+                    <token>com</token>
+                    <token>no</token>
+                    <token postag="AQ.[FC][PN].*|V.P.*PF" postag_regexp="yes"/>
+                </pattern>
+                <message>En una loc. distributiva ("és tant físic com 
estètic") hauria de ser <suggestion>tant</suggestion>. Correcte en una loc. 
comparativa ("és tan covard com oportunista").</message>
+                <short>Confusió.</short>
+                <example type="incorrect"><marker>tan</marker> físiques com no 
estètiques.</example>
+                <example type="correct">Tant físics com no estètics.</example> 
  
+            </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token>tan</token>
+                    </marker>
                     <token regexp="yes" 
skip="10">jo|mi|tu|ella?|nosaltres|vosaltres|elle?s|vost[èé]s?|vós</token>
                     <token>com</token>
                     <token 
regexp="yes">jo|mi|tu|ella?|nosaltres|vosaltres|elle?s|vost[èé]s?|vós</token>
@@ -3647,9 +3662,9 @@
                     <marker>
                         <token regexp="yes">de|d'<exception 
postag=".*LOC_ADV.*" postag_regexp="yes"/></token>
                     </marker>
-                    <token><exception 
regexp="yes">manera|forma|què|qui(ns|na|nes)|mi</exception><exception 
postag="PP.*" postag_regexp="yes"/></token>
+                    <token><exception 
regexp="yes">manera|forma|què|qui(ns|na|nes)?|mi</exception><exception 
postag="PP.*" postag_regexp="yes"/></token>
                 </pattern>
-                <message>'Necessitar' no regeix la preposició 'de'. 
Elimineu-la. <suggestion></suggestion></message>
+                <message>'Necessitar' no regeix la preposició 'de'. 
Elimineu-la.</message>
                 <example type="incorrect">necessitava <marker>de</marker> 
comprensió</example>
                 <example type="incorrect">ha necessitat <marker>de</marker> 
comprensió</example>
                 <example type="correct">hi ha necessitat <marker>de</marker> 
comprensió</example>
@@ -8262,7 +8277,7 @@
                     <token><exception inflected="yes">haver</exception></token>
                     <token><exception inflected="yes">haver</exception></token>
                 </pattern>
-                <message>Possible redundància. Potser cal eliminar el pronom 
feble.<suggestion></suggestion></message>
+                <message>Possible redundància. Potser cal eliminar el pronom 
feble.</message>
                 <short>Possible redundància.</short>
                 <example type="incorrect">on <marker>hi</marker> tinc la 
consulta</example>
                 <example type="correct">on hi havia</example>
@@ -8279,7 +8294,7 @@
                     <token><exception inflected="yes">haver</exception></token>
                     <token><exception inflected="yes">haver</exception></token>
                 </pattern>
-                <message>Possible redundància. Potser cal eliminar el pronom 
feble.<suggestion></suggestion></message>
+                <message>Possible redundància. Potser cal eliminar el pronom 
feble.</message>
                 <short>Possible redundància.</short>
                 <example type="incorrect">en què <marker>hi</marker> tinc la 
consulta</example>
                 <example type="correct">en què hi havia</example>
@@ -8297,7 +8312,7 @@
                     <token><exception inflected="yes">haver</exception></token>
                     <token><exception inflected="yes">haver</exception></token>
                 </pattern>
-                <message>Possible redundància. Potser cal eliminar el pronom 
feble.<suggestion></suggestion></message>
+                <message>Possible redundància. Potser cal eliminar el pronom 
feble.</message>
                 <short>Possible redundància.</short>
                 <example type="incorrect">en els quals <marker>hi</marker> 
tinc la consulta</example>
                 <example type="correct">en els quals hi havia</example>
@@ -8744,7 +8759,7 @@
                 <token regexp="yes">..+</token> <!-- Evita abreviatures -->
                 <marker>
                     <token>.<exception postag="SENT_END"/></token>
-                    <token spacebefore="no"><exception 
postag="SENT_END"/><exception regexp="yes">[,.)"’”»ªº]</exception></token>
+                    <token spacebefore="no"><exception 
postag="SENT_END"/><exception regexp="yes">[,.)"’”»ªº\]\[]</exception></token>
                 </marker>
             </pattern>
             <message>Falta un espai després del punt <suggestion><match 
no="2"/> <match no="3" case_conversion="startupper"/></suggestion></message>
@@ -8756,6 +8771,8 @@
             <example type="correct">És així. </example>
             <example type="correct">És així.» </example>
             <example type="correct">Estelrich, etc., no hi</example>
+            <example type="correct">ha expressat [...] la necessitat</example>
+            <example type="correct">o simplement ornamental.[1]</example>
         </rule>
         <rule id="PUNT_EN_ABREVIATURES" name="Comprova que hi ha punt en 
abreviatures: pàg., núm., etc.">
             <pattern case_sensitive="no">

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


------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to