Revision: 6946
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=6946&view=rev
Author:   dnaber
Date:     2012-05-16 22:36:33 +0000 (Wed, 16 May 2012)
Log Message:
-----------
remove support for mark_from/mark_to for pattern rules

Modified Paths:
--------------
    
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/PatternRuleLoader.java
    trunk/JLanguageTool/src/rules/rules.xsd

Modified: 
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/PatternRuleLoader.java
===================================================================
--- 
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/PatternRuleLoader.java
 2012-05-16 22:24:32 UTC (rev 6945)
+++ 
trunk/JLanguageTool/src/java/org/languagetool/rules/patterns/PatternRuleLoader.java
 2012-05-16 22:36:33 UTC (rev 6946)
@@ -99,7 +99,6 @@
     if ("category".equals(qName)) {
       final String catName = attrs.getValue("name");
       final String priorityStr = attrs.getValue("priority");
-      // int prio = 0;
       if (priorityStr == null) {
         category = new Category(catName);        
       } else {
@@ -259,7 +258,6 @@
     } else if (qName.equals("marker") && inPattern) {
       endPos = tokenCountForMarker;
     } else if (qName.equals(PATTERN)) {
-      checkMarkPositions();
       inPattern = false;
       if (lastPhrase) {
         elementList.clear();
@@ -276,7 +274,7 @@
       if (inCorrectExample) {
         correctExamples.add(correctExample.toString());
       } else if (inIncorrectExample) {
-        IncorrectExample example = null;
+        final IncorrectExample example;
         final String[] corrections = exampleCorrection.toString().split("\\|");
         if (corrections.length > 0 && corrections[0].length() > 0) {
           example = new IncorrectExample(incorrectExample.toString(), 
corrections);
@@ -336,14 +334,9 @@
     if (startPos != -1 && endPos != -1) {
       rule.setStartPositionCorrection(startPos);
       rule.setEndPositionCorrection(endPos - tokenCountForMarker);
-    } else {
-      rule.setStartPositionCorrection(startPositionCorrection);
-      rule.setEndPositionCorrection(endPositionCorrection);
     }
     startPos = -1;
     endPos = -1;
-    startPositionCorrection = 0;
-    endPositionCorrection = 0;
     rule.setCorrectExamples(correctExamples);
     rule.setIncorrectExamples(incorrectExamples);
     rule.setCategory(category);

Modified: trunk/JLanguageTool/src/rules/rules.xsd
===================================================================
--- trunk/JLanguageTool/src/rules/rules.xsd     2012-05-16 22:24:32 UTC (rev 
6945)
+++ trunk/JLanguageTool/src/rules/rules.xsd     2012-05-16 22:36:33 UTC (rev 
6946)
@@ -131,10 +131,6 @@
                                <xs:element ref="unify" />
                                <xs:element ref="marker" />
                        </xs:choice>
-                       <xs:attribute name="mark_from" 
type="xs:nonNegativeInteger"
-                               use="optional" />
-                       <xs:attribute name="mark_to" 
type="xs:nonPositiveInteger"
-                               use="optional" />
                        <xs:attribute name="case_sensitive" type="binaryYesNo"
                                use="optional" />
                </xs:complexType>

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