Revision: 9949
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=9949&view=rev
Author:   dnaber
Date:     2013-04-16 21:23:06 +0000 (Tue, 16 Apr 2013)
Log Message:
-----------
[en] extend the for/fro rule

Modified Paths:
--------------
    
trunk/languagetool/languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/grammar.xml

Modified: 
trunk/languagetool/languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/grammar.xml
===================================================================
--- 
trunk/languagetool/languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/grammar.xml
        2013-04-16 21:04:08 UTC (rev 9948)
+++ 
trunk/languagetool/languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/grammar.xml
        2013-04-16 21:23:06 UTC (rev 9949)
@@ -680,19 +680,49 @@
             <example correction="away from" type="incorrect">He is 
<marker>away fro</marker> the sea.</example>
             <example type="correct">He is away from the sea.</example>
         </rule>
-        <rule id="FRO_A_WHILE" name="fro a while (for a while)">
-            <pattern>
-                <marker>
-                    <token>fro</token>
-                </marker>
-                <token regexp="yes">a|an</token>
-                <token 
regexp="yes">while|weekend|month|year|hour|minute|second|week</token>
-            </pattern>
-            <message>Did you mean <suggestion>for</suggestion>?</message>
-            <short>Possible typo</short>
-            <example type="correct">I went there for a weekend.</example>
-            <example correction="for" type="incorrect">I went there 
<marker>fro</marker> a weekend.</example>
-        </rule>
+        <rulegroup id="FOR_FRO" name="fro a while (for a while)">
+            <rule>
+                <pattern>
+                    <!-- phrase "to and fro" = to back and forth -->
+                    <!-- problem with double negation - does not detect: "For 
him and fro me." -->
+                    <token negate="yes">to</token>
+                    <token negate="yes">and</token>
+                    <marker>
+                        <token>fro</token>
+                    </marker>
+                </pattern>
+                <message>Did you mean <suggestion>for</suggestion>?</message>
+                <example type="correct"><marker>For</marker> me.</example>
+                <example type="correct">And <marker>for</marker> me.</example>
+                <example type="correct">That's good <marker>for</marker> 
your.</example>
+                <example correction="for" type="incorrect">That's good 
<marker>fro</marker> your.</example>
+                <example correction="for" type="incorrect">And good 
<marker>fro</marker> your.</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <token postag="SENT_START"></token>
+                    <marker>
+                        <token>Fro</token>
+                    </marker>
+                </pattern>
+                <message>Did you mean <suggestion>for</suggestion>?</message>
+                <example type="correct"><marker>For</marker> me.</example>
+                <example correction="For" 
type="incorrect"><marker>Fro</marker> me.</example>
+            </rule>
+            <rule>
+                <pattern>
+                    <marker>
+                        <token>fro</token>
+                    </marker>
+                    <token regexp="yes">a|an</token>
+                    <token 
regexp="yes">while|weekend|month|year|hour|minute|second|week</token>
+                </pattern>
+                <message>Did you mean <suggestion>for</suggestion>?</message>
+                <short>Possible typo</short>
+                <example type="correct">I went there for a weekend.</example>
+                <example correction="for" type="incorrect">I went there 
<marker>fro</marker> a weekend.</example>
+            </rule>
+        </rulegroup>
         <rulegroup id="HOUR_OUR" name="half an our (half an hour)">
             <rule>
                 <pattern>

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


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits

Reply via email to