Revision: 6783
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=6783&view=rev
Author:   dominikoeo
Date:     2012-04-25 08:14:13 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
[fr] added rule to French disambiguator to tag word after "des", 
     "plusieurs", "quelques", "une", "chaque" as a noun only
     otherwise we don't detect accord mismatch as in *des faute*
     since word "faute" can not only be a noun but also a verb
     (however after a word such as "des" it cannot be a verb).

Modified Paths:
--------------
    trunk/JLanguageTool/src/resource/fr/disambiguation.xml
    trunk/JLanguageTool/src/rules/fr/grammar.xml

Modified: trunk/JLanguageTool/src/resource/fr/disambiguation.xml
===================================================================
--- trunk/JLanguageTool/src/resource/fr/disambiguation.xml      2012-04-24 
20:36:39 UTC (rev 6782)
+++ trunk/JLanguageTool/src/resource/fr/disambiguation.xml      2012-04-25 
08:14:13 UTC (rev 6783)
@@ -73,6 +73,17 @@
     <disambig postag="D f s"/>
   </rule>
 
+  <!-- So that word "faute" (etc) as in "des faute", "une fautes" is marked as
+       a noun and not a verb, otherwise we don't find the incorrect
+       accord in number -->
+  <rule name="nom" id="N">
+    <pattern mark="1">
+      <token regexp="yes">des|quelques|plusieurs|nombreuses|une|chaque</token>
+      <token postag="N.*" postag_regexp="yes"/>
+    </pattern>
+    <disambig action="filter" postag="N.*"/>
+  </rule>
+
   <rulegroup name="été (nom)" id="ETE">
     <rule>
       <pattern mark="1">

Modified: trunk/JLanguageTool/src/rules/fr/grammar.xml
===================================================================
--- trunk/JLanguageTool/src/rules/fr/grammar.xml        2012-04-24 20:36:39 UTC 
(rev 6782)
+++ trunk/JLanguageTool/src/rules/fr/grammar.xml        2012-04-25 08:14:13 UTC 
(rev 6783)
@@ -1986,6 +1986,8 @@
         <example type="correct">Les pâtes ne sont pas bonnes car trop 
cuites.</example>
         <example type="incorrect">Il est parti <marker>au États-Unis</marker> 
pour étudier.</example>
         <example type="correct">Il est parti aux États-Unis pour 
étudier.</example>
+        <example type="incorrect"><marker>Une fautes</marker>.</example>
+        <example type="correct">Une faute.</example>
       </rule>
       <rule name="pluriel suivi du singulier">
         <pattern mark_from="1" mark_to="-1">
@@ -2031,6 +2033,8 @@
         <example type="correct">Pauvres du monde</example>
         <example type="correct">Quarante pour cent des femmes</example>
         <example type="correct">Vos nom et prénom, s’il vous plaît.</example>
+        <example type="incorrect"><marker>Des faute</marker>.</example>
+        <example type="correct">Des fautes.</example>
       </rule>
     </rulegroup>
     <rulegroup id="ACCORD_GENRE" name="Accord en genre">

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs

Reply via email to