Revision: 7458
          
http://languagetool.svn.sourceforge.net/languagetool/?rev=7458&view=rev
Author:   milek_pl
Date:     2012-06-22 13:16:52 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------
experimental: maybe the wordlist-based German dictionary is enough? please 
test..

Modified Paths:
--------------
    trunk/JLanguageTool/src/java/org/languagetool/language/GermanyGerman.java
    trunk/JLanguageTool/src/resource/en/hunspell/README_en_CA.txt

Added Paths:
-----------
    
trunk/JLanguageTool/src/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRule.java
    trunk/JLanguageTool/src/resource/de/hunspell/de_DE.dict
    trunk/JLanguageTool/src/resource/de/hunspell/de_DE.info

Modified: 
trunk/JLanguageTool/src/java/org/languagetool/language/GermanyGerman.java
===================================================================
--- trunk/JLanguageTool/src/java/org/languagetool/language/GermanyGerman.java   
2012-06-22 12:55:56 UTC (rev 7457)
+++ trunk/JLanguageTool/src/java/org/languagetool/language/GermanyGerman.java   
2012-06-22 13:16:52 UTC (rev 7458)
@@ -18,6 +18,26 @@
  */
 package org.languagetool.language;
 
+import java.util.Arrays;
+import java.util.List;
+
+import org.languagetool.rules.CommaWhitespaceRule;
+import org.languagetool.rules.GenericUnpairedBracketsRule;
+import org.languagetool.rules.Rule;
+import org.languagetool.rules.UppercaseSentenceStartRule;
+import org.languagetool.rules.WhitespaceRule;
+import org.languagetool.rules.de.AgreementRule;
+import org.languagetool.rules.de.CaseRule;
+import org.languagetool.rules.de.CompoundRule;
+import org.languagetool.rules.de.DashRule;
+import org.languagetool.rules.de.GermanDoublePunctuationRule;
+import org.languagetool.rules.de.GermanWordRepeatBeginningRule;
+import org.languagetool.rules.de.GermanWordRepeatRule;
+import org.languagetool.rules.de.GermanWrongWordInContextRule;
+import org.languagetool.rules.de.WiederVsWiderRule;
+import org.languagetool.rules.de.WordCoherencyRule;
+import org.languagetool.rules.de.MorfologikGermanyGermanSpellerRule;
+
 public class GermanyGerman extends German {
 
   @Override
@@ -30,4 +50,28 @@
     return "German (Germany)";
   }
 
+  @Override
+  public List<Class<? extends Rule>> getRelevantRules() {
+    return Arrays.asList(
+            CommaWhitespaceRule.class,
+            GermanDoublePunctuationRule.class,
+            GenericUnpairedBracketsRule.class,            
+            UppercaseSentenceStartRule.class,
+            WhitespaceRule.class,
+            // specific to German:
+            GermanWordRepeatRule.class,
+            GermanWordRepeatBeginningRule.class,
+            GermanWrongWordInContextRule.class,
+            AgreementRule.class,
+            CaseRule.class,
+            CompoundRule.class,
+            DashRule.class,
+            WordCoherencyRule.class,
+            WiederVsWiderRule.class,
+            //specific to Germany: speller
+            MorfologikGermanyGermanSpellerRule.class
+    );
+  }
+
+  
 }

Added: 
trunk/JLanguageTool/src/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRule.java
===================================================================
--- 
trunk/JLanguageTool/src/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRule.java
                              (rev 0)
+++ 
trunk/JLanguageTool/src/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRule.java
      2012-06-22 13:16:52 UTC (rev 7458)
@@ -0,0 +1,45 @@
+/* LanguageTool, a natural language style checker 
+ * Copyright (C) 2012 Marcin Miłkowski (http://www.languagetool.org)
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+package org.languagetool.rules.de;
+
+import java.util.ResourceBundle;
+
+import org.languagetool.Language;
+import org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule;
+
+public final class MorfologikGermanyGermanSpellerRule extends 
MorfologikSpellerRule {
+
+    private static final String RESOURCE_FILENAME = "/de/hunspell/de_DE.dict";
+    
+    public MorfologikGermanyGermanSpellerRule(ResourceBundle messages,
+            Language language) {
+        super(messages, language);
+    }
+
+    @Override
+    public String getFileName() {
+        return RESOURCE_FILENAME;
+    }
+    
+    public final String getId() {
+        return "MORFOLOGIK_RULE_DE_DE";
+    }
+
+}


Property changes on: 
trunk/JLanguageTool/src/java/org/languagetool/rules/de/MorfologikGermanyGermanSpellerRule.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Added: trunk/JLanguageTool/src/resource/de/hunspell/de_DE.dict
===================================================================
(Binary files differ)


Property changes on: trunk/JLanguageTool/src/resource/de/hunspell/de_DE.dict
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/JLanguageTool/src/resource/de/hunspell/de_DE.info
===================================================================
--- trunk/JLanguageTool/src/resource/de/hunspell/de_DE.info                     
        (rev 0)
+++ trunk/JLanguageTool/src/resource/de/hunspell/de_DE.info     2012-06-22 
13:16:52 UTC (rev 7458)
@@ -0,0 +1,9 @@
+#
+# Dictionary properties.
+#
+
+fsa.dict.separator=+
+fsa.dict.encoding=iso-8859-1
+
+fsa.dict.uses-prefixes=false
+fsa.dict.uses-infixes=false
\ No newline at end of file

Modified: trunk/JLanguageTool/src/resource/en/hunspell/README_en_CA.txt
===================================================================
--- trunk/JLanguageTool/src/resource/en/hunspell/README_en_CA.txt       
2012-06-22 12:55:56 UTC (rev 7457)
+++ trunk/JLanguageTool/src/resource/en/hunspell/README_en_CA.txt       
2012-06-22 13:16:52 UTC (rev 7458)
@@ -1,39 +1,3 @@
-Wordlist en_CA spelling and morphological dictionary for OpenOffice.org
-Version 2008-12-18
-
-Based on Wordlist Hunspell dictionaries version 2008-12-05
-and Wordlist POS and AGID data created by Kevin Atkinson
-and released on http://wordlist.sourceforge.net.
-
-Other fixes:
-
-OOo Issue 48060 - add numbers with affixes by COMPOUNDRULE (1st, 111th, 1990s 
etc.)
-New REP items (better suggestions for accented words and a few mistakes)
-OOo Issue 63541 - remove *dessicated, *dessication
-
-László Németh <nemeth at OO.o>
-
-Original license:
-
-2008-12-05 Release
-
-README file for en_US and en_CA Hunspell dictionaries
-
-These dictionaries are created using the speller/make-hunspell-dict
-dictionary in SCOWL, SVN revision 74.
-
-The NOSUGGEST flag was added to certain taboo words.  While I made an
-honest attempt to flag the strongest taboo words with the NOSUGGEST
-flag, I MAKE NO GUARANTEE THAT I FLAGGED EVERY POSSIBLE TABOO WORD.
-The list was originally derived from N\xE9meth L\xE1szl\xF3, however I removed
-some words which, while being considered taboo by some dictionaries,
-are not really considered swear words in today's society.
-
-You can find SCOWL and friend at http://wordlist.sourceforge.net/.
-Bug reports should go to the Issue Tracker found on the previously
-mentioned web site.  General discussion should go to the
-wordlist-devel at sourceforge net mailing list.
-
 COPYRIGHT, SOURCES, and CREDITS:
 
 The en_US and en_CA dictionaries come directly from SCOWL (up to level

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