Revision: 8211
http://languagetool.svn.sourceforge.net/languagetool/?rev=8211&view=rev
Author: yakovru
Date: 2012-10-12 13:28:51 +0000 (Fri, 12 Oct 2012)
Log Message:
-----------
[pt] Add compound rule
Added Paths:
-----------
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseCompoundRule.java
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseRule.java
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/pt/compounds.txt
Added:
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseCompoundRule.java
===================================================================
---
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseCompoundRule.java
(rev 0)
+++
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseCompoundRule.java
2012-10-12 13:28:51 UTC (rev 8211)
@@ -0,0 +1,53 @@
+/* LanguageTool, a natural language style checker
+ * Copyright (C) 2006 Daniel Naber (http://www.danielnaber.de)
+ *
+ * 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.pt;
+
+import java.io.IOException;
+import java.util.ResourceBundle;
+
+import org.languagetool.rules.AbstractCompoundRule;
+
+/**
+ * Checks that compounds (if in the list) are not written as separate words.
+ *
+ * @author Daniel Naber
+ */
+public class PortugueseCompoundRule extends AbstractCompoundRule {
+
+ private static final String FILE_NAME = "/pt/compounds.txt";
+
+ public PortugueseCompoundRule(final ResourceBundle messages) throws
IOException {
+ super(messages, FILE_NAME,
+ "Dieses Wort wird mit Bindestrich geschrieben.",
+ "Dieses Wort wird zusammengeschrieben.",
+ "Dieses Wort wird zusammen oder mit Bindestrich geschrieben.");
+ super.setShort("Zusammenschreibung von Wörtern");
+ }
+
+
+ @Override
+ public String getId() {
+ return "PT_COMPOUNDS";
+ }
+
+ @Override
+ public String getDescription() {
+ return "Zusammenschreibung von Wörtern, z.B. 'CD-ROM' statt 'CD ROM'";
+ }
+}
Added:
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseRule.java
===================================================================
---
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseRule.java
(rev 0)
+++
trunk/JLanguageTool/src/main/java/org/languagetool/rules/pt/PortugueseRule.java
2012-10-12 13:28:51 UTC (rev 8211)
@@ -0,0 +1,30 @@
+/* LanguageTool, a natural language style checker
+ * Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de)
+ *
+ * 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.pt;
+
+import org.languagetool.rules.Rule;
+
+/**
+ * Abstract base class for rules for the Portuguese language.
+ *
+ * @author
+ */
+public abstract class PortugueseRule extends Rule {
+
+}
Added:
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/pt/compounds.txt
===================================================================
---
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/pt/compounds.txt
(rev 0)
+++
trunk/JLanguageTool/src/main/resources/org/languagetool/resource/pt/compounds.txt
2012-10-12 13:28:51 UTC (rev 8211)
@@ -0,0 +1,26 @@
+# LanguageTool, a natural language style checker (http://www.languagetool.org)
+# Copyright (C) 2005 Daniel Naber (http://www.danielnaber.de)
+
+# Portuguese compound words that are usually not written as
+# separate words.
+# Encoding: UTF-8
+# All words must contain at least one hyphen, even if the
+# word is usually not spelled with a hyphen
+# "+" at the end of the line will turn off the suggestion that
+
+
+# @author
+
+# uses a hyphen
+
+
+
+
+# "+" at end of line = no hyphen suggestion:
+
+
+
+
+# "*" at end of line = only offer hyphen suggestion:
+CD-ROM*
+
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits